13 Replies Latest reply on Jun 6, 2007 9:54 AM by Edward Staub

    please help: concurrent paths execution

    Alexander Schlett Newbie

      Hi all, I'm really stuck with this problem now, and after reading for hours it didn't get any better. I'm using jbpm 3.2, here's a simple example of what I want do do:

      <process-definition>
       <start-state name="start1">
       <transition name="to-fork" to="fork1"/>
       </start-state>
      
       <fork name="fork1" async="true">
       <transition name="to-proc1" to="proc1"/>
       <transition name="to-proc2" to="proc2"/>
       </fork>
      
       <process-state name="proc1" async="true">
       <sub-process name="doThatThing"/>
       <variable name="p1.doWhat" access="read" mapped-name="doWhat"/>
       <transition name="1to-join" to="join1"/>
       </process-state>
      
       <process-state name="proc2" async="true">
       <sub-process name="doThatThing"/>
       <variable name="p2.doWhat" access="read" mapped-name="doWhat"/>
       <transition name="2to-join" to="join1"/>
       </process-state>
      
       <join name="join1" async="true">
       <transition name="to-end" to="end"/>
       </join>
      
       <end-state name="end">
       </end-state>
      </process-definition>
      


      all of this is running in a tomcat with a JobExecutor having more than 1 thread. I'm having several issues with this scenario which due to lack of deep experience with jbpm/hibernate I can't solve.
      First, JobExecutor tries to work on the same job within different threads.
      Second, the join node runs into a hibernate sync problem because both tokens work with the parent token.
      Note: the join node problem occurs only if the two sub-processes finish at the same time.

      I think I'm missing something here in general. Any help is appreciated to point me in the right direction. All I want is to run the two (complex) sub-processes simultaneously. Again, reading all the old threads did not really help.
      Thanks, Alex