there are several managers, and a separate instance of the sub-process(shown below) is to be triggered to each of the managers, paralelly
Input to the sub-process has to be of type Array – thumb rule 😉 – as only then, you can split the data and make each of the instances get corresponding data
Schema for the input to the sub-process is given at the end of the post
There is a way to instantiate parallel processes in BPM, and that’s called MultiInstanceinvocations
1. Create a sub-process and, create the activities that are required to repeat for each manager
2. Now, this should be invoked for all the elements in the array. So some configuration to be done to the sub-process property
My process looked like below
3. Double click the sub-process à
Select multiinstance as loop characteristic
Cardinality is no. of instances to be produced, here it is count (allActivities.reviewerWiseActivities, which otherwise is equal to no. of managers – with tasks)
Uncheck Is Sequencial
Don’t touch Arguments definition tab, as since this is a pre-Feature pack release, there is a bug and you cannot go with the standard way
1. Input to the sub process is an array, but typically each manager has to be assigned only with his tasks, which will be one element in the array. So use a script task as the first activity in the sub-process and copy nth element from the array and assign it to sub-process dataobject
Here, the value in the left box is :: AllActivitiesPDO.reviewerWiseActivities[loopCounter] which is obvious to understand.
Bug in Pre-Feature pack release is that this loop counter is not available in the properties window of the sub process. That’s the reason, we are splitting the array within the subprocess but not before invoking the subprocess.
Had this been post Feature pack release, you can split the array in the properties window of the subprocess, define input and output elements, and skip this script task.
That’s it! Now, n number of sub process instances will start paralelly
Hope this is useful J