[rules-users] running a small set of rules from a drl file.

Lucas de Oliveira lucasdeoliveira at gmail.com
Thu Mar 19 11:20:31 EDT 2009


Hi,
I was wondering if it's possible to pick up just a few rules from a drl file
to create the RuleExecutionSet. Something like:

rules.drl ===>
...

rule "r1"
 ...
end

rule "r2"
 ...
end

...
=============

RunRules.java ===>
...

List<String> rulesToRun = new ArrayList<String>();
rulesToTun.add("r1");

RuleExecutionSet ruleExecutionSet =
ruleSetProvider.createRuleExecutionSet(ruleFileName, null, rulesToRun);
ruleAdministrator.registerRuleExecutionSet("test.drl", ruleExecutionSet,
null);

...
=============

I haven't found anything like that in the documentation. I'd really like
that otherwsie I'll have to split the rules through many different files,
which will be a bit of a havoc to unit test...

thanks in advance!
best regards,

-- 
Lucas de Oliveira Arantes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090319/31fe8c60/attachment.html 


More information about the rules-users mailing list