RE : [rules-users] Problem with updated facts

Héron Nicolas nheron at sopragroup.com
Wed Mar 11 16:07:32 EDT 2009


Hello Thomas,
I a rule is fired before and sets the value to 100, the current rule that 
request the amont to be bigger than 150 will never fire.
So it is normal
Au plaisir de te relire
Nicolas


-------- Message d'origine--------
De: rules-users-bounces at lists.jboss.org de la part de thomas moncieu
Date: mer. 11/03/2009 16:58
À: rules-users at lists.jboss.org
Objet : [rules-users] Problem with updated facts
 
Hi,
I have a problem when updating fields in rules :

Here's the rule :

when
t : Bill($amount : totalAmount,  totalAmount > (new
Double(150.0).doubleValue()));
then
System.out.println("tot : " + $tot);
end

The original totalAmount  is 200.
A fact update sets the totalAmount at 100 (with an update of the facthandle
that I can see in the debugger of the working memory) so the condition of
the rule does not be true.
Nevertheless, the System.out is made and prints 100.

I use Statefull session and set shadow facts to true.

Thanks for helping me !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090311/02de5062/attachment.html 


More information about the rules-users mailing list