-
1. Re: can i fork and then join up an end-user specified number of
gubespam Mar 8, 2010 4:20 PM (in response to simbo1905)I have this same problem, and I am implementing a solution in the same way you have described.
I have two special custom activities - one that is able to spawn multiple new processes based on some runtime criteria and another that does the join, waiting until all the spawned (child) processes are finished. I have some special process variables that I keep in the child processes that gives me information about which parent process it belongs to (ie. execution id).
When the child process finishes, I keep track of this and if my parent process is currently in the "join" step, I also signal the parent execution. My signal() method catches these signals and either continues waiting (if more child processes are still running) or take a transition (if all child processes are finished).
Using a scheme like this, you'd only need one swimlane definition in the child process definition, since you would be spawning multiple instances.
-
2. Re: can i fork and then join up an end-user specified number of
kukeltje Mar 9, 2010 2:01 AM (in response to simbo1905)No, you are not missing something. The 'for-each' in de runtime defined set is not supported at the moment. I do have an extention to the fork node available here that supports this.
In combination with this there is an extension to the join where you can define the number of forked instances should reach the join before continuing.
So please vote for https://jira.jboss.org/jira/browse/JBPM-2414
-
3. Re: can i fork and then join up an end-user specified number of
d_agarwal Apr 27, 2010 5:45 AM (in response to kukeltje)We are using jbpm 4.01 & wanted to implement such dynamic fork/join. We need to run a givem sub-process x number of times (in parallel) where value of x is known only at runtime. Is it possible in jbpm 4.01? If yes, could you please point me to some sample code (java + jpdl) for it?