[rules-users] How to read ruleflow file?
tosmun
taylor.osmun at ca.ibm.com
Tue Sep 18 12:29:47 EDT 2012
Hi there,
This is likely irrelevant to you, but I run things using the Drools
framework (not Guvnor). In case it is helpful, here is my simple setup:
KnowledgeBuilder kbBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
File file = new File("/test/myFile.rf");
kbBuilder.add(ResourceFactory.newFileResource(file), ResourceType.DRF);
//Insert your KB files here as ResourceType.DRL
if (kbBuilder.hasErrors())
e.printStackTrace();
KnowledgeBase kb = kbBuilder.newKnowledgeBase();
kb.addKnowledgePackages(kbBuilder.getKnowledgePackages());
StatefulKnowledgeSession session = kb.newStatefulKnowledgeSession();
session.startProcess("myFlow");
session.fireAllRules();
Where of course "myFlow" is the name of my flow, and the file is the full
path to your ruleflow.
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-read-ruleflow-file-tp4019812p4019833.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list