Index: src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java =================================================================== --- src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java (revision 6273) +++ src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java (working copy) @@ -53,6 +53,15 @@ } } + public static class CountExceptionAction implements ActionHandler { + private static final long serialVersionUID = 1L; + public static int count = 0; + + public void execute(ExecutionContext executionContext) throws Exception { + count++; + } + } + public void testExceptionHandlerThrowingException() { String xml = "" + "" + @@ -136,4 +145,52 @@ // exception is handled correctly assertTrue("expected " + pi + " to have ended", pi.hasEnded()); } + + public void testMultipleExceptionHandler() { + String xml = "" + + "" + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + ""; + + CountExceptionAction.count = 0; + + ProcessDefinition def = ProcessDefinition.parseXmlString(xml); + ProcessInstance pi = def.createProcessInstance(); + + // Do not throw DelegationException + pi.signal(); + + // 2 exceptions are handled + assertEquals(2, CountExceptionAction.count); + } + } Index: src/main/java/org/jbpm/graph/def/GraphElement.java =================================================================== --- src/main/java/org/jbpm/graph/def/GraphElement.java (revision 6273) +++ src/main/java/org/jbpm/graph/def/GraphElement.java (working copy) @@ -338,6 +338,7 @@ if (exceptionHandler != null) { executionContext.setException(exception); exceptionHandler.handleException(this, executionContext); + executionContext.setException(null); return; } }