Brian,
Rule names should be unique within their package, ruleflow group names are interpreted
globally (so ruleflow groups with the same name in different packages are considered the
same).
Multiple packages can be loaded into the same knowledge base. Assuming you will be using
Drools5, it should look something like this:
kbuilder.add(...);
kbuilder.add(...);
...
Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages();
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(pkgs);
final StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
Check out the latest Drools5 documentation for more information:
http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/tr...
Rules are always identified as package name + rule name, so they can easily be
differentiated.
Kris
----- Original Message -----
From: brian.xiang(a)thomsonreuters.com
To: rules-users(a)lists.jboss.org
Sent: Monday, April 06, 2009 5:13 PM
Subject: [rules-users] Rule package/rule name/ruleflow-group question
Hi,
I am new to Drools. I am not sure how rules should be organized using package.
My questions are:
1) Should rule name/ruleflow-group name be unique within the same package or globally?
2) Can multiple packages be loaded into workingmemory at the same time? if this true,
then I have following quesitons:
2.1 How to load multiple packages?
2.2 How the rules have the same name but belong to different packages, are
differieniated and fired?
Thanks,
Brian Xiang
------------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users