Error handling of camunda service calls fails with engine-spring

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Won't Fix
    • Priority: L3 - Default
    • None
    • Affects Version/s: 7.5.x
    • Component/s: engine

      What are the steps to reproduce your problem?

      Use spring engine setup.
      try to do error handling on camunda service call, for example raise a bpmnError when dmn evaluation fails:

       @Component
          public static class EvaluateDmn implements JavaDelegate {
      
              @Override
              public void execute(DelegateExecution execution) throws Exception {
                  try {
                      execution.getProcessEngineServices().getDecisionService()
                              .evaluateDecisionByKey("does not exist")
                              .variables(Variables.createVariables())
                              .evaluate();
                  } catch (Exception e) {
                      throw new BpmnError("DmnFailed", e.getMessage());
                  }
              }
          }
      

      What is the problem?

      Bpmn error is not handled, instead exception is thrown, process is rolled back:

      org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
      

      What would be the expected behavior:

      Exception is caught, Bpmn Error is raised, process continues

      Hints (optional):

        This is the controller panel for Smart Panels app

              Assignee:
              Unassigned
              Reporter:
              Jan Galinski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: