AnsweredAssumed Answered

How is it possible to listen to failed executions?

Question asked by kaech on Oct 2, 2012
Latest reply on Oct 3, 2012 by jbarrez
I registered a custom execution listener to an activity using AbstractBpmnParseListener.

public class MyListener implements ExecutionListener {
    public void notify(DelegateExecution execution) throws Exception {
        // do something

public class MyParseListener extends AbstractBpmnParseListener {
    private MyListener listener = new MyListener();

    public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
        activity.addExecutionListener(PvmEvent.EVENTNAME_START, listener, 0);
        activity.addExecutionListener(PvmEvent.EVENTNAME_END, listener);

On successful serviceTask execution both listeners are called. When  a JavaDelegate that throws an Exception is executed the end listener is not called. I guess this is normal behaviour.

How can I get information about service executions that fail?