Get Notified when group of tasks are completed

In one of our workflows, there is a scenario where we create N user tasks in a service activity when all the N users tasks are completed we want to invoke another activity, we would like to see if this can be achieved within the workflow.

Note: One of the ways we are already aware of is that using the TaskListener (we are already using reactorTaskListener), by subscribing to task completion event. But it would be very inefficient because if the activity creates 100 tasks we need to check 100 times after completion of every task.

Is there a better way of handling this?

@SrikanthMachiraju you can achieve it using creating & executing a “n” of service tasks using task markers like sequential or parallel multi-instance. Once all the MI tasks or based on completion conditions met, the execution token will wait in that MI activity. Once either of the scenario was completed then execution token will move to next activity.

Refer the below model for reference:

I create a small sample and this works as expected, thanks.