Hi,
Hi Esteban,
I have added the complete package into the kbuilder using the package url,
Below is the way Im using to add the package,
KnowledgeBuilder kbuilder1 = KnowledgeBuilderFactory.newKnowledgeBuilder();
KnowledgeBuilder kbuilder2 = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder1.add(ResourceFactory.newUrlResource("http://localhost:8983/drools-guvnor/org.drools.guvnor.Guvnor/package/test1/LATEST"),ResourceType.PKG);
kbuilder2.add(ResourceFactory.newUrlResource("http://localhost:8983/drools-guvnor/org.drools.guvnor.Guvnor/package/test2/LATEST"),ResourceType.PKG);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder1.getKnowledgePackages());
kbase.addKnowledgePackages(kbuilder2.getKnowledgePackages());
StatefulKnowledgeSession wrkMemory = kbase.newStatefulKnowledgeSession();
int i=wrkMemory.fireAllRules();
Let me know whether this approach is fine or if Im missing something here,
provide your comments on the same.
Thanks,
Vignesh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Firing-Mulitple-packages-tp1127290p1145342.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users