Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-5692

Inaccurate rule execution in executable model in RHDM 7

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.44.0.Final
    • core engine
    • None
    • 2020 Week 40-42 (from Sep 28)
    • Undefined
    • NEW
    • NEW
    • ---
    • ---

      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 : DoubleNaNTest( $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
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: