Hi Justine. <br><br>Normally in your case, just load up a fresh RuleBase from the drl(s), and use it from then on (calling newWorkingMemory()) as needed.<br><br>You wouldn't normally remove the package before adding it - adding it should modify the network (by merging the packages, at least I think).
<br><br>In your case though, doing the former is probably what you want.<br><br><div><span class="gmail_quote">On 1/31/07, <b class="gmail_sendername">Justine Hlista</b> <<a href="mailto:justine@vsasset.com">justine@vsasset.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br><br>Suppose I have a drl file(s) that defines a rules package. I have loaded this into the rule base. At runtime however, my user may change the file(s) that defines the package. Do I need to call
RuleBase.removePackage
() before adding the newly modified drl code? Or will the rule base automatically update all the modified rules correctly?<br><br>When I call removePackage, I get the following exception, but I'm not sure why...<br><br>
Warning: An error occurred compiling a semantic invoker. Errors should have been reported elsewhere.<br>Exception in thread "main" java.lang.NullPointerException<br> at org.drools.reteoo.ReteooBuilder.removeRule
(Unknown Source)<br> at org.drools.reteoo.ReteooRuleBase.removeRule(Unknown Source)<br> at org.drools.common.AbstractRuleBase.removePackage(Unknown Source)<br> at com.vsasset.rules.dynamic.RemovePkgTestCase.replaceRuleFile
(RemovePkgTestCase.java:58)<br> at com.vsasset.rules.dynamic.RemovePkgTestCase.testLoad1AssertLoad2(RemovePkgTestCase.java:38)<br> at com.vsasset.rules.dynamic.RemovePkgTestCase.main(RemovePkgTestCase.java:23)<br> at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:25)<br> at java.lang.reflect.Method.invoke(Method.java:585)<br> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)<br><br>Process finished with exit code 1<br><br><br>Thanks!<br><span class="sg">
Justine<br><br><br>
</span><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br><br></blockquote></div>
<br>