Class BpmnExceptionHandler
java.lang.Object
org.camunda.bpm.engine.impl.bpmn.helper.BpmnExceptionHandler
Helper class handling the propagation of BPMN Errors.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static BpmnErrorSearches recursively through the exception to see if the exception itself or one of its causes is aBpmnError.protected static booleanisProcessEngineExceptionWithoutCause(Exception exception) protected static booleanstatic voidpropagateBpmnError(BpmnError error, ActivityExecution execution) static voidpropagateError(String errorCode, String errorMessage, Exception origException, ActivityExecution execution) static voidpropagateException(ActivityExecution execution, Exception ex) Decides how to propagate the exception properly, e.g.protected static voidpropagateExceptionAsError(Exception exception, ActivityExecution execution)
-
Constructor Details
-
BpmnExceptionHandler
public BpmnExceptionHandler()
-
-
Method Details
-
propagateException
Decides how to propagate the exception properly, e.g. as bpmn error or "normal" error.- Parameters:
execution- the current executionex- the exception to propagate- Throws:
Exception- if no error handler could be found
-
propagateExceptionAsError
protected static void propagateExceptionAsError(Exception exception, ActivityExecution execution) throws Exception - Throws:
Exception
-
isTransactionNotActive
protected static boolean isTransactionNotActive() -
isProcessEngineExceptionWithoutCause
-
checkIfCauseOfExceptionIsBpmnError
Searches recursively through the exception to see if the exception itself or one of its causes is aBpmnError.- Parameters:
e- the exception to check- Returns:
- the BpmnError that was the cause of this exception or null if no BpmnError was found
-
propagateBpmnError
public static void propagateBpmnError(BpmnError error, ActivityExecution execution) throws Exception - Throws:
Exception
-
propagateError
public static void propagateError(String errorCode, String errorMessage, Exception origException, ActivityExecution execution) throws Exception - Throws:
Exception
-