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?