Execution listener on end event?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2011 09:24 PM
I need to have an execution listener defined on the end event of my process. Something like this:
This is legal according to the schema, but it does not actually fire the listeners. Is this a bug? If not, how would one go about specifying listeners that can fire on the end event. I call this end event from several different places within my process and need to always fire these listeners so do not want to specify them for each sequence flow.
<endEvent id="abandoned"> <extensionElements> <activiti:executionListener class="seah.bpm.qualification.UserStatusListener"> <activiti:field name="status" stringValue="ABANDONED" /> </activiti:executionListener> <activiti:executionListener class="seah.bpm.qualification.QualificationInactiveListener" /> </extensionElements> </endEvent>
This is legal according to the schema, but it does not actually fire the listeners. Is this a bug? If not, how would one go about specifying listeners that can fire on the end event. I call this end event from several different places within my process and need to always fire these listeners so do not want to specify them for each sequence flow.
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2011 08:10 AM
You can add the listener one level up, under the process. That should work.
But your case should work to. Can you create a Jira + testcase?
But your case should work to. Can you create a Jira + testcase?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2013 06:21 PM
I know this is an old thread, but I'm having a similar issue in 5.14. I used the Eclipse designer to add the listener, and verified the generated BPMN (below). Any ideas why this listener would not be fired? My task listeners are working perfectly…just not the execution listener. Thanks in advance.
<code>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns
mgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns
mgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="theProcess" name="The Process" isExecutable="true">
<extensionElements>
<activiti:executionListener event="end" class="package.WorkflowCompletionListener"></activiti:executionListener>
</extensionElements>
….
</code>
<code>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns


<process id="theProcess" name="The Process" isExecutable="true">
<extensionElements>
<activiti:executionListener event="end" class="package.WorkflowCompletionListener"></activiti:executionListener>
</extensionElements>
….
</code>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2013 03:11 AM
Hello,
I tried the
to end event.
It works. Could you create test case for it?
Regards
Martin
I tried the
org.activiti.examples.bpmn.executionlistener.ExecutionListenerTest.testExecutionListenersOnAllPossibleElements()
with small change
<process id="executionListenersProcess">
<extensionElements>
<activiti:executionListener class="org.activiti.examples.bpmn.executionlistener.ExampleExecutionListenerOne" event="start" />
</extensionElements>
to end event.
<process id="executionListenersProcess">
<extensionElements>
<activiti:executionListener class="org.activiti.examples.bpmn.executionlistener.ExampleExecutionListenerOne" event="end" />
</extensionElements>
It works. Could you create test case for it?
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2014 04:02 PM
This turned out to be a problem with our process definition. We had a requirement to unassign tasks that had been assigned for more than 24 hours, and this was implemented using a parallel gateway and a timer/script that fired every 24 hours (which is obviously a bad idea for a variety of reasons). The parallel execution prevented the workflow from ever completing, and thus the listener was never being fired. We'll have to set up a job elsewhere to meet the 'unassign expired tasks' requirement, but at least we have our listeners working now.
Thanks for the help.
Thanks for the help.
