<!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.3132" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face=Arial 
color=#0000ff size=2>What about Agenda Groups?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>Rule "pick group X"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>when</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT 
face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>Fact( 
attribute = "condition1" )</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>then</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT 
face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT 
color=#0000ff>drools.setFocus("Group X")</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>end</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>Rule "pick group Y"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>when</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT 
face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>Fact( 
attribute = "condition2" )</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>then</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT 
face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT 
color=#0000ff>drools.setFocus("Group Y")</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>end</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>Rule "Group X1"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>Agenda Group "Group X"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>when</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT 
face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>Smurf( 
)</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>then</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT 
face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>// Do 
something</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>end</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>Rule "Group X2"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>Agenda Group "Group X"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>when</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT 
face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT 
color=#0000ff>Smurfette( )</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>then</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT 
face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>// 
Something else</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face="Courier New" 
color=#0000ff size=2>end</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=969263908-01022008><FONT face=Arial 
color=#0000ff size=2>etc</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>Jai 
  Vasanth<BR><B>Sent:</B> 31 January 2008 19:45<BR><B>To:</B> 
  rules-users@lists.jboss.org<BR><B>Subject:</B> [rules-users] Grouping 
  rules<BR></FONT><BR></DIV>
  <DIV></DIV>Hi,<BR><BR><BR>&nbsp;I am building a system where I would need to 
  fire different sets of rules based on some attribute in the fact object.&nbsp; 
  <BR><BR>Here are someways which I thought of, I was wondering if there was 
  something better than that.<BR><BR>1) I could do this by creating different 
  sessions based on the data attrbute (different sessions would have different 
  rule packages based on the attribute)<BR><BR>or <BR><BR>2) Have all the rules 
  fire (all the different sets of rules) irrespective of the attribute and have 
  them insert fact new objects into the working memory. In the second round of 
  rules, collect the (newly made) fact objects&nbsp; based on the attribute and 
  take that action.<BR><BR><BR><BR>Thanks <BR><BR>Jai 
<BR><BR><BR><BR><BR></BLOCKQUOTE></BODY></HTML>