[rules-users] when to use RuleBase.removePackage()

Justine Hlista justine at vsasset.com
Tue Jan 30 10:45:39 EST 2007


Hello,

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?

When I call removePackage, I get the following exception, but I'm not sure
why...

Warning: An error occurred compiling a semantic invoker. Errors should have
been reported elsewhere.
Exception in thread "main" java.lang.NullPointerException
    at org.drools.reteoo.ReteooBuilder.removeRule(Unknown Source)
    at org.drools.reteoo.ReteooRuleBase.removeRule(Unknown Source)
    at org.drools.common.AbstractRuleBase.removePackage(Unknown Source)
    at com.vsasset.rules.dynamic.RemovePkgTestCase.replaceRuleFile(
RemovePkgTestCase.java:58)
    at com.vsasset.rules.dynamic.RemovePkgTestCase.testLoad1AssertLoad2(
RemovePkgTestCase.java:38)
    at com.vsasset.rules.dynamic.RemovePkgTestCase.main(
RemovePkgTestCase.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Process finished with exit code 1


Thanks!
Justine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070130/d420257e/attachment.html 


More information about the rules-users mailing list