AnsweredAssumed Answered

Set owner of taks in XML

Question asked by kristofsl on Jul 15, 2013
Latest reply on Jul 17, 2013 by frederikheremans1

is it possible to set the owner of a task based on a process variable? Is it possible with a line like below?

<userTask id="AssignUserTask" name="AssignUserTask" activiti:owner="{ActivitiTaskOwner}"  activiti:candidateGroups="CSM, RD"></userTask>

If not, how can you dynamically set the owner the moment the task becomes active?

I was thinking about building a listener, but then I found the following in the Activiti in action book :

TIP The order of events for a user task is maybe not what you would expect.
The first event that’s thrown is the assignment event. After the assignment is
handled, the user task create event is fired.

This means that the owner is set via a listener after the assignment to a user is done?