Mike M [
http://community.jboss.org/people/gubespam] created the discussion
"Re: foreach activity"
To view the discussion, visit:
http://community.jboss.org/message/568899#568899
--------------------------------------------------------------
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
http://docs.jboss.com/jbpm/v4/userguide/html_single/#asynchronouscontinua... 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.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/568899#568899]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]