2 Replies Latest reply on Jan 25, 2011 7:06 AM by salaboy21

    jBPM5 - How to start paralell WorkItems inside a Process?

    scurvo

      Hi all,

       

      I am trying to start 2 workItems/tasks at the same time inside a process, is it possible?

      I looked in the Gateway section but they all seam to be sequential...

      I would apreciate any way to define 2 workitems/tasks in a bpmn2 process and then run the in separate threads (created by me or not)...

        • 1. jBPM5 - How to start paralell WorkItems inside a Process?
          scurvo

          I think i might have solved the problem.

           

          I used the parallelGateway to split into 2 work items in the bpmn2, and then in each of the work item's handler, while running the execute method, I created a separate thread for the specific code to run.

          • 2. jBPM5 - How to start paralell WorkItems inside a Process?
            salaboy21

            Hi there, great that you find the way to solve it.

            Remember that in BPMN you are modeling Business processes situations and not how to execute java code. There is notion of multi threading in business processes. In real life when two task are executed at the same time (two persons working at the same time) doesn't matter if they start working sequentialy with difference of milliseconds.

            Greetings!