In DMN JUEL expression nested property is shadowed by the context variable with the same name

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Fixed
    • Priority: L3 - Default
    • 7.11.0, 7.11.0-alpha5
    • Affects Version/s: 7.10.0, 7.11.0-alpha3
    • Component/s: dmn-engine, engine
    • None

      In DMN JUEL expression nested property is shadowed by the context variable with the same name (if such a variable is present).

      For example, expression ${a.b} with evaluation context

      { "a" = {"b" = "INNER_B"},
      "b"="B_FROM_CONTEXT"}

      produces "B_FROM_CONTEXT" instead of "INNER_B".

      As another example of this bug, see https://forum.camunda.org/t/error-in-variable-resolution-juel/1703

      The problem is caused by the bug in the VariableContextElResolver implementation - it always tries to resolve the 'property' from variable context, regardless the 'base' (that represents property's container) is present or not.

      The problem is present in both standalone version of DMN engine and BPM platform version that contains different versions of VariableContextElResolver (with the same bug).

      The same VariableContextElResolver bug is the cause of CAM-5520. In this case VariableContextElResolver tries to interpret property representing index (type Long) as context variable name (String), resulting in ClassCastException.

        This is the controller panel for Smart Panels app

              Assignee:
              Thorben Lindhauer
              Reporter:
              Mindaugas Plukas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: