4 Replies Latest reply on Feb 21, 2007 10:33 AM by kukeltje

    JBPM Fork Issues

    jorell

      I was using the Fork node and had some questions about it:

      1- It appears that its necessary to name the outgoing transitions from a fork node. Is this true? when I didnt name them the token went to just the first transitions, proceeded to join and onwards.

      2- In my tests I havent been able to get concurrent processing after a fork. I looked at the code of Fork.java and in the execute method the leave on each of the transitions is called in a loop. So the effect of this is that first one path of execution is traversed till it reaches the join node and then the other. There isnt any concurrent processing. For concurrent processing the fork node should leave on each of its outgoing transitions in a new thread. I'm probably missing something basic here so please let me know.

      Thanks.

        • 1. Re: JBPM Fork Issues
          stembol

          I've done the test and the result is there isnt any concurrent processing.

          • 2. Re: JBPM Fork Issues
            kukeltje

            jbpm IS NOT a threading system...(discussed lots of times) if you want concurrent processing, use async actions that are processesed e.g. using jms.... That way the loop is real quick and processing 'concurrent'

            • 3. Re: JBPM Fork Issues

               

              "jorell" wrote:
              the effect of this is that first one path of execution is traversed till it reaches the join node and then the other. There isnt any concurrent processing.

              I think the next transition is also invoked when another transition path gets into some wait state, such as a task node. If, in the websale example, you change the "ship item" node into some task node then two tasks are created, and you can choose in which order to execute those.

              Arjan.

              • 4. Re: JBPM Fork Issues
                kukeltje

                correct, until it reaches the join or a waitstate.