This is what I think is going on:<div>when you call update($fact1) it will first retract $fact1 which in turn retracts $fact2, the $fact1 is then inserted again which cause another &#39;from&#39; evaluation and a NEW $fact2 is pulled -&gt; no-loop doesn&#39;t work because Drools sees it as different data</div>
<div>I am just guessing here ...<br><br><div class="gmail_quote">On Fri, Feb 13, 2009 at 9:12 AM, Przemysław Różycki <span dir="ltr">&lt;<a href="mailto:P.Rozycki@amg.net.pl">P.Rozycki@amg.net.pl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
Doesn&#39;t really anyone have any logical explanation of why such a rule loops?<br>
<br>
To remind the rule:<div class="Ih2E3d"><br>
<br>
rule &quot;Hello World&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;no-loop<br>
 &nbsp; &nbsp; &nbsp; &nbsp;when<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$fact1 : MyFactBean1( &nbsp;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$fact2 : MyFactBean2( &nbsp;) from $fact1<br>
 &nbsp; &nbsp; &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;Fired!!!&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;update($fact1);<br>
end<br>
<br></div>
If I don&#39;t use &#39;from&#39; everything is fine.<br>
I really didn&#39;t find in a documentation, that &#39;from&#39; causes any special behaviour of the rule looping.<div class="Ih2E3d"><br>
<br>
Best regards,<br>
-- <br>
Przemysław Różycki<br>
AMG.net, A Bull Group Company<br>
ul. Ł±kowa 29<br>
90-554 ŁódĽ<br>
<a href="http://www.amg.net.pl" target="_blank">www.amg.net.pl</a><br>
<br>
<br>
<br></div><font color="#888888">
Przemysław Różycki pisze:</font><div><div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for answer, Vikrant, but I don&#39;t think so. I have always used no-loop without any additions and it worked (when I didn&#39;t use from). BTW, if you comment a condition with from, then the rule does not loop. I also checked with &quot;no-loop true&quot; and result is the same.<br>

<br>
Best regards,<br>
Przemek<br>
<br>
Vikrant Yagnick pisze:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have to quickly recheck the documentation by I think you have to write &quot;no-loop true&quot;. Just writing no-loop defaults to false I guess.<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] On Behalf Of Przemyslaw Rózycki<br>

Sent: Tuesday, February 10, 2009 3:24 PM<br>
To: Rules Users List<br>
Subject: [rules-users] Rules with from always loops (Drools 4.0.7)<br>
<br>
Hello,<br>
<br>
why does such a rule always loop? Even if no-loop is used?<br>
<br>
rule &quot;Hello World&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;no-loop<br>
 &nbsp; &nbsp; &nbsp; &nbsp;when<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$fact1 : MyFactBean1( &nbsp;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$fact2 : MyFactBean2( &nbsp;) from $fact1<br>
 &nbsp; &nbsp; &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;Fired!!!&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;update($fact1);<br>
end<br>
<br>
The full code of my test application and drl is attached.<br>
<br>
Best regards,<br>
-- <br>
Przemysław Różycki<br>
AMG.net, A Bull Group Company<br>
ul. Ł±kowa 29<br>
90-554 ŁódĽ<br>
<a href="http://www.amg.net.pl" target="_blank">www.amg.net.pl</a><br>
<br>
<br>
MASTEK LTD.<br>
Mastek is in NASSCOM&#39;s &#39;India Top 20&#39; Software Service Exporters List.<br>
In the US, we&#39;re called MAJESCOMASTEK<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <br>
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.<br>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
</div></div></blockquote></div><br></div>