The correct way is
modify( $patient ){
incNbFactRisque()
}
-W
Here's one exemple of incrementation :
IN drl file :
rule "FacteurRisqueHomme"
when
$patient : PatientDto()
eval( $patient.getValue( Constants.RULE_KEY_SEXE ).equals( Constants.SEXE_HOMME )
&& $patient.getDoubleValue( Constants.RULE_KEY_AGE ) > $patient.getDoubleProperties("valeur.age.homme") )
then
$patient.incNbFactRisque();
System.out.println("FacteurRisqueHomme vérifié");
end
In PatientDto :
/**
* Permet l'incrémentation du nombre de risque (depuis une règle drools)
*/
public void incNbFactRisque() {
nbFactRisque++;
}
Le 01/03/2011 10:47, Wolfgang Laun a écrit :The correct list is rules-users@lists.jboss.org
On 1 March 2011 10:15, Nico ROEDERER <ino.nicolas@gmail.com> wrote:
(1) -> yes because when I print the value, the value is correct ( = 2 ). Not the eval.
Show us the rule where you increment.
(2) -> yes, true. My list is in alphabtic mode...
This does not matter for the order those rules will fire.
(3) -> Every test I make made the wrong result
Obvious - the problem is somewhere else, not in the test.
-W
_______________________________________________ rules-dev mailing list rules-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev