The correct way is
modify( $patient ){
incNbFactRisque()
}
-W
On 1 March 2011 10:52, Nico ROEDERER <[email protected]> wrote:
> 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 [email protected]
>
>
> On 1 March 2011 10:15, Nico ROEDERER <[email protected]> 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
> [email protected]https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
> _______________________________________________
> rules-dev mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
_______________________________________________
rules-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-dev