Maciej Swiderski [http://community.jboss.org/people/swiderski.maciej] replied 
to the discussion

"How to start/spawn 'n' subprocesses for 'n' users using JBPM-4.3."

To view the discussion, visit: http://community.jboss.org/message/553185#553185

--------------------------------------------------------------
You are looking for something like for-each activity that is of type multi 
instance. It is part of 4.4 release that is coming out in few days.
Based on the input (given as list, array, etc) it will create new instances of 
the activity which is following the for-each. Below you can find a code snippet 
that illustrates it:


   <foreach var="department" in="#{departments}" g="111,60,48,48" 
name="foreach">
      <transition to="Collect data"/>
   </foreach>

   <task candidate-groups="#{department}" g="201,58,92,52" name="Collect data">
      <transition to="join1"/>
   </task>

   <join g="343,59,48,48" multiplicity="#{quorum}" name="join">
      <transition to="end1"/>
   </join>

In the example there will be a variable of type list available on runtime, 
let's assume that there will be four departments involved. Foreach will create 
4 tasks, one for each department. At the and (join) you can use multiplicity 
attribute to control the flow, for instance you can say that once 3 departments 
did collect all data it is enough and process should not wait for the last one.

P.S.
Search development forum for some details about for each activity

HTH

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/553185#553185]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to