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

In Scala FEEL Engine, unary-test comparison without braces cannot be evaluated

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.17.0, 7.15.8, 7.16.2, 7.17.0-alpha1
    • 7.13.0
    • None
    • None

      Steps to reproduce
      Evaluate the expression 8 > 7 as unary test

      Observed behavior
      The following error message is shown:

      failed to parse expression '8 > 7': [1.3] failure: end of input expected

      Expected behavior

      • The expression can be evaluated
      • No error message is shown

      Alternative Solution
      The expression (8 > 7) can be evaluated successfully

      Is this a bug according to the DMN FEEL 1.2 specification?

      • Yes!
      • The DMN 1.1 spec on pg. 105 ("10.3.1.2 Grammar rules") says:
      • The DMN 1.1 spec on pg. 107 ("10.3.1.2 Grammar rules") says:
      • Simple positive unary tests do not need any braces
      • The structure of a comparison is: expression , ( "=" | "!=" | "<" | "<=" | ">" | ">=" ) , expression
        • The braces in the grammar rule are used to express that one of the allowed comparison keywords can be used
        • "Language keywords are enclosed in double quotes in the grammar rules" cf. pg. 107

      Hint

      • The failing expression can be used as simple expression.
      • Unignore test case [1]

      Estimation
      Unknown, it works when variables are compared and in output entries.

      [1] https://github.com/camunda/camunda-bpm-platform/blob/master/engine-dmn/engine/src/test/java/org/camunda/bpm/dmn/engine/feel/BreakingScalaFeelBehaviorTest.java#L61-L71

        This is the controller panel for Smart Panels app

            [CAM-11269] In Scala FEEL Engine, unary-test comparison without braces cannot be evaluated

            Tassilo Weidner created issue -
            Tassilo Weidner made changes -
            Description Original: * 8 > 7 (/)
            * (8 > 7) (/)
            New: 8 > 7 (x)
            (8 > 7) (/)
            Tassilo Weidner made changes -
            Attachment New: FeelLegacy_equals_boolean.dmn [ 31330 ]
            Tassilo Weidner made changes -
            Issue Type Original: Task [ 3 ] New: Sub-task [ 6 ]
            Parent New: CAM-11184 [ 47438 ]
            Tassilo Weidner made changes -
            Summary Original: In Scala FEEL Engine, unary-test comparison without braces cannot be evaluated New: [BREAKING CHANGE] In Scala FEEL Engine, unary-test comparison without braces cannot be evaluated
            Tassilo Weidner made changes -
            Link New: This issue is related to CAM-11282 [ CAM-11282 ]
            Tassilo Weidner made changes -
            Summary Original: [BREAKING CHANGE] In Scala FEEL Engine, unary-test comparison without braces cannot be evaluated New: [BUG] In Scala FEEL Engine, unary-test comparison without braces cannot be evaluated
            Tassilo Weidner made changes -
            Fix Version/s New: 7.13.0 [ 15532 ]
            Tassilo Weidner made changes -
            Attachment New: Screenshot 2020-02-25 at 15.24.35.png [ 32044 ]
            Tassilo Weidner made changes -
            Attachment New: Screenshot 2020-02-25 at 15.25.49.png [ 32045 ]
            Tassilo Weidner made changes -
            Description Original: 8 > 7 (x)
            (8 > 7) (/)
            New: *Steps to reproduce*
             Evaluate the expression {{8 > 7}} as unary test

            *Observed behavior*
             The following error message is shown:
            {code:java}
            failed to parse expression '8 > 7': [1.3] failure: end of input expected{code}
            *Expected behavior*
             * The expression can be evaluated
             * No error message is shown

            *Alternative Solution*
             The expression {{(8 > 7)}} can be evaluated successfully

            *Why is this a bug according to the DMN spec?*
             * The DMN 1.1 spec on pg. 105 ("10.3.1.2 Grammar rules") says:
             !Screenshot 2020-02-25 at 15.24.35.png|thumbnail!
             * The DMN 1.1 spec on pg. 107 ("10.3.1.2 Grammar rules") says:
             !Screenshot 2020-02-25 at 15.25.49.png|thumbnail!
             * Simple positive unary tests do not need any braces
             * The structure of a comparison is: {{expression , ( "=" | "!=" | "<" | "<=" | ">" | ">=" ) , expression}}
             ** The braces in the grammar rule are used to express that one of the allowed comparison keywords can be used
             ** "Language keywords are enclosed in double quotes in the grammar rules" cf. pg. 107
            Tassilo Weidner made changes -
            Mentioned Roles
            Tassilo Weidner made changes -
            Mentioned Groups

              miklas.boskamp Miklas Boskamp
              tassilo.weidner Tassilo Weidner
              Miklas Boskamp Miklas Boskamp
              Tassilo Weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: