How, exactly, do you set the globals and how do you create the PatientDTO fact?<br><br>If the temperature is higher than temperatureCritique &gt;=  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">&lt;<a href="mailto:ino.nicolas@gmail.com">ino.nicolas@gmail.com</a>&gt;</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&#39;ve got a trouble in a drl file.<br>
Here&#39;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 &quot;1- aTraiterUrgent&quot;<br>
        when<br>
                $patient : PatientDto()<br>
                eval( $patient.getDoubleValue(&quot;temperature&quot;) &gt; temperatureCritique )<br>
        then<br>
                $patient.addCommentaire( &quot; Le patient &quot; + $patient.getNomPatient() + &quot; est<br>
ŕ traiter d&#39;URGENCE. &quot; );<br>
end<br>
<br>
rule &quot;2- estFievreux&quot;<br>
        when<br>
                $patient : PatientDto()<br>
                eval( $patient.getDoubleValue(&quot;temperature&quot;) &gt;<br>
temperatureElevee.doubleValue() )<br>
        then<br>
                $patient.addCommentaire( $patient.getDoubleValue(&quot;temperature&quot;) +<br>
                        &quot; - Le patient &quot; + $patient.getNomPatient() + &quot; est fievreux. &quot; );<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 &#39;.doubleValue()&#39; to the both rule, the second rule will never<br>
be launched.<br>
- If I don&#39;t put the &#39;.doubleValue()&#39; in the first and the second rule, the<br>
second rule will never be launched.<br>
- If I put the &#39;.doubleValue()&#39; in one of the two rules (never mind if it&#39;s<br>
in the first or second one), both of the rules are launched.<br>
<br>
I don&#39;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>