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

Error boundary event triggers when error is thrown in subsequent synchronous task

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.4.0, 7.3.1, 7.4.0-alpha1
    • None
    • engine
    • None

    Description

      Current behavior:

      Following process model:
      start -> service task 1 -> service task 2 -> end

      Service task 1 has a boundary error event.

      No async continutations. It is important that service task 1 and 2 are executed in one transaction.

      Service task 2 throws an exception. The scope execution for the boundary event on service task 1 exists and the error propagation is attempted for that task.
      This fails with a NullPointerException.

      Hints:
      Could be due to the recursive execution of activities and the following code in org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior#execute that catches all subsequent exceptions:

      ActivityBehavior activityBehaviorInstance = getActivityBehaviorInstance(execution);
      try {
      activityBehaviorInstance.execute(execution);
      } catch (BpmnError error) {
      ErrorPropagation.propagateError(error, execution);
      } catch (Exception ex) {
      ErrorPropagation.propagateException(ex, execution);
      }

      Similar code exists in the other service task behaviors, e.g. org.camunda.bpm.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior and the respective #signal methods as well

      Failing test cases (do not cover all of the cases): https://github.com/camunda/camunda-bpm-platform/commit/29057fdcc5911d7ad80695f122255ccb964fc707

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

                thorben.lindhauer Thorben Lindhauer
                thorben.lindhauer Thorben Lindhauer
                Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Salesforce