08-14-2014 04:01 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();
}
}
}
public static void propagateError(String errorCode, ActivityExecution execution) throws Exception {
while (execution != null) {
String eventHandlerId = findLocalErrorEventHandler(execution, errorCode);
if (eventHandlerId != null) {
executeCatch(eventHandlerId, execution, errorCode);
break;
}
execution = getSuperExecution(execution);
};
if (execution == null) {
throw new BpmnError(errorCode, "No catching boundary event found for error with errorCode '"
+ errorCode + "', neither in same process nor in parent process");
}
}
08-14-2014 04:34 AM
08-19-2014 05:38 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.