<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>I'm actually dealing with this issue as well. Our knowledge base is starting to grow, and we are seeing massive amounts of activations and multiple firings on rules which should only fire once. I have tried no-loop, lock-on-active, and agenda-groups, as well as messing with salience, to mixed results.<br><br>What really did help, however, was putting each rule that should only be fired once into its own activation-group (the activation-group name is the rule name). Then, they would only fire once, and performance was actually better.<br><br>My only concern is that there is a limit on the number of activation-groups, as more and more rules will be using them.<br><br>HTH,<br><br>Andargor<br><br><br>--- On <b>Thu, 7/15/10, Leonardo Gomes <i>&lt;leonardo.f.gomes@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255);
 margin-left: 5px; padding-left: 5px;"><br>From: Leonardo Gomes &lt;leonardo.f.gomes@gmail.com&gt;<br>Subject: Re: [rules-users] Avoiding loops<br>To: "Rules Users List" &lt;rules-users@lists.jboss.org&gt;<br>Date: Thursday, July 15, 2010, 5:37 AM<br><br><div id="yiv2092108821">Thanks for the feedback, guys.<br><br>Leonardo.<br><br><div class="gmail_quote">On Wed, Jul 14, 2010 at 8:41 AM, Wolfgang Laun <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:wolfgang.laun@gmail.com" target="_blank" href="/mc/compose?to=wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Another option would be the addition of a single "Trigger" fact, inserted along<br>

with your regular facts, added as an additional pattern to all rules,<br>
and retracted<br>
in each RHS.<br>
<br>
You might also consider using Event processing to terminate the Engine's<br>
run after the first AfterActivationFiredEvent.<br>
<br>
-W<br>
<br>
<br>
2010/7/14 Mauricio Salatino &lt;<a rel="nofollow" ymailto="mailto:salaboy@gmail.com" target="_blank" href="/mc/compose?to=salaboy@gmail.com">salaboy@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; you can also add an extra property to your facts to check and add condition<br>
&gt; to check that property. (like a processed flag)<br>
&gt; Greetings<br>
&gt;<br>
&gt;<br>
&gt; 2010/7/13 Leonardo Gomes &lt;<a rel="nofollow" ymailto="mailto:leonardo.f.gomes@gmail.com" target="_blank" href="/mc/compose?to=leonardo.f.gomes@gmail.com">leonardo.f.gomes@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi Droolers,<br>
&gt;&gt;<br>
&gt;&gt; I'm trying to avoid loops and looking at different possibilities (no-loop,<br>
&gt;&gt; activation-group, lock-on-active, etc.).<br>
&gt;&gt;<br>
&gt;&gt; &gt;Scenario I want to avoid:<br>
&gt;&gt;<br>
&gt;&gt; For example, the initial facts trigger *rule 1*, which inserts new facts<br>
&gt;&gt; that will trigger *rule 2*, which will then insert facts that would<br>
&gt;&gt; re-trigger *rule 1*.<br>
&gt;&gt;<br>
&gt;&gt; &gt;Possibilities I tried:<br>
&gt;&gt;<br>
&gt;&gt; no-loop -&gt; just prevents the re-activation of the same rule<br>
&gt;&gt; lock-on-active -&gt; I can't know which rules should have lock-on-active set<br>
&gt;&gt; to true, since I don't know what will be the initial facts.<br>
&gt;&gt;<br>
&gt;&gt; &gt;What I'm trying to achieve:<br>
&gt;&gt;<br>
&gt;&gt; All rules in my rule set should execute only once. So, a rule inserts new<br>
&gt;&gt; facts only rules that haven't executed so far, should be activated.<br>
&gt;&gt;<br>
&gt;&gt; Is there a way to do that, let's say 'out-of-the-box', with DRL?<br>
&gt;&gt;<br>
&gt;&gt; Thank you,<br>
&gt;&gt; Leo.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; &nbsp;- CTO @ <a rel="nofollow" target="_blank" href="http://www.plugtree.com">http://www.plugtree.com</a><br>
&gt; &nbsp;- MyJourney @ <a rel="nofollow" target="_blank" href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>
&gt; &nbsp;- Co-Founder @ <a rel="nofollow" target="_blank" href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br>
&gt;<br>
&gt; &nbsp;- Salatino "Salaboy" Mauricio -<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" href="/mc/compose?to=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></blockquote></td></tr></table><br>