<div dir="ltr"><div>Hi,</div><div><br></div><div>Why dont you build an RuleBase for each package and runs it when and where needed? Or add an remove the packages from RuleBase as needed?</div><div><br></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: &#39;Lucida Grande&#39;; font-size: 12px; line-height: 18px; "><a id="d0e484"><pre class="programlisting" style="font-size: 0.9em; display: block; color: rgb(51, 51, 51); overflow-x: auto; overflow-y: auto; font-family: verdana, helvetica, sans-serif; background-color: rgb(245, 245, 245); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 5px; padding-right: 15px; padding-bottom: 5px; padding-left: 25px; ">
ruleBase.addPackage( pkg );  // Add a package instance
ruleBase.removePackage( &quot;org.com.sample&quot; );  // remove a package, and all its parts, by it&#39;s namespace</pre></a></span><div><br></div><div>Is it what you want to do?&nbsp;</div><div><br></div><div>Regards,<br></div>
<div>Leo<br><br><div class="gmail_quote">On Mon, Sep 29, 2008 at 7:18 PM, hongyu lu <span dir="ltr">&lt;<a href="mailto:hl_107@yahoo.com">hl_107@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I have a use case where I would like to group rules by package(each package would be one experiment in my app). There are a couple attributes at the package level, which will enable/disable all rules of that package(not being fired). What would be the best way to achieve this? I am new to Drools and it looks like the rule definition is kinda flat. I would like to avoid defining package level conditions within each rule.<br>

<br>
thanks<br>
Jeff<br>
<br>
<br>
<br>
<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>
</blockquote></div><br></div></div></div>