AnsweredAssumed Answered

How to access assignee inside multi instance userTask

Question asked by mrvanes1 on May 8, 2012
Latest reply on May 9, 2012 by mrvanes1
I have been racking my brains over the following problem the last couple of days and can't find any documentation about how to go forward. I have made slight changes to the activiti parallel review task in Alfresco, which works like a charm, accept for the fact that I can't seem to accesss that "local" assignee in the multi instance review task.

As far as I understand it, the flow of the vars is as follows:
- bpm_assignees contains a collection of the selected users which is broken down into assignees using the multiInstanceLoopCharacteristics element:
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="bpm_assignees" activiti:elementVariable="reviewAssignee"></multiInstanceLoopCharacteristics>
Each member of the bpm_assignees collection is then assigned to the process variable reviewAssignee.
In the userTask I have added the activiti:assignee parameter to map the process (username property) value of reviewAssignee to the task's assignee:
<userTask id="alfrescoUsertask1" name="Review" activiti:assignee="${}" activiti:formKey="wf:activitiReviewTask">

Now, after the multi-instance userTask I have a mailTask with a script to send a mail to the iniator about the outcome in which I'd like to use the assignee's name (John Doe said: Approve e.g.):
mail.parameters.text = assignee + " said: " + wf_reviewOutcome + "\n"

No matter what I do, I allways end up with an error saying "ReferenceError: "assignee" is not defined" (or whatever variable I substitute assignee for, like reviewAssignee or bpm_assignee e.g.)

How can the assignee (process) variable be transported from the multi-instance userTask to the mailTask?