Default custom event listener

873 views
Skip to first unread message

sojk...@gmail.com

unread,
Jun 23, 2014, 4:04:25 AM6/23/14
to camunda-...@googlegroups.com
Hi,

we need to execute some default methods on some events. For example we need default execute method on each event create user task and another on service task.

We tried used to

class CustomParseHandler extends AbstractBpmnParseListener

(and registered it in config.groovy, we use grails camunda plugin)

but these events are executed just in process is deployed. Is there another way, how to set custom listeners? Or always set this listener via modeler?

Best regards
Jiri Sojka

Daniel Meyer

unread,
Jun 23, 2014, 4:09:39 AM6/23/14
to camunda-...@googlegroups.com, sojk...@gmail.com
Hi Jiri,

the parse listener is invoked when an XML element is parsed. You can use a parse listener to attach execution listeners or task listeners to the process definition graph.
An example is the built-in history parse listener:

Here is another example:

Daniel

webcyberrob

unread,
Jun 23, 2014, 4:11:35 AM6/23/14
to camunda-...@googlegroups.com, sojk...@gmail.com
Hi Jiri,

Id suggest having a look at the execution listener;


My understanding is the parse listener is more orienetd to deployment, execution listener to run time. From your description it looks like your more interested in runtime events.

regards

Rob

sojk...@gmail.com

unread,
Jun 23, 2014, 6:56:07 AM6/23/14
to camunda-...@googlegroups.com, sojk...@gmail.com
Hi Rob,

I agree with your opinion. But if I use execution listener, I have to define it on each task (user, service...) manualy.

I want to register some listener and execute every time without attach it in modeler.

Regards
Jiri

webcyberrob

unread,
Jun 23, 2014, 7:37:23 AM6/23/14
to camunda-...@googlegroups.com, sojk...@gmail.com
Hi Jiris,

I believe the engine supports a global execution listener. Refer to user guide link below;


regards

Rob


Reply all
Reply to author
Forward
0 new messages