2 Replies Latest reply on Jul 20, 2006 12:45 PM by cpob

    Multiple Transitions to a fork

    cpob

      I was creating a sample workflow just to use, and I tried having two task-nodes go to the same fork. Once a fork already has one incoming transition, it will not allow me to add a second one.


      Example: I have a decision node that can go to one of two task-nodes. After either path, the flow will fork:

      <process-definition
       xmlns="urn:jbpm.org:jpdl-3.1" name="123">
       <start-state name="start">
       <transition name="" to="decision1"></transition>
       </start-state>
       <fork name="fork1">
       </fork>
       <decision name="decision1">
       <transition name="" to="task1"></transition>
       <transition name="tr2" to="task2"></transition>
       </decision>
       <task-node name="task1">
       <transition name="" to="fork1"></transition>
       </task-node>
       <task-node name="task2">
       <transition name="" to="fork1"></transition>
       </task-node>
      </process-definition>
      


      You can force it in XML, but sometimes that works in the GPD, but other times the GPD gets confused and has transitions floating out to nowhere.

      Is there some reason there should not be multiple transitions to the same fork? I realize you can just put a 'NO-OP' node between the fork and the two task-nodes, but that just clutters up the graph.

        • 1. Re: Multiple Transitions to a fork
          koen.aers

          AFAIR it is explicitly stated in the docs that forks can have only 1 incoming transition... Am I wrong about this? Has this changed in the meantime?

          Regards,
          Koen

          • 2. Re: Multiple Transitions to a fork
            cpob

            According to the docs at http://docs.jboss.com/jbpm/v3/userguide/processmodelling.html#nodetypefork

            9.3.5. Nodetype fork

            A fork splits one path of execution into multiple concurrent paths of execution. The default fork behaviour is to create a child token for each transition that leaves the fork, creating a parent-child relation between the token that arrives in the fork.


            I can't find anything else in the docs that says explicitly one incoming transition.

            Now, it says "splits one path of execution". I don't know if that means explicitly "can only have one incoming path". Because if you have two incoming paths, it will split each path. So it splits that path of execution.

            I force fed the xml the multiple transitions to the fork, and jBPM works properly when running the workflow.