If exception handlers are defined in multiple nodes, only the first one is triggered
during one execution
---------------------------------------------------------------------------------------------------------
Key: JBPM-2854
URL:
https://jira.jboss.org/jira/browse/JBPM-2854
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.2.8
Reporter: Toshiya Kobayashi
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>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira