[jboss-jira] [JBoss JIRA] (DROOLS-4386) Wrong matched rules set were fired when one of the condition having empty cell in drools 6.5.0 using Jdk 1.8

Rahul Ramachar (Jira) issues at jboss.org
Thu Aug 1 05:30:01 EDT 2019


Rahul Ramachar created DROOLS-4386:
--------------------------------------

             Summary: Wrong matched rules set were fired when one of the condition having empty cell in drools 6.5.0 using Jdk 1.8
                 Key: DROOLS-4386
                 URL: https://issues.jboss.org/browse/DROOLS-4386
             Project: Drools
          Issue Type: Bug
          Components: decision tables
    Affects Versions: 6.5.0.Final
         Environment: Windows, Java 1.8 and drools 6.5.0.Final 
            Reporter: Rahul Ramachar
            Assignee: Mario Fusco


In JDK 1.7 we were using Drools 5.3.0.Final version and we are migrating to jdk 1.8 so drools 5.3.0.Final was not supported in which we were using Package Builder.
We migrated JDK 1.8 with drools  6.5.0.Final which uses Kie API to implement rules

Below is the decision table I am using:

Customer Rule:

                      Condition             Condition          Action
                  ---------------------------------------------------
Rule NO.          Type                     Years              Discount
                  ---------------------------------------------------
1                    "Individual"                   5                    15
2                    "Individual"                   3                    10
3                    "Individual"                                         20

if I insert customer object  as "Type" = Individual and "Years" = 5
after fireAllRules
It fires two rules i.e Rule no. 1 and 3 and gives the 3rd Rule number as result instead of Rule number 1, inturn gives Discount as 20 instead of 15 which is wrong result.
if I insert customer object  as "Type" = Individual and "Years" = 3
after fireAllRules
It fires two rules i.e Rule no. 2 and 3 and gives the 3rd rule number as result instead of Rule number 2, inturn gives Discount as 20 instead of 10 which is wrong result.

Exact rule match is not happening and providing wrong results.

Could you please give the solution for this it is breaking so many rules in the application. 




--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list