Yes, that is possible, but you should also add the (generated) package of
your PackageBuilder.
But this process is actually much simpler when using the ProcessBuilder
exclusively.
It should look something like this:
PackageBuilder builder = new PackageBuilder();
// add your rules (if any)
builder.addPackageFromDrl( ... );
// add your processes (if any)
builder.addRuleFlow( ... );
// add Package to ruleBase
Package pkg = builder.getPackage(); // this includes all the rules and
processes
ruleBase.addPackage( pkg );
Kris
----- Original Message -----
From: "hypnosat7" <ablarbi(a)yahoo.fr>
To: <rules-users(a)lists.jboss.org>
Sent: Friday, July 27, 2007 3:59 PM
Subject: [rules-users] adding process to an empty rule base
Is it possible to set the rule flow in my rule base before adding rule
packages :
ruleBase = RuleBaseFactory.newRuleBase();
org.drools.compiler.ProcessBuilder processBuilder = new ProcessBuilder(new
PackageBuilder());
processBuilder.addProcessFromFile(ruleFlow);
ruleBase.addProcess(processBuilder.getProcesses()[0]);
thanks
--
View this message in context:
http://www.nabble.com/adding-process-to-an-empty-rule-base-tf4157978.html...
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users