3 Replies Latest reply on Feb 24, 2012 8:38 AM by eaa

    What does multiple "lanes" mean on some of the examples provided?

      A novice question, sorry.

      This question was originally posted as a part of this thread but I felt it was off topic and deservers its own thread.

       

      What does multiple "lanes" mean on some of the examples provided?

      (/jbpm-examples/src/main/resources/junit/BPMN2-IntermediateCatchEventSignal.bpmn2)

      jbpm screenshot wait state examples.png

       

      Why there are two lanes? One process, but two lanes. How they are supposed to work with each other? Are they at all?

       

      I made a bit modified version of this example:

      jbpm screenshot wait state examples my modification.png

       

      When I re-run test now:

      When I start the process, "Print something 1" is printed as expected.

      When I send signal to the process, the "Print something 3" is printed, as expected.

      And there is end of process.

      The "Print something 2" is never reached.

      More interestingly, the test is evaluated as "completed", despite the process still did not finished the "first line".

      Puzzling I have to say.

        • 1. Re: What does multiple "lanes" mean on some of the examples provided?
          eaa

          Why there are two lanes? One process, but two lanes. How they are supposed to work with each other? Are they at all?

          In BPMN2, you can define Starting Catch Events that you can use to create different paths of execution inside a single process. In this case, you have to signal the "event" node if you want to start the second path. You can signal the process from outside (ksession.signalEvent(...)) or from inside a node of the same process (using kcontext) or even using a Throw Event Node.

          The "Print something 2" is never reached.

          Since you are never completing the "User Task" Node, the process is "waiting" there. That is why "Printing Something 2" is never executed. Please read the documentation about User Tasks in order to understand how to complete them.

           

          More interestingly, the test is evaluated as "completed", despite the process still did not finished the "first line".

          In your process you have 2 "End Nodes". Both nodes are "Terminating End Nodes" meaning that the first of those nodes that is executed with end the entire process. That is the expected behavior. If you want, or need, you can create a non terminating End Node (it is configurable through a property). In that case, only the current flow is going to be terminated, but the process is not.

           

          Best Regards, 

          • 2. Re: What does multiple "lanes" mean on some of the examples provided?

            Thank you Esteban.

            So using XOR join of both threads leading to one end is a direct equivalent, isn't it?

            jbpm screenshot simple process 4b xor join.png

            The web Designer goes even further and offers 9 different type of ends, terminating and non-terminating having different stencils, it is more evident then.

             

            I am still wondering why the (original) "multiple lane" approach is good for. What real world scenarion it is good for?

            Ad-hoc cancelling task for them main process route?

            Timed out cancelling route?

             

            Has jBPM/BPMN2 same notion of "token" and "root token" as was in jBPM3/jPDL?

            • 3. Re: What does multiple "lanes" mean on some of the examples provided?
              eaa

              So using XOR join of both threads leading to one end is a direct equivalent, isn't it?

              I would say that in this simple process, yes, it is the same.

              I am still wondering why the (original) "multiple lane" approach is good for. What real world scenarion it is good for?

              Sometimes, for example, you have certain paths that repeat themselves in your process (like, for example, error treatment). A goog design for this (but not the only one) could be to have a different "lane" that treats an error when/if it occurrs. So in your process you can use a Throw Event that you can then catch using a Catch Event. That could be a valid scenario for having multiple "lanes".

              Has jBPM/BPMN2 same notion of "token" and "root token" as was in jBPM3/jPDL?

              No. In jBPM5 there is no token going from node to node. The concept of Current Node Instances replaces it. So, in a particular point, you have a Process Instance with one or more Node Instances (1 node instance per "active" node in the process instance). When a Node instance finishes its execution, the next Node Instance is invoked and so on.

               

              Best Regards,