[rules-users] How to Call RuleFLow from Servlet

josh josh_up_life at yahoo.com
Wed Jul 31 01:32:55 EDT 2013


Drools 5.0
Server Tomcat
I am not able to call RuleFlow from servlet. It doesn’t throw any error, nor
shows the output. However I am able to call single rule(SampleRule.drl.DRL).
Below is the snapshot for the same.
/private  RuleBase readRule() throws Exception {
PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl(new InputStreamReader(
TestServlet1.class.getResourceAsStream( "/com/sample/SampleRule.drl" ) ) );
builder.addRuleFlow( new
InputStreamReader(TestServlet1.class.getResourceAsStream(
"/com/sample/sampleruleflow.rf" ) ) );
Package pkg = builder.getPackage();
// add the package to a rulebase (deploy the rule package).
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage(pkg);
return ruleBase;
}
/



--
View this message in context: http://drools.46999.n3.nabble.com/How-to-Call-RuleFLow-from-Servlet-tp4025233.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list