2 Replies Latest reply on Dec 18, 2006 3:31 PM by nlmarco

    Fork + Join

    nlmarco

      Hello *,

      I've got a question about Fork+Join behaviour:

      When the root token enters the Fork, it creates a new child token for every outgoing transition. That's exactly what I expected according to the docs and my intuition.

      When these child tokens enter the Join, however, they don't end there, but continue their way through the rest of the workflow. That means, even though the Join can be understood as the counterpart of the Fork, it doesn't behave that way. In my opinion, every child token should end in the Join by default.

      Is there a way to configure a Join this way? I didn't find anything in the Join's source code...

      What's the preferred way to do this? End the child tokens in an action? Are there best practices?

      Thousand thanks in advance!

      Best regards, Marco :-)

        • 1. Re: Fork + Join
          tom.baeyens

          the default behaviour of the join is as you describe. you must have some other problem why the join doesn't work that way

          • 2. Re: Fork + Join
            nlmarco

            Hello Tom,

            thanks a lot for your quick reply! I built a test case and hope you can either tell me what I'm doing wrong or fix the bug in jBPM ;-)

            This is my test process definition: http://www.nightlabs.de/~marco/jbpm/2006-12-18.00/processimage.jpg

            Here is a little test application (incl. the process definition): http://www.nightlabs.de/~marco/jbpm/2006-12-18.00/jbpmfork.tar.gz

            And here are screen shots (of the above test application) showing two wrong/strange behaviours:

            http://www.nightlabs.de/~marco/jbpm/2006-12-18.00/forktest-a.html

            As you see in A3, I was able to move the root token from the Fork node "fork1" to the State "state_left_1", even though the child tokens didn't reach the Join node yet. This is not a serious problem, though, because I could find out that the root token has active child tokens and prevent the user from doing the transition "to_state_left_1". However, is this behaviour really intended? Shouldn't jBPM prevent signalling the root token while there are active children?

            http://www.nightlabs.de/~marco/jbpm/2006-12-18.00/forktest-b.html

            This is what I've described in my previous posting. As you see in B3 and B4, I move the two child tokens to the Join node "join1". Correctly, the root token jumps from "fork1" to "state_after_join" as soon as the second child token reached "join1". B5 demonstrates, however, that I can continue moving the second child token after it has reached "join1" - it does not end in this Join node.

            Btw, I'm using jBPM version 3.1.2 with MySQL 5.0.18.

            Best regards, Marco :-)