I’ve a multi-instance sequential UserTask. I created a group name salesCalifornia with 3 users.
I’ve assigned task to this using task.addCandidateGroup(salesCalifornia);
My understanding was, task gets assigned to each user of the group. But it’s not.
I could see an entry in ACT_RU_IDENTITYLINK table with group name and type as candidate.
May I know how exactly group assignment works or when tasks gets assigned to users of group.
Group Assignment are like a “Shared Inbox” Anyone that is part of the group can “Claim” the task, which will Assign the specific task to the specific user.
Multi-Instance User Task that is assigned to a Group would create N user Tasks all assigned to the group (“put in the group inbox”).
If you want to assign tasks to each user, then you should run a script before the multi-instance to get all users in the group, then pass that array of usernames into the Multi-Instance User Task as the “collection” and then have the User Assignment field on the user task be the variable name of the Collection Item.
but when I query taskService.createTaskQuery().taskCandidateUser(user).list() result is empty list.
So it would be difficult to claim until it lists for the user.
I thought in same line, but this solution doesn’t scale or behavior will be error prone.
especially if a group has huge number of users, those many task will get created. If can use candidateUser option to avoid task creation, but if group dynamics change i.e. adding a new user to group or remove of an existing user from group. In these cases, new user will not access and old user will still have access.
When you use the taskCandidateUser it is looking at the candidates in the candidate users field.