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

Inconsistent task listener invocation on cascading deletion of called process instances

    XMLWordPrintable

Details

    Description

      Scenario:

      • a process instance X that has called another process instance Y
      • Y is active and in a user task A
      • Task listener on START and END event of A that accesses stable execution properties, such as activity instance id (stable with respect to tree compaction/expansion)
      • X is deleted, cascading to Y

      Current behavior:

      • END task listener on A sees an invalid activity instance id

      Expected behavior:

      • END task listener on A sees the correct activity instance id (which should be the same instance id that was seen during the START listener invocation)
      • phrased differently: the END listener should be invoked before the activity instance is destroyed; this makes sense, because the task is bound to the lifetime of the activity instance, so the task should be deleted before the activity instance

      Reason:

      • Tasks that are removed during delete cascade are deleted after their owning execution is cleared and leaves the current activity instance

      Another variant of this:

      • Variables of the owning execution are not accessible anymore when the END listener is executed; similar reason: variables should only be cleared after the task has been removed

      Test case:

      Side notes:

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce