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

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

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: 7.13.0
    • Fix Version/s: 7.14.0, 7.14.0-alpha1
    • Component/s: None
    • Labels:
      None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: