Call subprocess in loop?


I need to call sub process in while loop to do flow as following figure

image org

where activity process in parent process takes only single ID

and select null process get more than one ID

so is there any solution to call sub process in while loop

1 answer

This one is the BEST answer!


Click on Call Activity
In the Details Panel select the General Tab
then click on the Iteration Tab

This will allow you to choose the method of loop you want to call the subroutine.

Parallel execution (all at the same time - as best as practical)
Sequential execution (one must finish before the next starts)

For Parallel and Sequential you can define a fixed number of executions or use a LIST ( [1,2,3] or ["A", "B", "C", "C", "C", "D"] for example) for variable number of executions.

Works very well and we use it a lot.


PS: As this reply answers your question, please mark as resolved.


Submitted by samehisthebest on Wed, 03/08/2017 - 12:01

i tried put parent activity in while ad in each while i assign multiInstanceIterator to parameter called "currentint" but it didn't work
is is need to create a connector from parent to call subprocess??

Submitted by chris.lowth on Thu, 03/09/2017 - 00:15

No, no need for a connector - it's "built in". I use this extensively in my own application.
I can only guess that you have an error in the iteration configuration, or the definition of the called process.
In what sense does it "not work"?
And: have you looked in the bonita-XXX.log file for errors?

Submitted by Sean McP on Thu, 03/09/2017 - 02:35

@sameh is the best

I suggest you also read the chapter on iteration in the documentation here: