AnsweredAssumed Answered

Unexpected TaskListener behavior

Question asked by brianshowers on Feb 22, 2013
Latest reply on Feb 25, 2013 by jbarrez
I have a task listener which listeners for each of the three types of task events (create, assign, complete).  However, I saw some unexpected behavior when I created a new task with an initial assignee:


<userTask id="myTask" name="My Task" activiti:dueDate="${dueDate}" activiti:assignee="${initialAssignee}" activiti:priority="${priority}">

In this case, both the 'create' and 'assign' events are triggered as expected, but they happen in reverse order.  My listener always received the 'assign' event before it receives the 'create' event.

Is there a reason for this ordering?  I would have expected to get them in the opposite order.  As it currently stands, my listener is receiving 'create' events for tasks that it already knows about and 'assign' events for tasks that it has never seen before.

Outcomes