<div>Hi Kris,</div><div><br></div><div>Thank you for quick response and explaining the details.</div><div><br></div><div>I thought that the AgendaFilter would cancel the activations and that the ruleflow would continue. Otherwise it doesn&#39;t make much sense to use AgendaFilter with ruleflow. But if it is not supported I&#39;ll have to live with that :)</div>



<div><br></div><div>My use case: I have lot of rules. I need to be able to turn some rules on and off depending on user input. I know that I could modify rule conditions to check if a rule is enabled or not but this means lot of duplicated conditions that are hard to maintain. I could also use &#39;rule inheritance&#39; but it doesn&#39;t provide enough flexibility - it supports only single inheritance.</div>


<div><br></div><div>The problem is a crosscutting concern. It spreads across many rules. An AgendaFilter seemed like the ideal candidate. <br>Alternatively, as you&#39;ve indicated, I could use an AgendaEventListener and in the activationCreated method cancel the activation. However this will require use of some Drools internal APIs...<br>
<br>Thanks for your help.<br>
</div>
<div><br></div><div>Best regards,</div><div>Michal</div><br><br><div class="gmail_quote">On Mon, May 25, 2009 at 4:45 PM, Kris Verlaenen <span dir="ltr">&lt;<a href="mailto:Kris.Verlaenen@cs.kuleuven.be" target="_blank">Kris.Verlaenen@cs.kuleuven.be</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;">
Michal,<br>
<br>
A ruleset node only continues if the ruleflow group is it associated<br>
with is deactivated.  A ruleflow group is deactivated automatically if<br>
it contains no more activations or if you deactivate it manually.  By<br>
using an agenda filter, you are not executing the activation and thus<br>
the activation is never removed from the ruleflow group.  Therefore, the<br>
process will keep waiting.  This is expected behavior.  Why were you<br>
expecting it to continue?  I guess you would need some other kind of<br>
&quot;filter&quot; that not prevents the activation from firing but cancels<br>
activations that are not accepted by the filter?<br>
<br>
Kris<br>
<div><div></div><div><br>
Quoting Michal Bali &lt;<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>&gt;:<br>
<br>
&gt; Hi,<br>
&gt; If a rule is not allowed to fire by an AgendaFilter the whole<br>
&gt; ruleflow<br>
&gt; stops.<br>
&gt;<br>
&gt; I&#39;ve created a small test case (attached). It contains:<br>
&gt;  - one DRL file with one dummy rule that is in some ruleflow-group.<br>
&gt;  - one RF file with three nodes (&#39;start&#39;, &#39;ruleflow group&#39; and<br>
&gt; &#39;end&#39;)<br>
&gt;  - a program that starts the process, and calls fireAllRules with<br>
&gt; custom<br>
&gt; agenda filter.<br>
&gt;<br>
&gt; Once the program is executed the ruleflow will stop inside the<br>
&gt; ruleflow-group. If I remove the agenda filter it works as expected<br>
&gt; (the<br>
&gt; ruleflow finishes).<br>
&gt;<br>
&gt; Tested with Drools 5.0.1.<br>
&gt;<br>
&gt; Is this a bug or am I missing something?<br>
&gt;<br>
&gt; Best regards,<br>
&gt; Michal<br>
&gt;<br>
<br>
<br>
<br>
<br>
</div></div>Disclaimer: <a href="http://www.kuleuven.be/cwis/email_disclaimer.htm" target="_blank">http://www.kuleuven.be/cwis/email_disclaimer.htm</a><br>
</blockquote></div><br>