Execution Listener on user task - what does it do?

148 views
Skip to first unread message

Jan Galinski

unread,
Feb 13, 2014, 4:46:31 AM2/13/14
to camunda-...@googlegroups.com
Hi

with the modeler, I can define execution listeners and task listeners for user tasks.

This confused me for some time now, but today I dare to ask:

- Why would I use execution listeners on user tasks?
- When I combine both, what is the expected behavior? (execution-start, task-create, ...)

Thanks

Jan

Daniel Meyer

unread,
Feb 14, 2014, 3:13:39 AM2/14/14
to camunda-...@googlegroups.com
Hi Jan,

- Why would I use execution listeners on user tasks?

The execution listener can be put on all activities and is notified when the activity is entered. This is not "user-task specific" and can be used everywhere. I would use it for doing things like "logging audit information about the activities being executed" or things like that which are orthogonal aspects. 

The user task "create" listener is directly related to the user task "Entity" being created. 

- When I combine both, what is the expected behavior? (execution-start, task-create, ...)

First the Execution "start" listener is executed, the the User Task "create" listener because the process engine will first create the activity instance for the user task and then execute the User Task Behavior which creates the task entity and fires the event.

Cheers,
Daniel Meyer


Reply all
Reply to author
Forward
0 new messages