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

In Scala FEEL Engine, number comparison does not work for type short

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.14.0, 7.14.0-alpha1
    • 7.13.0
    • None
    • None

      Steps to reproduce

      • Define no typeRef for input expression
      • Specify a variable of type short
      • Compare the value with number comparison

      Expected behavior
      Comparison works

      Observed behavior
      The following exception is thrown:
      org.camunda.bpm.dmn.feel.impl.FeelException: failed to evaluate expression '>= 5.66': ValContext(CacheContext(ObjectContext(5))) is not comparable

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

      • No, the specification proposes to represent the FEEL value number with the help of the Java Type java.math.BigDecimal
      • The Java type short is not explicitly supported

      Estimation
      Easy-pick since we only need to add short to the DefaultValueMapper [1]
      [1] https://github.com/camunda/feel-scala/blob/master/feel-engine/src/main/scala/org/camunda/feel/impl/DefaultValueMapper.scala#L46

        This is the controller panel for Smart Panels app

            [CAM-11304] In Scala FEEL Engine, number comparison does not work for type short

            Tassilo Weidner created issue -
            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, number comparison does not work for type short New: [BUG] In Scala FEEL Engine, number comparison does not work for type short
            Tassilo Weidner made changes -
            Fix Version/s New: 7.13.0 [ 15532 ]
            Tassilo Weidner made changes -
            Description Original: *Steps to reproduce*
            * Define no {{typeRef}} for input expression
            * Specify a variable of type short
            * Compare the value with number comparison

            *Expected behavior*
            Comparison works

            *Observed behavior*
            The following exception is thrown:
            {{org.camunda.bpm.dmn.feel.impl.FeelException: failed to evaluate expression '>= 5.66': ValContext(CacheContext(ObjectContext(5))) is not comparable}}
            New: *Steps to reproduce*
            * Define no {{typeRef}} for input expression
            * Specify a variable of type short
            * Compare the value with number comparison

            *Expected behavior*
            Comparison works

            *Observed behavior*
            The following exception is thrown:
            {{org.camunda.bpm.dmn.feel.impl.FeelException: failed to evaluate expression '>= 5.66': ValContext(CacheContext(ObjectContext(5))) is not comparable}}

            *Is this a bug according to the DMN FEEL specification?*
            * No, the specification proposes to represent the FEEL value {{number}} with the help of the Java Type {{java.math.BigDecimal}}
            * The Java type short is not explicitly supported
            Tassilo Weidner made changes -
            Mentioned Roles
            Tassilo Weidner made changes -
            Mentioned Groups
            Tassilo Weidner made changes -
            Description Original: *Steps to reproduce*
            * Define no {{typeRef}} for input expression
            * Specify a variable of type short
            * Compare the value with number comparison

            *Expected behavior*
            Comparison works

            *Observed behavior*
            The following exception is thrown:
            {{org.camunda.bpm.dmn.feel.impl.FeelException: failed to evaluate expression '>= 5.66': ValContext(CacheContext(ObjectContext(5))) is not comparable}}

            *Is this a bug according to the DMN FEEL specification?*
            * No, the specification proposes to represent the FEEL value {{number}} with the help of the Java Type {{java.math.BigDecimal}}
            * The Java type short is not explicitly supported
            New: *Steps to reproduce*
            * Define no {{typeRef}} for input expression
            * Specify a variable of type short
            * Compare the value with number comparison

            *Expected behavior*
            Comparison works

            *Observed behavior*
            The following exception is thrown:
            {{org.camunda.bpm.dmn.feel.impl.FeelException: failed to evaluate expression '>= 5.66': ValContext(CacheContext(ObjectContext(5))) is not comparable}}

            *Is this a bug according to the DMN FEEL 1.2 specification?*
            * No, the specification proposes to represent the FEEL value {{number}} with the help of the Java Type {{java.math.BigDecimal}}
            * The Java type short is not explicitly supported
            Tassilo Weidner made changes -
            Mentioned Roles
            Tassilo Weidner made changes -
            Mentioned Groups
            Tassilo Weidner made changes -
            Description Original: *Steps to reproduce*
            * Define no {{typeRef}} for input expression
            * Specify a variable of type short
            * Compare the value with number comparison

            *Expected behavior*
            Comparison works

            *Observed behavior*
            The following exception is thrown:
            {{org.camunda.bpm.dmn.feel.impl.FeelException: failed to evaluate expression '>= 5.66': ValContext(CacheContext(ObjectContext(5))) is not comparable}}

            *Is this a bug according to the DMN FEEL 1.2 specification?*
            * No, the specification proposes to represent the FEEL value {{number}} with the help of the Java Type {{java.math.BigDecimal}}
            * The Java type short is not explicitly supported
            New: *Steps to reproduce*
            * Define no {{typeRef}} for input expression
            * Specify a variable of type short
            * Compare the value with number comparison

            *Expected behavior*
            Comparison works

            *Observed behavior*
            The following exception is thrown:
            {{org.camunda.bpm.dmn.feel.impl.FeelException: failed to evaluate expression '>= 5.66': ValContext(CacheContext(ObjectContext(5))) is not comparable}}

            *Is this a bug according to the DMN FEEL 1.2 specification?*
            * No, the specification proposes to represent the FEEL value {{number}} with the help of the Java Type {{java.math.BigDecimal}}
            * The Java type short is not explicitly supported

            *Estimation*
            Easy-pick since we only need to add short to the {{DefaultValueMapper}} [1]
            [1] https://github.com/camunda/feel-scala/blob/master/feel-engine/src/main/scala/org/camunda/feel/impl/DefaultValueMapper.scala#L46
            Tassilo Weidner made changes -
            Mentioned Roles
            Tassilo Weidner made changes -
            Mentioned Groups

              nikola.koevski Nikola Koevski
              tassilo.weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: