Don&#39;t forget Facts are matched as they are inserted into WorkingMemory too.<br><br>fireallRules() only executes the resulting activations on the agenda - that as Thomas states can be controlled by a number of means.<br>
<br><div class="gmail_quote">On 17 March 2011 14:04, 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="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Actually what you want is that only the rules from the DRLs that you want are activated and their consequences run (a subtle but important distinction). Put another way it doesn&#39;t matter how many rules are in the knowledge base and evaluated as long as only the rules you want are matched.<br>

<br>
There are two main approaches you could do to control this. The first is to use agenda groups with rules in different DRLs being in different agenda groups, this then lets you control which groups consequences are run and in what order to.<br>

<br>
Another approach is to introduce some additional facts into the working memory - &quot;EnabledRuleGroup(String groupName)&quot;. The first condition in each rule would then be the statement &quot;exists EnabledRuleGroup(name ==&quot;myDlrFilenameXYZ&quot;)<br>

Then only rules matching the statement would be evaluated.<br>
<br>
There are probably other variations around this too - things like agenda filters to filter out the activations you don&#39;t want.<br>
<font color="#888888"><br>
Thomas<br>
</font><div class="im"><br>
<br>
<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>
</div><div class="im">&gt; <a href="mailto:bounces@lists.jboss.org">bounces@lists.jboss.org</a>] On Behalf Of marunam<br>
&gt; Sent: 17 March 2011 13:31<br>
&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; Subject: Re: [rules-users] drools design question<br>
&gt;<br>
</div><div><div></div><div class="h5">&gt; Thanks everyone for your inputs<br>
&gt;<br>
&gt; Yes, so the confusion that I have is, with loading multiple drls. If I<br>
&gt; load<br>
&gt; all the drls in memory(may be 100s), does it mean that when I say<br>
&gt; fireallRules, it is going to run the rules from all the drls?? That is<br>
&gt; what<br>
&gt; I don&#39;t want.<br>
&gt;<br>
&gt; For a particular session at runtime, I may need to run drls from just<br>
&gt; some<br>
&gt; specific drls and not all the drls. How can I tackle this If I load all<br>
&gt; the<br>
&gt; drls?<br>
&gt;<br>
&gt; Thank you<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://drools-java-rules-" target="_blank">http://drools-java-rules-</a><br>
&gt; <a href="http://engine.46999.n3.nabble.com/drools-design-question-" target="_blank">engine.46999.n3.nabble.com/drools-design-question-</a><br>
&gt; tp2691182p2693429.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><div class="im">**************************************************************************************<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>
</div><div><div></div><div class="h5">_______________________________________________<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>