BProc Multi-Instance User Task completion

Situation:
In my opinion this is very common scenario where you have User Task with multiple users in parallel where you have outcomes Approve/Reject. When anyone Reject we reject entity, when everyone Approve we approve entity.
image
Routing out of user task is handled by bproc addon, where you can choose condition like “Everyone/Anyone/No one” completed with outcome.
If you have 2 assignees, first assignee rejects, second assignee have to finish his task anyway, althought you would want to finish task after first assignee. This can be achieved using Completion Condition of Task. For completion condition you can use expression with zero information in documentation.
You can use expression eg.:
${bproc_UserTaskResults.getOutcomesCount(execution.getVariable(‘MultiTask’),‘reject’)>0}

Idea:

  1. Completion condition field should be multi-line as it is always going to be long expression
  2. Add examples to documentation/sampler
  3. Create graphical selection of completion conditions similar to outcome routing
    image

Hi,
Thanks for the ideas. As for the graphical selection of completion conditions, have you ever used anything except “anyone completed with outcome”?

Regarding the completion conditions, only 2-3 times (2 of N, 50%), so in my opinion anyone completed with outcome X in combination with custom expression would be enough.

Hi, Michal @expresado
what is ‘MultiTask’ in your expression - is it a Id of Parent Task or Id of Sub-process?
and what is ‘reject’ - is it outcome or what?