AnsweredAssumed Answered

Catch Java ServiceTask exceptions using errorEventDefinition

Question asked by kaech on Feb 15, 2011
Latest reply on Feb 17, 2011 by kaech
My process incorporates a Java ServiceTask which throws an exception in case of an error.
Now I would like to catch this error in the process.
I tried to attach a boundaryEvent including an errorEventDefinition to the serviceTask as shown in the folowing example:

<serviceTask id="javaService" …/>
<boundaryEvent id="catchError" attachedToRef="javaService">
  <errorEventDefinition/>
</boundaryEvent>
<sequenceFlow id="errorFlow" sourceRef="catchError" targetRef="someOtherTask"/>

When running this the process I see the exception on the Tomcat console, but it is neither caught by the process nor is the process continued with someOtherTask.

What am I doing wrong?
Is it possible to catch Java Exceptions inside the process?

Outcomes