Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-6872

Error handling of camunda service calls fails with engine-spring

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Won't Fix
    • Icon: L3 - Default L3 - Default
    • None
    • 7.5.x
    • 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

              Unassigned Unassigned
              jan.galinski@holisticon.de Jan Galinski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: