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

Accumulate: min with BigDecimal doesn't work as expected when drools.propertySpecific=ALLOWED

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.2.1.GA, 7.5.1.GA
    • Fix Version/s: 7.7.0.GA
    • Component/s: BRE
    • Labels:
    • Target Release:
    • Fix Build:
      CR1
    • Steps to Reproduce:
      Hide

      run attached reproducer by mvn clean test.

      Show
      run attached reproducer by mvn clean test.
    • Affects:
      Release Notes
    • Sprint:
      2020 Week 01-03 (from Dec 30)
    • QE Test Coverage:
      +

      Description

      Regarding accumulate, min function with BigDecimal does not work as expected when drools.propertySpecific is "ALLOWED".

      The following rule worked with BRMS6.1.4(6.2.0.Final-redhat-13).

      rule "rule1_BigDecimal"
          agenda-group "BigDecimal"
          when  
              accumulate( Fact( $bdVal: bdVal), $minVal : min($bdVal))
              accumulate( Fact( $bdVal2: bdVal, $bdVal2 > $minVal), $minVal2 : min($bdVal2))
           
              $minFact: Fact( bdVal == new BigDecimal($minVal.intValue()))
              $minFact2: Fact( bdVal == new BigDecimal($minVal2.intValue()))
          then
          ...
       end
      

      But after upgrading to RHPAM 7 and setting drools.propertySpecific=ALLOWED, this does not work.
      i.e. rule fires one more time than expected even though there is only one fact at the last iteration.

      This does not happen at least with Long type.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mfusco Mario Fusco
                  Reporter:
                  hiroko Hiroko Miura
                  Tester:
                  Daniel Rosa
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: