you can also use lock-on-active that will work like no-loop but with multiple rules. <br><br><div class="gmail_quote">On Mon, Jan 11, 2010 at 11:34 AM, Swindells, Thomas <span dir="ltr">&lt;<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In this case you can simply change your when clause so that it tests whether rules contains Rule1.<br>

<br>
Eg<br>
<div class="im"> rule &quot;Rule1&quot;<br>
 salience 100<br>
 no-loop true<br>
   when<br>
</div>     $c:Chesse(type=&quot;Chedar&quot; &amp;&amp; not (rules contains &quot;Rule1&quot;))<br>
<div class="im">   then<br>
     modify ($c){addRule(&quot;Rule1&quot;)}<br>
 end<br>
<br>
</div>Hope that helps,<br>
Thomas<br>
<div><div></div><div class="h5"><br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-">rules-users-</a><br>
&gt; <a href="mailto:bounces@lists.jboss.org">bounces@lists.jboss.org</a>] On Behalf Of orchid<br>
&gt; Sent: 11 January 2010 13:21<br>
&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; Subject: [rules-users] Infinite loop when nesting rules<br>
&gt;<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I have another question regarding rules nesting. I have the following Rule1<br>
&gt; and Rule2 which check some property of Cheese type (I dont want to merge<br>
&gt; them into one rule). The &quot;then&quot; part of these rules updates the list field<br>
&gt; of class Cheese which holds the rules that were fired for a specific<br>
&gt; instance. In Rule3 I want to check if Rule1 and Rule2 were fired:<br>
&gt;<br>
&gt; rule &quot;Rule1&quot;<br>
&gt; salience 100<br>
&gt; no-loop true<br>
&gt;   when<br>
&gt;     $c:Chesse(type=&quot;Chedar&quot;)<br>
&gt;   then<br>
&gt;     modify ($c){addRule(&quot;Rule1&quot;)}<br>
&gt; end<br>
&gt;<br>
&gt; rule &quot;Rule2&quot;<br>
&gt; salience 90<br>
&gt; no-loop true<br>
&gt;   when<br>
&gt;     $c:Chesse(price &lt; 100)<br>
&gt;   then<br>
&gt;     modify ($c){addRule(&quot;Rule2&quot;)}<br>
&gt; end<br>
&gt;<br>
&gt; rule &quot;Rule3&quot;<br>
&gt;   when<br>
&gt;     $c:Cheese(rules contains &quot;Rule1&quot; &amp;&amp; rules contains &quot;Rule2&quot;)<br>
&gt;   then<br>
&gt;     System.out.println(&quot;Rule3 was fired&quot;);<br>
&gt; end<br>
&gt;<br>
&gt; Rule1 and Rule2 cause infinite loop because of the &#39;modify&#39; method. How can<br>
&gt; I solve that issue?<br>
&gt;<br>
&gt; Thank you very much in advance !!!<br>
&gt; --<br>
&gt; View this message in context: <a href="http://n3.nabble.com/Infinite-loop-when-nesting-" target="_blank">http://n3.nabble.com/Infinite-loop-when-nesting-</a><br>
&gt; rules-tp116764p116764.html<br>
&gt; Sent from the Drools - User mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
</div></div>**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the <a href="mailto:postmaster@nds.com">postmaster@nds.com</a> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>

<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************<br>
<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the <a href="mailto:postmaster@nds.com">postmaster@nds.com</a> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.<br>

To protect the environment please do not print this e-mail unless necessary.<br>
<br>
An NDS Group Limited company. <a href="http://www.nds.com" target="_blank">www.nds.com</a><br>
<div><div></div><div class="h5"><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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>