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

Inaccurate rule execution in executable model in RHDM 7

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.9.1.GA
    • 7.8.0.GA
    • BRE
    • None
    • False
    • False
    • Release Notes
    • CR1
    • +
    • Undefined
    • 2020 Week 46-48 (from Nov 9), 2020 Week 49-51 (from Nov 30)

      Model compile generate code that inaccurately fires the rule in comparison to non executable model code created rulebase or in 6.x.

      rule "test_rule"
       dialect "java"
       when
       $nanTest : NanTest( $testDouble1 : testDouble1 , $testDouble2 : testDouble2 , $testDouble1 + 10 > $testDouble2 , testBoolean!=null, testBoolean==false) 
      then
       System.out.println("rule_a fired ");
       $nanTest.setTestBoolean(true);
       update($nanTest);
      end
      
      
      
         DoubleNaNTest nan = new DoubleNaNTest();
         nan.setTestBoolean(false);
         nan.setTestDouble1(Double.NaN);//Double.NaN
         nan.setTestDouble2(100.0);
         KieSession ksession = sumKieBaseShort.newKieSession();
         ksession.insert(nan);
      

      Expected:
      Above rule should not fired in executable model.

      Actual result:
      Above rule fired in executable model.

              mfusco@redhat.com Mario Fusco
              rhn-support-abhumbe Abhijit Humbe
              Daniel Rosa Daniel Rosa
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: