<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2>You could consider Agenda Groups.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2>You could either bunch groups of rules into discrete sets 
or have each rule in its own Agenda Group.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2>You would then use workingMemory.setFocus(...) before 
calling fireAllRules().</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2>This is based upon 4.x and so could be different in 5 
(which I haven't had time to look at fully).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2>With kind regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=704084609-20032009><FONT face=Arial 
color=#0000ff size=2>Mike</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
  [mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Lucas de 
  Oliveira<BR><B>Sent:</B> 19 March 2009 15:21<BR><B>To:</B> 
  rules-users@lists.jboss.org<BR><B>Subject:</B> [rules-users] running a small 
  set of rules from a drl file.<BR></FONT><BR></DIV>
  <DIV></DIV>Hi,<BR>I was wondering if it's possible to pick up just a few rules 
  from a drl file to create the RuleExecutionSet. Something 
  like:<BR><BR>rules.drl ===&gt;<BR>...<BR><BR>rule 
  "r1"<BR>&nbsp;...<BR>end<BR><BR>rule 
  "r2"<BR>&nbsp;...<BR>end<BR><BR>...<BR>=============<BR><BR>RunRules.java 
  ===&gt;<BR>...<BR><BR>List&lt;String&gt; rulesToRun = new 
  ArrayList&lt;String&gt;();<BR>rulesToTun.add("r1");<BR><BR>RuleExecutionSet 
  ruleExecutionSet = ruleSetProvider.createRuleExecutionSet(ruleFileName, null, 
  rulesToRun);<BR>ruleAdministrator.registerRuleExecutionSet("test.drl", 
  ruleExecutionSet, null);<BR><BR>...<BR>=============<BR><BR>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...<BR><BR>thanks in advance!<BR>best regards,<BR><BR>-- 
  <BR>Lucas de Oliveira Arantes<BR></BLOCKQUOTE></BODY></HTML>