cancel
Showing results for 
Search instead for 
Did you mean: 

Create event for Manual Tasks

pprestin
Champ in-the-making
Champ in-the-making
I'm attempting to add a task listener for the creation event of a manual task. However it appears there is no TaskDefinition to add that event to on the process. The ManualTaskParseHandler has a PROPERTYNAME_EVENT_SUBSCRIPTION_DECLARATION that makes me think they occur somehow but not in the same way a user task might. Any ideas for v.5.14? Or would this only be possible with the newer listeners within 5.15?
2 REPLIES 2

bmarkmann
Champ in-the-making
Champ in-the-making
Based on the user manual, it might not be directly possible:

"A task listener can only be added in the process definition as a child element of a user task."

Maybe some other approach is possible, like using a boundary event to accomplish whatever you're looking for?

frederikherema1
Star Contributor
Star Contributor
You can add an execution-listener to ANY activity there is, example:


<serviceTask id="service" activiti:class="org.activiti.engine.test.bpmn.async.AsyncService" activiti:async="true">
  <extensionElements>
   <activiti:executionListener event="start" class="org.activiti.engine.test.bpmn.async.AsyncListener" />
  </extensionElements>
</serviceTask>

This allows you to be notified on either the "start" and "end" event.