Inside call activity, while waiting for client approval, the client can keep existing items and request more items to make decisions. At this time, I need to create 3 more subprocesses for the same parent process. So that the parent process can have 3,6,9,12 or more subprocess if needed. Call activity’s BPMN is below.
Can you give me any idea about how can I do this? I think I need to do this outside of call activity’s BPMN because requesting more items is not related to any existing subprocess, is related to their parent.
Thanks for your response. I think this post is about submitting multiple subprocesses at the same time. My case might be a bit different. I submit 3 subprocesses. When these 3 subprocesses arrive at a certain task (waiting for approval) in call activity’s BPMN, the client can request more items. Then I need to submit 3 more for the same parent. This is the approach that I just created using a parallel gateway. Initially, I create 3 subprocesses and also start waiting for another message in case the client requests more. If the client requests more items, I create 3 more subprocesses and also go back to the ‘waiting for the client to request more items’ task in case of the client request more.
I am not sure if it is the best approach. I keep waiting for the client to request more items and I complete call activity if one of the subprocesses is completed.
I have another question. I expect the process to finish if I complete one sub-process. Let’s say, I created 3 subprocesses only one time and completed it without requesting more items. The completion condition works fine and completes the sub-process. ${nrOfCompletedInstances/nrOfInstances >= 0.3}
But if I add 3 more items, then I get duplicate nrOfInstances and nrOfCompletedInstances variables on the parent process. So the below condition doesn’t work for me.
${nrOfCompletedInstances/nrOfInstances >= 0.01}
All 6 subprocesses have the same superProcessInstanceId. I expect 6 of them to complete but only 3 of them get completed and the parent process keeps waiting.
Any idea about how to overcome this scenario? Do I need to manually delete other subprocesses if I complete one? @aravindhrs
I couldn’t find any solution to this problem. As a workaround, I will try to avoid revisiting call activity to add new subprocesses for the same parent. In the beginning, I will create a possible maximum amount of subprocesses. E.g Loop cardinality will be set to 15 instead of 3. So that I will create them only one time and I won’t have duplicate nrOfCompletedInstances, nrOfInstances variables on the parent process… And I will set the completion condition.