1
votes

I have an Activiti workflow that creates multiple (parallel) user tasks for an authorisation task (assigns each one to a group based on one element of a list).

<userTask id="authReview" name="Authorisation Review" activiti:candidateGroups="${assignee}" activiti:formKey="rowf:authReviewTask">
    <documentation>
        ${assignee} Data Access request for approval.
    </documentation>

    <!-- One instance of this user task for each group that needs to authorise the request -->
    <multiInstanceLoopCharacteristics isSequential="false"
        activiti:collection="${rowf_reviewers}" activiti:elementVariable="assignee" >
     </multiInstanceLoopCharacteristics>     
</userTask>

As the ${assignee} variable is used to allocate the task to the correct group (after being read from the ${rowf_reviewers} list, is there any way to use ${assignee} to add to the task description? The task description is currently set by the tag which seems to work fine but nothing is read from ${assignee}. I think this may be to do with a timing issue with the population of ${assignee} as "may" be populated before the gets evaluated.

Any assistance on how to get ${assignee} into the description would be appreciated.

2

2 Answers

1
votes

I think what you are asking is if you can update the task description to include the assignee. You can do this easily in a task listener on the "create" event. Using the task Delegate (DelegateTask), simply call the setDescription method.

Let me know if I have misundersrood your need. Greg

0
votes

I have prepared simple jUnit test which works: github jUnit test

I hope it helps.

Regards Martin