Anyone at all? I still haven&#39;t found a way to do this.<br><br><div class="gmail_quote">On Tue, Aug 25, 2009 at 11:03 AM, Justin King <span dir="ltr">&lt;<a href="mailto:justin.matthew.king@gmail.com">justin.matthew.king@gmail.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;">Hi Everyone,<br><br>I found an old example that shows how to add a rule at runtime:<br><br><span style="color: rgb(51, 102, 255);">function void addRule(String pkgName, String rule, RuleBase ruleBase ) {</span><br style="color: rgb(51, 102, 255);">

<span style="color: rgb(51, 102, 255);">
   PackageBuilder builder = new PackageBuilder();</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">
   builder.addPackgeFromDrl( new StringReader( rule ) );</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">
   ruleBase.addPackage ( builder.addPackage() );</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">
}</span><br><br>I&#39;m trying to do a similar thing with Drools 5 but things seem to have changed. What I want is to add a rule (just as a string) to an already existing set of rules I&#39;ve loaded from a drl file (the new rule does not have to be saved to the actual file though). I see KnowledgeBase has a remove rule method but no add rule. <br>

I should also note that the set of rules I wish to add to is already executing (as in I&#39;ve called <i>fireUntilHalt()</i>) I hope this wont make a difference.<br><br>Thanks in advance for any help, this mailing list saves me every time!<br>

<br>Cheers,<br><font color="#888888"><br>Justin<br>
</font></blockquote></div><br>