cancel
Showing results for 
Search instead for 
Did you mean: 

How to reference reviewAssignee in a parallel review task

mrvanes
Champ in-the-making
Champ in-the-making
I've copied most of the default activiti parallel Review Task and want to make some slight modifications. One of them is sending an email, containing a.o. the name of the assignee. The multiInstanceLoopCharacteristics is defined like this (default):

<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="bpm_assignees" activiti:elementVariable="reviewAssignee">
        <completionCondition>${wf_reviewedCount &gt;= wf_reviewerCount}</completionCondition>
</multiInstanceLoopCharacteristics>
The accompanying userTask is defined like this:

<userTask id="alfrescoUsertask1" name="Review" activiti:assignee="${reviewAssignee.properties.userName}" activiti:formKey="wf:activitiReviewTask">
I'd like to reference the name (and maybe other properties, but name is most important) of the loop Element reviewAssignee, but Alfresco keeps erroring out on references like this:

mail.parameters.text = reviewAssignee.properties.userName + " said: " + wf_reviewOutcome + "\n"
Saying "reviewAssignee" is not defined. The same is true when I use assignee?!
What's the trick to use the "local" loop Element's assignee values in the mail script?
1 REPLY 1

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise
You should be able to get at the assignee using the following:

task.getVariableLocal("bpm_assignee")