Class BpmnExceptionHandler

  • public class BpmnExceptionHandler
    extends Object
    Helper class handling the propagation of BPMN Errors.
    • Constructor Detail

      • BpmnExceptionHandler

        public BpmnExceptionHandler()
    • Method Detail

      • propagateException

        public static void propagateException​(ActivityExecution execution,
                                              Exception ex)
                                       throws Exception
        Decides how to propagate the exception properly, e.g. as bpmn error or "normal" error.
        execution - the current execution
        ex - the exception to propagate
        Exception - if no error handler could be found
      • isTransactionNotActive

        protected static boolean isTransactionNotActive()
      • isProcessEngineExceptionWithoutCause

        protected static boolean isProcessEngineExceptionWithoutCause​(Exception exception)
      • checkIfCauseOfExceptionIsBpmnError

        protected static BpmnError checkIfCauseOfExceptionIsBpmnError​(Throwable e)
        Searches recursively through the exception to see if the exception itself or one of its causes is a BpmnError.
        e - the exception to check
        the BpmnError that was the cause of this exception or null if no BpmnError was found