[rules-dev] Drools 6 : Dynamic Rules

Mark Proctor mproctor at codehaus.org
Thu Nov 28 08:27:23 EST 2013


Yes, it’s now much simpler than before.

1) Create your original project with rules, build and deploy the jar.
2) Load the JAR to create a KieContainer.
3) add or change rules. Change the maven version, build and deploy the jar.
4) Ensure the JAR is in the KieRepository, or available to maven if using kie-ci, and call KieContainer.updateToVersion( ReleaseId). 

This will ensure your KieContainer is updated, and all existing stateful sessions will be incrementally updated too. Assuming no bugs :)
Mark

On 28 Nov 2013, at 12:22, kellyajp <kellyajp at yahoo.co.uk> wrote:

> Is it possible to programmatically add a rule at Runtime in Drools 6?
> 
> I have a StatefulKnowledgeSession based on some existing rules.
> 
> I just want to add a couple of rule the the main agenda group of the above
> package, is this possible? Are there any examples or can someone point me in
> the correct direction for documentation. The main drools 6.0 documentation
> does not cover this.
> 
> Thanks
> 
> 
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/Drools-6-Dynamic-Rules-tp4026976.html
> Sent from the Drools: Developer (committer) mailing list mailing list archive at Nabble.com.
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev




More information about the rules-dev mailing list