Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-2026

exec-model : in operator with BigDecimal and int does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 7.13.5.GA
    • BRE
    • False
    • Hide

      None

      Show
      None
    • False
    • Workaround Exists
    • Hide

      Specify BigDecimal object explicitly in In operator.

      e.g.

      rule R1 
      when 
          $fact: Fact( bd in ( new BigDecimal("100"), new BigDecimal("200"))) then 
          ...

       

      Show
      Specify BigDecimal object explicitly in In operator. e.g. rule R1 when $fact: Fact( bd in ( new BigDecimal("100"), new BigDecimal("200"))) then ...  
    • Hide

      1. $ unzip reproducer-BD-in-operator.zip
      2. $ cd reproducer-BD-in-operator
      3.1 run with executable model
      $ ./run-exec-model.sh => Rule1 does not fire.
      3.2 run with non-executable model
      $ ./run-non-exec-model.sh => Rule1 fires as expected.

      Show
      1. $ unzip reproducer-BD-in-operator.zip 2. $ cd reproducer-BD-in-operator 3.1 run with executable model $ ./run-exec-model.sh => Rule1 does not fire. 3.2 run with non-executable model $ ./run-non-exec-model.sh => Rule1 fires as expected.

      In operator with integer literal values like the following does not work with a BigDecimal property.

      e.g.

      rule R1
          when
              $fact: Fact( bd in (100, 200))
          then
              ...

      This rule doesn't match when property 'bd' is BigDecimal("100") in executable model, while it matches in non-executable model.

              mfusco@redhat.com Mario Fusco
              rhn-support-hmiura Hiroko Miura
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: