-
Bug
-
Resolution: Done
-
Major
-
jBPM 3.2.8
-
None
If you run a process definition below with ExceptionActionHandler which throws IllegalArgumentException, the first exception will be handled by the first exception handler and the second exception won't be handled — will be thrown as a DelegationException to the client.
This behavior was introduced by JBPM-1887 to avoid infinite loop. But ExecutionContext.exception can be cleared after handling the exception. Then avoiding loop and using multiple exception handlers will be achieved at a time.
==============
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="sample">
<start-state name="start-state1">
<transition to="node1"></transition>
</start-state>
<node name="node1">
<event type="node-enter">
<script>
System.out.println("node1 called.");
</script>
<action class="com.test.action.ExceptionActionHandler"></action>
</event>
<exception-handler exception-class="java.lang.IllegalArgumentException">
<script>
System.out.println("node1 Exception Handler OK.");
</script>
</exception-handler>
<transition to="node2"></transition>
</node>
<node name="node2">
<event type="node-enter">
<script>
System.out.println("node2 called.");
</script>
<action class="com.test.action.ExceptionActionHandler"></action>
</event>
<exception-handler exception-class="java.lang.IllegalArgumentException">
<script>
System.out.println("node2 Exception Handler OK.");
</script>
</exception-handler>
<transition to="end-state1"></transition>
</node>
<end-state name="end-state1"></end-state>
</process-definition>
- relates to
-
JBPM-1887 ExceptionHandler may cause infinite loop
- Resolved