Task listeners can only be used with user tasks, since they provide callbacks when performing a task (i.e. the task that a person must complete), cf http://docs.camunda.org/latest/guides/user-guide/# process-engine-delegation-code-task-listener
Assuming you have a custom task like
<userTask id="task1" name="My task" >
<extensionElements>
<camunda:executionListener event="start" class="com.example.MyExecutionListener" />
<camunda:taskListener event="create" class="com.example.MyTaskListener" />
</extensionElements>
</userTask>
When a user task runs
- The execution listener is called
- Task listener called
In the general case, a task listener event loop is contained between process listening events startand end. Thus, the user task execution cycle:
- ExecutionListener # start
- TaskListener # create
- TaskListener # {assignment} *
- TaskListener # {complete, delete}
- ExecutionListener # end