[rules-users] Is it possible to update KnowledgeBase inside a rule?

Mark Proctor mproctor at codehaus.org
Fri Jun 28 07:59:37 EDT 2013


we have a multi-thread test for this use case, so you can see what we are doing:
http://grepcode.com/file/repo1.maven.org/maven2/org.drools/drools-compiler/6.0.0.Alpha6/org/drools/integrationtests/DynamicRulesChangesTest.java

Mark
On 27 Jun 2013, at 05:02, Sonata <plz.write.to at gmail.com> wrote:

> Say I want to change the loaded packages dynamically base on some Business
> logic,
> is it possible to update the KnowledgeBase in rule files (not in Java) like
> calling addKnowledgePackages() removeKnowledgePackage() etc.?
> 
> If it is possible, how do you make it so that the current session is updated
> with the changes and re-fire for the new rules?
> 
> Or, how do you make it so that the current session is not affected but the
> next session will be using the updated KnowledgeBase?
> 
> Thank you
> 
> P.S. I am using 5.5.0.Final
> 
> 
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/Is-it-possible-to-update-KnowledgeBase-inside-a-rule-tp4024578.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list