1 Reply Latest reply on Sep 12, 2013 3:51 AM by swiderski.maciej

    Human task transitions in JBPM5

    mvermand

      Hi,

       

      In JBPM4.4 you could have transitions from one human task to a number of other (human) tasks.

      It was easy to query these transitions and show user 2 a choice list of these transitions upon completing the task (Approve Form).

       

      human1.png

       

      In JBPM5/BPMN2 it seems not possible to have multiple transitions from one human task.

      I think one needs to use return parameter mapping and a diverging XOR gateway to route to the next task:

       

      human.png

       

      The gateway contains the constraints to determine the path to take based on the value that was passed along with the task complete action.

      This works, but it makes it a lot harder to collect the possible values (Approved/Disapproved) and present them in a choice list to User 2.

       

      Is there a better way to solve this issue?

       

      Thanks

        • 1. Re: Human task transitions in JBPM5
          swiderski.maciej

          in general you can use multiple sequence flows with jBPM 5 - it needs to be turned on with system property (jbpm.enable.multi.con=true) but in general it's discouraged as it indirectly makes multiple sequence flows being treated as inclusive gateway which might be bit misleading so usage of gateways is recommended.

           

          What I would suggest is to put possible transition options as task variable so they can be presented on forms so user is by that aware what could happen down the road. Don't think this will be additional work as anyway when modeling you decide on possible options and adding them as variables gives more flexibility. Relying on the static information of the diagram (like reading sequence flows from given activity) can be slightly dangerous as it might not always allow all transitions due to runtime specifics - conditions evaluation based on process variables.

           

          HTH