[rules-dev] Conversion Error in DRL file
ino.nicolas
ino.nicolas at gmail.com
Thu Feb 10 10:00:07 EST 2011
Hi. I've got a trouble in a drl file.
Here's my file :
#created on: 9 févr. 2011
package regles
# import
import com.compagny.rules.metier.dto.PatientDto;
# global variables
global Integer surPoids;
global Integer diffTaille;
global Integer temperatureElevee;
global Integer temperatureCritique;
global Integer tropGrand;
rule "1- aTraiterUrgent"
when
$patient : PatientDto()
eval( $patient.getDoubleValue("temperature") > temperatureCritique )
then
$patient.addCommentaire( " Le patient " + $patient.getNomPatient() + " est
à traiter d'URGENCE. " );
end
rule "2- estFievreux"
when
$patient : PatientDto()
eval( $patient.getDoubleValue("temperature") >
temperatureElevee.doubleValue() )
then
$patient.addCommentaire( $patient.getDoubleValue("temperature") +
" - Le patient " + $patient.getNomPatient() + " est fievreux. " );
end
The both rules are nearly the same. Except the comparator (
temperatureCritique and temperatureElevee).
My problem :
- If I put the '.doubleValue()' to the both rule, the second rule will never
be launched.
- If I don't put the '.doubleValue()' in the first and the second rule, the
second rule will never be launched.
- If I put the '.doubleValue()' in one of the two rules (never mind if it's
in the first or second one), both of the rules are launched.
I don't know what I did wrong...
Could you please help me ?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Conversion-Error-in-DRL-file-tp2466448p2466448.html
Sent from the Drools - Dev mailing list archive at Nabble.com.
More information about the rules-dev
mailing list