<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
<font size="-1">Hi,<br>
<br>
I've got an other problem with an eval function. <br>
I will try to discribe the path to the error.<br>
<br>
I've got a repository where some people can put rules with .drl
extension.<br>
My program is listing this repository and execute every rule in
this repository.<br>
<br>
At the begining, I've got a 'PatientDto' who have a property :<br>
int nbFactRisque;<br>
(with getters and setters)<br>
<br>
Some rules increments this number.<br>
<br>
In the last rule (the rules are executed in alphabetic mode) I'm
testing this number like this :<br>
<br>
rule "RisqueNormal"<br>
when<br>
$patient : PatientDto()<br>
eval( $patient.getNbFactRisque() == 0)<br>
then <br>
$patient.addDonnees( Constants.CLE_RISQUEPATIENT,
Constants.RISQUE_NORMAL );<br>
System.out.println("RisqueNormal vérifié." +
$patient.getNbFactRisque() + "Facteurs.");<br>
end<br>
<br>
Here's my problem :<br>
The 'Then' traitement is always executed so the eval always think
that </font><font size="-1">$patient.getNbFactRisque() is equal
to 0.<br>
But the system.out.println() show me that </font><font size="-1">
$patient.getNbFactRisque() = 2 !<br>
<br>
</font><font size="-1">Here's the output : "RisqueNormal
vérifié.2Facteurs.". <br>
<br>
Perhaps I did something wrong ? Can someone help me ?<br>
Thank you.<br>
</font>
</body>
</html>