All approval request appear simultaneously in tasklist.
What isn’t working:
I would like to evaluate after each approval if there are sufficient votes. If I approve in tasklist one waiting “Approve” task no evaluation of the conditional flow is triggered. Thus my modeling idea fails.
Find my model attached for camunda 7. Take a look at the conditional outgoing flow, I attached a groovy output to check. quorum-approval-process.bpmn (11.1 KB)
I’m grantful for any hints how to model this process,
Thanks,
Michael
You can, within your multi-instance, create, for example, a process variable called voteCounter, and for each approved vote, you look for the value of this variable, and increase the value.
When exiting your multi-instance, you can create 2 paths, one that directly ends the process if the value of the variable is less than 7, and another that is the happy path, if it is approved.
I believe it can be this way, very easy and simple.
This sounds like a use-case for an Interrupting Conditional Boundary event, along with an event-based subprocess. It might be tricky to diagram it all out with a single process-pool… it might be easier to use a set of messages (one inside the MI-parallel) and one as a Non-Interrupting Event process in the parent process.
@Michael2 part of what you are running into is Process-Instance Scoping issues, which are discussed fairly heavily in “BPMN Method and Style” but the approaches listed in Sliver’s books don’t translate 100% to Camunda.
Something similar to below model should do the trick. (I am going to share a working example later)
You can define a counter process-instance scoped variable, initialize to 0, add a Task Listener to the “Approve Task”, configure it to get fired on complete event. This Task Listener should do counter’s increment logic. Define your condition for the interrupting conditional event based on the counter’s value.