Alternatively, I thought of an interrupting conditional event based on a “rejected” process variable that I could set in completion of the user task. Perhaps this is more natural as “rejection” is not an error as such, but a legitimate part of the usual business process?
I think both of these approaches look ok, now that I write this. I am using Camunda 7 latest version if that has any influence on the choice of approach.
I would go with the conditional event in this case.
The condition is clear - If the task is completed and approve = false it’ll return back to the start and cancel other instances of the multi-instance.
It’s not really a business error - usually you’d want to use an error event in a case where something is preventing the user from doing their work. But that isn’t the case here.
Let’s say you have 5 approvers and you end up with 3 approvals and 2 rejections.
Once all decisions have been made, the process will continue to the gateway where it will end in the no branch. I guess thats expected.
Each rejection will loop back, yes. However, each rejection that changes to an approval will flow to the gateway as well. Effectively this means that the “Everything is ok” task will be activated twice in this example.
You could put the first three tasks in a sub process to get the intended behavior. The process might still be a bit difficult to read though.
I suggest experimenting with the token simulator or actual process engines to see how the process behaves.