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

Cdi Variable Scope does not work for first instance of Parallel Multi Instance

    XMLWordPrintable

Details

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

    Description

      see: org.camunda.bpm.engine.cdi.test.impl.context.MultiInstanceTest.testParallelMultiInstanceServiceTasks()

      Problem Description:

      • there is a three-level execution hierarchy: Process Instance <--- Scope Execution <--- Concurrent Execution
      • the element variable is set on the concurrent executions, but BusinessProcess#getVariable accesses the scope execution for the first MI instance. Thus, the variable cannot be resolved
      • BusinessProcess#getVariable relies on the current execution context, i.e. Context.getExecutionContext()
      • the execution context is updated whenever atomic operations are executed
      • the first MI instance is not part of an atomic operation (cf ParallelMultiInstanceActivityBehavior and MultiInstanceActivityBehavior#executeOriginalBehavior ll 197-201), thus the first concurrent execution is not pushed onto the execution stack

      Solution Possibilities:
      1. Quick: push the first concurrent execution onto the execution context from within MultiInstanceActivityBehavior#executeOriginalBehavior. Ensure that the context is removed again under all circumstances.
      2. Implement MI as a proper concept in the PVM.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

                thorben.lindhauer Thorben Lindhauer
                meyer Daniel Meyer
                Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Salesforce