Excluded owners are needed for for peer review. The roles stay the same, unlike an approval process.
The WS-HumanTask specification has generic roles with excluded owners but leaves much to be decided by implementers. Unlike other roles it should be dynamically updated when a user completes a task, and it's a negative query parameter. Also, an excludedOwners list must be specific to either roles, swimlanes or tasks within a process instance.
jBPM makes the first owner of a task the owner of all following tasks in that role for the process instance. This saves unneeded task reassignment but use cases for excluded users shouldn't work this way.
I think these use cases are necessary and sufficient.
Main Use Case
- user claims a task.
- user completes the task and the process definition specifies that user is excluded from further tasks in a role for that process instance.
- for the next task in that role call getPotentialOwners IN (roles) AND NOT IN (excludedOwners)
- repeat step 1
Secondary Use Case
- user claims a task which has excludedOwners.
- user completes a task and the process definition specifies that the excludedOwners list for that process definition is cleared.
- formerly excluded owner can claim next task.