Create dynamic task in multi instance task

image

Thanks for your attention , as the image above, I create a “multiTask” UserTask which has multi instance, if I have two instance when it comes to “multiTask” , such as A and B, then I create dynamic task C for A , and dynamic task D for B(by DynamicUserTaskBuilder or (TaskSerce.newTask and setParentTask) ). now A-> C and B->D two instance, each one has two sequential tasks , once I completed A and B , the processes run to the “afterMulti” UserTask, that’s not I want, it seems that dynamic task doesn’t change the workflow dependency. how can it comes to “afterMulti” UserTask only if dynamic C and D are completed , anyone helps please,
Thanks a lot :grinning:

Awaiting for a quick response please. Thanks.

waiting for a response.

Hi Edward,

Add UserTaskEventListener on complete event to multiTask. EventListener can check whether all “children” are completed.

Regards
Martin