As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
A() { // Parent Process try { B(); // Sub Process } catch (CustomError e) { // Event Sub Process ErrorStartEvent doSomething(); } } B() { try { doSomethingElse(); } catch (CustomError e) { // Event Sub Process ErrorStartEvent doYetSomething(); throw e; // This ErrorEndEvent is never caught by A } }
<br> public static void propagateError(String errorCode, ActivityExecution execution) throws Exception {<br> // find local error handler<br> String eventHandlerId = findLocalErrorEventHandler(execution, errorCode); <br><br> // TODO: merge two approaches (super process / regular process approach)<br> if(eventHandlerId != null) {<br> executeCatch(eventHandlerId, execution);<br> }else {<br> ActivityExecution superExecution = getSuperExecution(execution);<br> if (superExecution != null) {<br> executeCatchInSuperProcess(errorCode, superExecution);<br> } else {<br> LOG.info("{} throws error event with errorCode '{}', but no catching boundary event was defined. Execution will simply be ended (none end event semantics).",<br> execution.getActivity().getId(), errorCode);<br> execution.end();<br> }<br> }<br> }<br>
org.activiti.engine.impl.bpmn.helper.ErrorPropagation#findLocalErrorEventHandler
When process execution arrives in an error end event, the current path of execution is ended and an error is thrown.