I have a workflow in Alfresco Share where I need 4 parallel reviews / approval tasks. I am currently able to create 4 tasks but they all go to the same candidate group. Members of that group are able to approve, but they have all 4 tasks in their "My Tasks". Each of these tasks is unassigned. The remaining 3 groups receive no tasks.
Do I need to include code in the multiInstanceLoopCharacteristics that assigns the tasks to the pooled actors? I have read the documentation Activiti User Guide and see that a list of users can be created. Where would I set that variable and would that be with execution.setVariable()? Any help would be greatly appreciated.
One slightly more simple way around the multi-instance loop situation would be to just create a parallel gateway that splits into those 4 tasks and rejoins after they're completed; each task could use the same form and be directly assigned to those individual candidate groups that you're assigning. The functionality of rerouting after a rejection that you've shown above is entirely still plausible with this configuration as well.
There are a couple of other posts, particularly this one, where people have discussed the multi-instance functionality before and highlighted a couple points in getting it working. But yes, you are correct - the multi-instance is probably a solid route to go here and has the potential capabilities you're looking for. The Activiti Modeler has assign functionality or you can establish the list of users as a variable.
I am still a bit confused. I have assigned bpm_GroupAssignees to the activiti:collection and created and activiti:elementVariable "reviewGroup", my assumption being that the foreach loop would use bpm_groupAssignees as the source collection and reviewGroup at the variable. When I start the review step the workflow throws an exception "java.lang.NullPointerException: null".
I've seen other code that uses but I thought that the activiti:elementVariable would achieve the same thing.