cancel
Showing results for 
Search instead for 
Did you mean: 

List of activities that can have execution listeners

santharamselva
Champ in-the-making
Champ in-the-making
Hi,
  I am want to use execution listener on a user task and start of a gateway, but the designer has no option to specify a listener on gateway and listeners on user tasks are treated as TaskListeners.
The XSD definition says:

<element name="executionListener">
<annotation>
<documentation>
Extension element for any activities and sequenceflow, used to execute custom Java logic or an expression upon the occurrence of a certain event.
</documentation>

and user guide(http://www.activiti.org/userguide/index.html#executionListeners ) says:
Execution Listeners can be used on Start and ending of a gateway and Start and ending of a activity.

Does activiti support execution listeners on  user tasks and gateways.  Where can I get the actual list of activities which can have execution listeners.

Regards,
s.selvakumar
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Execution-listeners can be put on any activity, see user guide:

Execution listeners allow you to execute external Java code or evaluate an expression when certain events occur during process execution. The events that can be captured are:

Start and ending of a process instance.
Taking a transition.
Start and ending of an activity.
Start and ending of a gateway.
Start and ending of intermediate events.
Ending an start event or starting an end event.


<userTask id="secondTask" >
    <extensionElements>
      <activiti:executionListener expression="${myPojo.myMethod(execution.event)}" event="end" />
    </extensionElements>
    </userTask>

The tasklistener/execution listener difference has been resolved in 5.12 for user tasks. The modeler doesn't have the support yet, but you could always add the listeners in the XML manually. Can you create an issue for the missing listeners in the modeler on gateways?