Alejandro Guizar wrote:
could the implementation also include support for the isSequential flag that controls sequential or parallel execution of the activity instances?
Both fork and foreach are sequential. However, if you set the continue attribute to async in the following activities, execution can be made parallel provided the job executor is employing multiple threads.
They are sequential in the sense that jbpm only actually executes one transition at a time. However, when jbpm hits a "wait state" (ie. a custom activity that implements ExternalActivityBehavior, or a <state> activity), it will go back and begin executing the next transition. What is meant by sequential is that jbpm would not go back and begin executing the next transition until the first execution truly finishes (ie. reaches the <join>). I think, in order to do this, it would require a quite different implementation. I am judging this by looking at the ForEachAcitivity implementation as compared to the ForkActivity; they are both using the ACTIVE_CONCURRENT/ACTIVE_ROOT states for the root execution. If I am wrong in my understanding, please provide some more information. Thanks.