2 Replies Latest reply on Feb 27, 2006 12:34 AM by enazareno

    'secret' transition, is it possible to define?



      is it possible to define in a task-node a transition dinamically, that is, from it you can exit through 2 nodes (for example) but you can define in a class or so a third (even dinamically) to a existing node.

      Another possibility would be to define at the very beginning this 3 transitions but "hide" one of them to the user, so for them it does not appear as a possible transition button.


        • 1. Re: 'secret' transition, is it possible to define?

          I'm doing something similar to what you describe by running an action on the node-leave event that changes the "to" node of the transition that will be used to point to whatever arbitrary node I need to send the token to. Then when the token reaches the destination node, the "to" of the transition is changed back to what it should be, then the whole transaction is committed if successful.

          I don't know if you could actually add a transition on the fly instead of just changing an existing transition, though. I think I looked into this and decided to do things the way I described so I wouldn't have to tweak jbpm code to make it work.

          I'm sure that this kind of changing of the process def at execution time is not recommended, but it works for my purposes (at least no problems so far) and sounds like it might be similar to what you're after.


          • 2. Re: 'secret' transition, is it possible to define?

            Hi boerse,

            Why not define your transition name with prefixes for example and then tweak the web interface in a way that it does not display the transition with this prefix. Example, you can name the transition as "sys_cancel", and in your web interface, don't display transitions that start with "sys_".