[rules-users] adding process to an empty rule base

Kris Verlaenen kris.verlaenen at cs.kuleuven.be
Fri Jul 27 10:11:24 EDT 2007


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 at yahoo.fr>
To: <rules-users at 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#a11829714
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users 




More information about the rules-users mailing list