cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected TaskListener behavior

brianshowers
Champ in-the-making
Champ in-the-making
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.
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
No, that does sound like a bug. Can you reproduce it as easily as you say (just add a task listener for both events)? If so, please create a Jira issue and link to this post.

brianshowers
Champ in-the-making
Champ in-the-making
AFAICT, it is that simple.  I created ACT-1590 for this fix

jbarrez
Star Contributor
Star Contributor
Ok, thanks! We will look into it.