I have a swimlane with 3 user tasks. I need to ensure that once a user performs a task in that swimlane they can't perform another one. They should be allowed to perform tasks in other swimlanes.
public void setExcludedOwners(List<OrganizationalEntity> excludedOwners)
public void getTasksAssignedAsExcludedOwner(String userId,
But I don't see how to use them
Gary, I am not sure that lanes should be used in exactly oposite way, according to documentation, first task claimed by a particular user causes that all other tasks on that lane will be assigned to that user:
User tasks can be used in combination with swimlanes to assign multiple human tasks to the same actor. Whenever the first task in a swimlane is created, and that task has an actorId specified, that actorId will be assigned to (all other tasks of) that swimlane as well. Note that this would override the actorId of subsequent tasks in that swimlane (if specified), so only the actorId of the first human task in a swimlane will be taken into account, all others will then take the actorId as assigned in the first one.
If you would like to implement you probably need to modify Human Task WorkItemHandler, for instance WSHumanTaskHandler. It is responsible for adding people assignments to the task.
Yes this is opposite of default behavior but sometimes there are good reasons to prevent the same person from doing different tasks. What is excludedUsers supposed to do? If it can help in my case, I want to use it. If not, I'll have to filter users with application code. I'm not ready to rewrite WSHumanTaskHandler.
Gary, by looking at the code it seems the out of the box usage of the exludedUsers is not implemented not on the handler side nor on the task service side.
That should not be too much of a problem to add that support and the value out of it could be really great. Of course these are my findings, perhaps I missed something.
Another thing I found that could be useful (but perhaps too big limitation for your case) is that you could apply rules before adding a task, in case rules are not satisfied task won't be created.