How, exactly, do you set the globals and how do you create the PatientDTO fact?<br><br>If the temperature is higher than temperatureCritique >= temperatureElevee, both rules will fire.<br><br>-W<br><br><div class="gmail_quote">
On 10 February 2011 16:00, ino.nicolas <span dir="ltr"><<a href="mailto:ino.nicolas@gmail.com">ino.nicolas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi. I've got a trouble in a drl file.<br>
Here's my file :<br>
<br>
#created on: 9 févr. 2011<br>
package regles<br>
<br>
# import<br>
import com.compagny.rules.metier.dto.PatientDto;<br>
<br>
# global variables<br>
global Integer surPoids;<br>
global Integer diffTaille;<br>
global Integer temperatureElevee;<br>
global Integer temperatureCritique;<br>
global Integer tropGrand;<br>
<br>
rule "1- aTraiterUrgent"<br>
when<br>
$patient : PatientDto()<br>
eval( $patient.getDoubleValue("temperature") > temperatureCritique )<br>
then<br>
$patient.addCommentaire( " Le patient " + $patient.getNomPatient() + " est<br>
ŕ traiter d'URGENCE. " );<br>
end<br>
<br>
rule "2- estFievreux"<br>
when<br>
$patient : PatientDto()<br>
eval( $patient.getDoubleValue("temperature") ><br>
temperatureElevee.doubleValue() )<br>
then<br>
$patient.addCommentaire( $patient.getDoubleValue("temperature") +<br>
" - Le patient " + $patient.getNomPatient() + " est fievreux. " );<br>
end<br>
<br>
<br>
The both rules are nearly the same. Except the comparator (<br>
temperatureCritique and temperatureElevee).<br>
My problem :<br>
- If I put the '.doubleValue()' to the both rule, the second rule will never<br>
be launched.<br>
- If I don't put the '.doubleValue()' in the first and the second rule, the<br>
second rule will never be launched.<br>
- If I put the '.doubleValue()' in one of the two rules (never mind if it's<br>
in the first or second one), both of the rules are launched.<br>
<br>
I don't know what I did wrong...<br>
Could you please help me ?<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Conversion-Error-in-DRL-file-tp2466448p2466448.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Conversion-Error-in-DRL-file-tp2466448p2466448.html</a><br>
Sent from the Drools - Dev mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</font></blockquote></div><br>