Multiple parallel approvers

I have to model a bpmn with multiple parallel User Tasks (for multiple department). Every userTask will be either be Approved by a user or Rejected. Depending upon the no. of Approve/Reject count next sequence flow will be decided. It is a kind of voting we can say.

Suppose there are 5 parallel tasks and if 3 is approved and 2 rejected will follow one sequence flow and if 3 rejected and 2 approved will follow another path. How can we design and get this count after joining all these tasks.

@PrashantD, you can create a multi-instance user task dynamically from the collection. A collection will have list of departments and for each department task will be created and executed in parallel.
And the approved/reject count you can store in a variable and evaluate which route you want to take.

deptCollection: To hold all dept values
approvedCount: To hold number of approved count
rejectedCount: To hold number of rejected count

Additionally you can optionally configure completion condition to optimize the process execution. Lets say your deptCollection=10, and variable approvedCount=6 means you got majority voting, then you can configure completion condition like ${deptCollection - approvedCount >= 6 } . So the execution token will move to next flownode in the execution flow.

image

Refer multi-instance-docs and GitHub example: [multi-instance-example]

Hi @aravindhrs can you please share the above bpmn file. That can helps me a lot.Thanks in advance