Multi-instance collection expression is invoked with inconsistent delegate execution state

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Unresolved
    • Priority: L3 - Default
    • None
    • Affects Version/s: None
    • Component/s: engine

      Current behavior:

      • For a multi-instance activity with a collection expression and an element variable, the collection expression is invoked n + 1 times. Once to determine the number of iterations, and n times to determine the element variable value for every iteration
      • It is possible to use the execution as a variable in the collection expression, e.g. ${myBean.resolveCollection(execution)}.
      • for the invocations that determine the element variable, the execution is not in a state that the DelegateExecution interface provides. For example, the method #getCurrentActivityId returns null

      Expected behavior:

      • All methods in the DelegateExecution interface can be used when resolving a collection expression

      Failing test case: https://github.com/camunda/camunda-bpm-platform/commit/8d7a4e06b33da9730865b3dded147e968119a0d0

      Solution ideas:
      1. Invoke collection expression only once and store the collection somewhere to iterate over it (e.g. next to the multi-instance variables). Downside: collections must be serializable
      2. Make sure the executions are properly initialized before the collection expression is invoked

        This is the controller panel for Smart Panels app

              Assignee:
              Unassigned
              Reporter:
              Thorben Lindhauer
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: