02-27-2014 01:33 PM
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
}
}
02-28-2014 02:35 AM
public static void propagateError(String errorCode, ActivityExecution execution) throws Exception {
// find local error handler
String eventHandlerId = findLocalErrorEventHandler(execution, errorCode);
// TODO: merge two approaches (super process / regular process approach)
if(eventHandlerId != null) {
executeCatch(eventHandlerId, execution);
}else {
ActivityExecution superExecution = getSuperExecution(execution);
if (superExecution != null) {
executeCatchInSuperProcess(errorCode, superExecution);
} else {
LOG.info("{} throws error event with errorCode '{}', but no catching boundary event was defined. Execution will simply be ended (none end event semantics).",
execution.getActivity().getId(), errorCode);
execution.end();
}
}
}
org.activiti.engine.impl.bpmn.helper.ErrorPropagation#findLocalErrorEventHandler
finds current event subprocess and that's why it ends in endless loop. Your case can be solved by changing error code.02-28-2014 05:20 AM
When process execution arrives in an error end event, the current path of execution is ended and an error is thrown.
03-01-2014 02:49 AM
03-03-2014 09:39 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.