Add an ExecutionListener via the Java API

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2012 11:00 AM
I'd like to add an ExecutionListener to update a table when any process instance completes.
Is there a way to add an ExecutionListener from the JavaAPI, or alternatively in the ProcessEngine configuration? I'd like not to alter process definitions to specify the listener.
Is there a way to add an ExecutionListener from the JavaAPI, or alternatively in the ProcessEngine configuration? I'd like not to alter process definitions to specify the listener.
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2012 12:23 PM
You can do it by implementing a custom BpmnParseListener and registering that via activiti.cfg.xml (property customPostBPMNParseListeners). There are some examples on the forums for that 🙂

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2012 06:21 PM
Thanks, naag. Adding to the processEngineConfiguration bean
<property name="customPostBPMNParseListeners">
<list>
<bean class="my.class.name.ListenerImpl" />
</list>
</property>
in the Activiti configuration file worked well.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2014 03:20 PM
This method seems to have gone away. Is there a new recommended approach?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2014 04:42 PM
These have been renamed to 'parse handlers', see http://activiti.org/userguide/index.html#advanced_parseHandlers for the new way of doing the same thing.
