Class BpmnExceptionHandler
- java.lang.Object
-
- org.camunda.bpm.engine.impl.bpmn.helper.BpmnExceptionHandler
-
public class BpmnExceptionHandler extends java.lang.Object
Helper class handling the propagation of BPMN Errors.
-
-
Constructor Summary
Constructors Constructor Description BpmnExceptionHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static BpmnError
checkIfCauseOfExceptionIsBpmnError(java.lang.Throwable e)
Searches recursively through the exception to see if the exception itself or one of its causes is aBpmnError
.protected static boolean
isProcessEngineExceptionWithoutCause(java.lang.Exception exception)
protected static boolean
isTransactionNotActive()
static void
propagateBpmnError(BpmnError error, ActivityExecution execution)
static void
propagateError(java.lang.String errorCode, java.lang.String errorMessage, java.lang.Exception origException, ActivityExecution execution)
static void
propagateException(ActivityExecution execution, java.lang.Exception ex)
Decides how to propagate the exception properly, e.g.protected static void
propagateExceptionAsError(java.lang.Exception exception, ActivityExecution execution)
-
-
-
Method Detail
-
propagateException
public static void propagateException(ActivityExecution execution, java.lang.Exception ex) throws java.lang.Exception
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:
java.lang.Exception
- if no error handler could be found
-
propagateExceptionAsError
protected static void propagateExceptionAsError(java.lang.Exception exception, ActivityExecution execution) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isTransactionNotActive
protected static boolean isTransactionNotActive()
-
isProcessEngineExceptionWithoutCause
protected static boolean isProcessEngineExceptionWithoutCause(java.lang.Exception exception)
-
checkIfCauseOfExceptionIsBpmnError
protected static BpmnError checkIfCauseOfExceptionIsBpmnError(java.lang.Throwable e)
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 java.lang.Exception
- Throws:
java.lang.Exception
-
propagateError
public static void propagateError(java.lang.String errorCode, java.lang.String errorMessage, java.lang.Exception origException, ActivityExecution execution) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-