<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE : [rules-users] Problem with updated facts</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hello Thomas,<BR>
I a rule is fired before and sets the value to 100, the current rule that<BR>
request the amont to be bigger than 150 will never fire.<BR>
So it is normal<BR>
Au plaisir de te relire<BR>
Nicolas<BR>
<BR>
<BR>
-------- Message d'origine--------<BR>
De: rules-users-bounces@lists.jboss.org de la part de thomas moncieu<BR>
Date: mer. 11/03/2009 16:58<BR>
À: rules-users@lists.jboss.org<BR>
Objet : [rules-users] Problem with updated facts<BR>
<BR>
Hi,<BR>
I have a problem when updating fields in rules :<BR>
<BR>
Here's the rule :<BR>
<BR>
when<BR>
t : Bill($amount : totalAmount, totalAmount > (new<BR>
Double(150.0).doubleValue()));<BR>
then<BR>
System.out.println("tot : " + $tot);<BR>
end<BR>
<BR>
The original totalAmount is 200.<BR>
A fact update sets the totalAmount at 100 (with an update of the facthandle<BR>
that I can see in the debugger of the working memory) so the condition of<BR>
the rule does not be true.<BR>
Nevertheless, the System.out is made and prints 100.<BR>
<BR>
I use Statefull session and set shadow facts to true.<BR>
<BR>
Thanks for helping me !<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>