<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=406073812-13052008><FONT face=Arial color=#0000ff size=2>Thanks
for your answer, I've openend following JIRA:</FONT></SPAN></DIV>
<DIV><SPAN class=406073812-13052008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=406073812-13052008>
<P><A href="http://jira.jboss.com/jira/browse/JBRULES-1602"><FONT
size=2>http://jira.jboss.com/jira/browse/JBRULES-1602</FONT></A></P>
<P><FONT size=2></FONT> </P>
<P><SPAN class=406073812-13052008><FONT face=Arial color=#0000ff
size=2>-Patrick</FONT></SPAN></P></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Message d'origine-----<BR><B>De :</B>
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org]<B>De la part de</B> Edson
Tirelli<BR><B>Envoyé :</B> jeudi, 8. mai 2008 20:29<BR><B>À :</B>
Rules Users List<BR><B>Objet :</B> Re: [rules-users] Question about
insertLogical<BR><BR></FONT></DIV><BR> Sounds like a bug to me. The
order of the statements should not cause any change in the behavior.<BR>
Can you please open a JIRA for it attaching your test case?<BR><BR>
Thanks<BR> Edson<BR><BR>
<DIV class=gmail_quote>2008/5/8 Gras, Patrick
<Patrick.Gras@generali.ch>:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<P><SPAN lang=en-us><FONT face="Times New Roman">Hello,</FONT></SPAN> </P>
<P><SPAN lang=en-us><FONT face="Times New Roman">I have a question because
insertLogical does not behave as I expected.</FONT></SPAN> </P>
<P><SPAN lang=en-us><FONT face="Times New Roman">Here is the example I use;
I have a class 'cat' that is dynamic (JavaBean with PropertyChangeSupport )
with only a 'name' attribute.</FONT></SPAN></P>
<P><SPAN lang=en-us><FONT face="Times New Roman">Then I have following
rule:</FONT></SPAN> </P>
<P><SPAN lang=en-us><B><FONT face="Courier New" color=#960000
size=1>rule</FONT></B><FONT face="Courier New" color=#000000 size=1></FONT>
<FONT face="Courier New" color=#008000 size=1>"test"</FONT></SPAN> <BR><SPAN
lang=en-us> <B> <FONT
face="Courier New" color=#960000 size=1>when</FONT></B></SPAN> <BR><SPAN
lang=en-us>
<FONT face="Courier New"
color=#000000 size=1>$cat:Cat( name ==</FONT> <FONT face="Courier New"
color=#008000 size=1>"tom"</FONT><FONT face="Courier New" color=#000000
size=1> )</FONT></SPAN> <BR><SPAN
lang=en-us> <B> <FONT
face="Courier New" color=#960000 size=1>then</FONT></B><FONT
face="Courier New" color=#000000 size=1> </FONT></SPAN><BR><SPAN
lang=en-us>
<FONT face="Courier New"
color=#000000 size=1>$cat.setName(</FONT><FONT face="Courier New"
color=#008000 size=1>"cat"</FONT><FONT face="Courier New" color=#000000
size=1>);</FONT></SPAN> <BR><SPAN
lang=en-us>
<B> <FONT face="Courier New"
color=#960000 size=1>insertLogical</FONT></B><FONT face="Courier New"
color=#000000 size=1>(</FONT><B><FONT face="Courier New" color=#960000
size=1>new</FONT></B><FONT face="Courier New" color=#000000 size=1>
String(</FONT><FONT face="Courier New" color=#008000
size=1>"test"</FONT><FONT face="Courier New" color=#000000
size=1>));</FONT></SPAN> <BR><SPAN
lang=en-us>
</SPAN><SPAN lang=fr>
</SPAN><BR><SPAN lang=en-us><B><FONT face="Courier New" color=#960000
size=1>end</FONT></B></SPAN> </P>
<P><SPAN lang=en-us><FONT face="Times New Roman">When I test the rule
against a cat named tom, the logical inserted fact is not retracted. (So the
fact is inserted because the rule matches, but is not retracted even if the
rule is no more matching at the end.)</FONT></SPAN></P>
<P><SPAN lang=en-us><FONT face="Times New Roman">If I change the order of
the RHS, it works fine. The fact is inserted and then
retracted.</FONT><B></B><B></B></SPAN> </P>
<P><SPAN lang=en-us><B><FONT face="Courier New" color=#960000
size=1>rule</FONT></B><FONT face="Courier New" color=#000000 size=1></FONT>
<FONT face="Courier New" color=#008000 size=1>"test"</FONT></SPAN> <BR><SPAN
lang=en-us> <B> <FONT
face="Courier New" color=#960000 size=1>when</FONT></B></SPAN> <BR><SPAN
lang=en-us>
<FONT face="Courier New"
color=#000000 size=1>$cat:Cat( name ==</FONT> <FONT face="Courier New"
color=#008000 size=1>"tom"</FONT><FONT face="Courier New" color=#000000
size=1> )</FONT></SPAN> <BR><SPAN
lang=en-us> <B> <FONT
face="Courier New" color=#960000 size=1>then</FONT></B><FONT
face="Courier New" color=#000000 size=1></FONT> </SPAN><BR><SPAN
lang=en-us>
<B> <FONT face="Courier New"
color=#960000 size=1>insertLogical</FONT></B><FONT face="Courier New"
color=#000000 size=1>(</FONT><B><FONT face="Courier New" color=#960000
size=1>new</FONT></B><FONT face="Courier New" color=#000000 size=1>
String(</FONT><FONT face="Courier New" color=#008000
size=1>"test"</FONT><FONT face="Courier New" color=#000000
size=1>));</FONT></SPAN> <BR><SPAN
lang=en-us>
<FONT face="Courier New"
color=#000000 size=1>$cat.setName(</FONT><FONT face="Courier New"
color=#008000 size=1>"cat"</FONT><FONT face="Courier New" color=#000000
size=1>);</FONT></SPAN> <BR><SPAN lang=en-us><B><FONT face="Courier New"
color=#960000 size=1>end</FONT></B></SPAN> </P>
<P><SPAN lang=en-us><FONT face="Times New Roman">Is that the normal behavior
?</FONT></SPAN> </P>
<P><SPAN lang=en-us><FONT face="Times New Roman">-Patrick</FONT></SPAN><SPAN
lang=fr></SPAN><SPAN lang=fr></SPAN> </P>
<P><SPAN lang=fr><B><FONT face=Arial color=#ff0000 size=1>Patrick
Gras</FONT></B></SPAN> <BR><SPAN lang=fr><B><FONT face=Arial color=#800000
size=1>GENERALI Assurances</FONT></B> </SPAN><BR><SPAN lang=fr><FONT
face=Arial color=#808080 size=1>Service Informatique</FONT></SPAN> <BR><SPAN
lang=fr><FONT face=Arial color=#808080 size=1>Avenue Perdtemps
23</FONT></SPAN><SPAN lang=de></SPAN> <BR><SPAN lang=de><FONT face=Arial
color=#808080 size=1>1260 Nyon 1</FONT></SPAN> <BR><SPAN lang=fr><FONT
face=Arial color=#808080 size=1>Tél. direct: +41 58 471 05 87</FONT></SPAN>
<BR><SPAN lang=fr><U><FONT face=Arial color=#0000ff size=1><<A
href="mailto:patrick.gras@generali.ch"
target=_blank>mailto:patrick.gras@generali.ch</A>></FONT></U></SPAN>
<BR><SPAN lang=it><FONT face=Webdings color=#008000 size=6>P<FONT
face="Courier New"></FONT></FONT></SPAN><SPAN lang=it><B></B><B></B><B>
<FONT face=Tahoma color=#008000 size=2>Please consider the environment
before printing this E-Mail!</FONT></B></SPAN><B><SPAN
lang=fr-ch></SPAN></B><SPAN lang=fr-ch></SPAN><SPAN lang=fr-ch></SPAN><SPAN
lang=fr-ch></SPAN>
</P><BR></DIV><BR>_______________________________________________<BR>rules-users
mailing list<BR><A
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A><BR><A
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target=_blank>https://lists.jboss.org/mailman/listinfo/rules-users</A><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>Edson Tirelli<BR>JBoss Drools Core Development<BR>Office:
+55 11 3529-6000<BR>Mobile: +55 11 9287-5646<BR>JBoss, a division of Red Hat @
<A href="http://www.jboss.com">www.jboss.com</A> </BLOCKQUOTE></BODY></HTML>