[jboss-jira] [JBoss JIRA] (DROOLS-979) the cache fact affect execution result

Kevin Xu (JIRA) issues at jboss.org
Thu Nov 12 06:16:00 EST 2015


Kevin Xu created DROOLS-979:
-------------------------------

             Summary: the cache fact  affect execution result
                 Key: DROOLS-979
                 URL: https://issues.jboss.org/browse/DROOLS-979
             Project: Drools
          Issue Type: Bug
          Components: kie server
    Affects Versions: 6.3.0.Final
         Environment: TOMCAT 7  
kie server 6.3
            Reporter: Kevin Xu
            Assignee: Edson Tirelli


i use the demo data to run the code,the demo data is :demo / uf-playground / mortgages/;

there is a  Underage.rdrl rule,the code is below:

package org.mortgages;

import org.mortgages.LoanApplication;
import org.mortgages.Applicant;

rule "Underage"
	salience 10
	dialect "mvel"
	when
		application : LoanApplication( )
		Applicant( age < "21" )
	then
		application.setApproved( false );
		application.setExplanation( "Underage" );
		retract( application );
end


and i use java client to insert fact and execute the rules

the first time ,i set age is 18,then the return is:
  <result identifier="loanApplication3">
    <org.mortgages.LoanApplication>
      <amount>131001</amount>
      <approved>false</approved>
      <deposit>2000</deposit>
      <explanation>Underage</explanation>
      <lengthYears>30</lengthYears>
    </org.mortgages.LoanApplication>
  </result>

but when i modify the age to 30,the return is the same,the approved is {color:red}false {color}too,but the approved need to be true。

is when i restart the kie server ,then i execute the client code, the server will return the correct value :
      <approved>true</approved>

why when i restart the kieserver ,and then i can get the correct result?
this is a bug or there is a api to control this?




--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jboss-jira mailing list