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

Missing token in runtime for active user task after process instance migration

    XMLWordPrintable

Details

    Description

      Environment (Required on creation):

      Camunda 7.14.x

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      Steps to reproduce (Required on creation):

      1. Create a sample BPMN sample.bpmn which contains a user task and a boundary event on User Task.
      2. Deploy it and start a process instance
      3. In runtime view of process definition/process instance, 1 token should be waiting at User task
      4. Remove the boundary event from User Task in BPMN and deploy it again
      5. Migrate the old process instance to a newer version
      6. Go to runtime view of process instance/process definition
      7. The token is missing in the User task

      Observed Behavior (Required on creation):

      The token is missing in the User task in runtime view of process instance/process definition

      Expected behavior (Required on creation):

      The token should be there in the User task in runtime view of process instance/process definition

      Root Cause (Required on prioritization):

      1. An active User Task with an attached boundary event is represented by the following execution tree:
        Process Instance
              |
           Activity A
        
        • Due to the boundary event, the tree defines a context in which events can be received. This context is valid for the lifetime of the user task instance. It, therefore, requires an extra execution.
      2. An active User Task without an attached boundary event is represented by the following execution tree:
        Process Instance
        
        • There is only a single execution that represents the process instance itself
      3. When the process instance is migrated, the execution tree is compacted and becomes a non-scope execution by transferring the necessary child execution information to the parent execution before the child execution is removed
      4. The active state is currently not transferred which leads to the unexpected behavior

      Solution Ideas (Optional):

      In MigratingActivityInstance#becomeNonScope, set the active state from the child to the parent execution.

      Hints (Optional):

      • ACT_RU_EXECUTION#IS_ACTIVE_ flag for UserTask activity got updated from "true" to "false" during process instance migration.
      • Once Async before the flag is added to User Task:
        • Process instance migration was successful, but the token was missing in User Task from runtime view.
      • With External task and the boundary event
        • Process instance migration was successful, and 1 token was active in External Task activity in runtime view.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              tassilo.weidner Tassilo Weidner
              garima.yadav Garima Yadav
              Tassilo Weidner Tassilo Weidner
              Tobias Metzke-Bernstein Tobias Metzke-Bernstein
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce