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

In an execution listener on "end" event, I can differentiate between successful end and cancellation

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Fixed
    • L3 - Default
    • 7.3.0, 7.3.0-alpha3
    • None
    • engine

    Description

      There are two cases in which an execution listener that is registered on the event "end" is called:

      • when the activity it is defined on completes successfully
      • when the process instance is cancelled, for example by a terminate end event or by API (e.g. runtimeService#deleteProcessInstance)

      AT:

      • There is a way to differentiate between these two cases when developing an execution listener

      There are two ways to approach this problem:
      1. We expose the method isCanceled() in the interface DelegateExecution. This way, an execution listener can check whether the activity ended successfully or not
      2. We introduce two new events a listener can register on, perhaps named "success" and "cancel" that differentiate between these cases. For backwards compatibility, we have to keep "end" and ensure that an "end" execution listener is called in both cases

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              smirnov Roman Smirnov
              thorben.lindhauer Thorben Lindhauer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce