docs: protected BpmnError checkIfCauseOfExceptionIsBpmnError(Throwable e) {
      if (e instanceof BpmnError) {
        return (BpmnError) e;
      } else if (e.getCause() == null) {
        return null;
      }
      return checkIfCauseOfExceptionIsBpmnError(e.getCause());
    }