Thanks.<br><br>Jai <br><br><div class="gmail_quote">On Feb 6, 2008 5:29 AM, Edson Tirelli &lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>&nbsp;&nbsp; The answer is not simple. :)<br>&nbsp;&nbsp; All the alpha constraints are evaluated at fact assertion time, does not matter if they are early or late in the pattern order. Although, alpha constraints are usually quite cheap, since they are constraints that do not depend on other facts. Example:<br>

<br>Person( name == &#39;bob&#39; )<br><br>&nbsp;&nbsp; &quot;name == &#39;bob&#39;&quot; is a literal constraint and do not depend on any other pattern (so it is an alpha constraint) and will be evaluated at assert time, does not matter the order in which patterns are written down.<br>

&nbsp;&nbsp; Beta constraints are constraints that depend on previous patterns and will only be evaluated when previous patterns are matched. Example:<br><br>when<br>&nbsp;&nbsp; Person( $likes : likes ) <br>&nbsp;&nbsp; Cheese( type == $likes )<br>then<br>

end<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; It is obvious in the previous example that &quot;type == $likes&quot; depends on the value of $likes that is a variable bound in a previous pattern (so it is a Beta constraint). It will only be evaluated if ALL previous patterns match.<br>

&nbsp;&nbsp; &quot;from&quot; CE is a special case of beta &quot;node&quot;, that is only evaluated when all previous patterns match.<div><div></div><div class="Wj3C7c"><br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><div><span class="gmail_quote">2008/2/6, Anstis, Michael (M.) &lt;<a href="mailto:manstis1@ford.com" target="_blank">manstis1@ford.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Great news!</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I</font></span><span><font color="#0000ff" face="Arial" size="2">s this specific to the use of &quot;from&quot; whereas 
another rule like:-</font></span></div><span>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div><font color="#0000ff" face="Arial" size="2"></font>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">rule 
&quot;avoid expense&quot;</font></span></div>
<div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">when</font></font></span></div>
<div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">ControlFact( phase == &quot;do expensive call&quot; 
)</font></font></span></div></span>
<div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">AnotherFact(&nbsp;<span>someExpensiveTimeConstantFunctionCall == someValue 
</span>)</font></font></span></div>
<div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">then</font></font></span></div>
<div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">// Do something</font></font></span></div>
<div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">end</font></font></span></div>
<div>&nbsp;</div>
<div><span></span><font face="Arial"><font color="#0000ff"><font size="2">C<span>ould not have the LHS 
not evaluated or (to avoid a double negative), would always have the LHS fully 
evaluated ;-)</span></font></font></font></div>
<blockquote style="margin-right: 0px;">
  <div dir="ltr" align="left" lang="en-us">
  <hr>
  <font face="Tahoma" size="2"><b>From:</b> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a> 
  [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Edson 
  Tirelli<br><b>Sent:</b> 06 February 2008 12:29</font><div><span><font face="Tahoma" size="2"><br><b>To:</b> Rules Users 
  List<br><b>Subject:</b> Re: [rules-users] Grouping rules<br></font></span></div><br></div><div><span>
  <div></div><font color="#0000ff" face="Arial" size="2"></font><font color="#0000ff" face="Arial" size="2"></font><br>&nbsp;&nbsp; Yes, it is possible to prevent 
  the evaluation of part of the LHS patterns by the use of previous constraints 
  and/or the introduction of control facts.<br><br>&nbsp;&nbsp; For 
  instance:<br><br>
  <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">rule &quot;avoid expense&quot;</font></span></div>
  <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; 
  <font color="#0000ff" size="2">when</font></font></span></div>
  <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">ControlFact( phase == &quot;do expensive call&quot; 
  )</font></font></span></div>
  <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">AnotherFact( ) from 
  someExpensiveServiceCall</font></font></span></div>
  <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; 
  <font color="#0000ff" size="2">then</font></font></span></div>
  <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">// Do something</font></font></span></div>
  <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; 
  <font color="#0000ff" size="2">end</font></font></span></div><span></span><br>&nbsp;&nbsp;&nbsp; In 
  the above example, the &quot;someExpensiveServiceCall&quot; will only be executed when 
  the previous patterns are matched, i.e., when phase attribute of the 
  ControlFact has the value &quot;do expensive call&quot;.<br><br>&nbsp;&nbsp;&nbsp; 
  []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br>
  <div><span class="gmail_quote">2008/2/6, Anstis, Michael (M.) &lt;<a href="mailto:manstis1@ford.com" target="_blank">manstis1@ford.com</a>&gt;:</span>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I&#39;m not 
    sure as LHS&#39;s are evaluated when facts are inserted not when fireAllRules 
    (or execute) is called.</font></span></div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">You can 
    prevent the RHS from activating by using (for lack of a&nbsp;better name) 
    &quot;flag facts&quot; (but this doesn&#39;t solve your problem); for 
    example:-</font></span></div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">rule &quot;avoid expense&quot;</font></span></div>
    <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; 
    <font color="#0000ff" size="2">when</font></font></span></div>
    <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">not exists Flag()</font></font></span></div>
    <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">AnotherFact( ) from 
    someExpensiveServiceCall</font></font></span></div>
    <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; 
    <font color="#0000ff" size="2">then</font></font></span></div>
    <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">// Do something</font></font></span></div>
    <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; 
    <font color="#0000ff" size="2">end</font></font></span></div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2"></font></span>&nbsp;</div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Don&#39;t 
    forget though that if you share LHS patterns across multiple rules they will 
    share the same nodes in the RETE network, so although you might be aware 
    that the expensive calls are not required for some rules they might be 
    required for other rules and hence you&#39;ll need to perform the expensive call 
    when the facts are inserted in order for the other rules to activate. 
    Perhaps if you better describe your use-case there might be a better 
    solution.</font></span></div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">With 
    kind regards,</font></span></div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Mike</font></span></div><br>
    <blockquote style="margin-right: 0px;">
      <div dir="ltr" align="left" lang="en-us">
      <hr>
      <font face="Tahoma" size="2"><span><b>From:</b> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of 
      </b>Jai Vasanth<br></span><b>Sent:</b> 05 February 2008 19:35</font>
      <div><span><font face="Tahoma" size="2"><br><b>To:</b> Rules Users List<br><b>Subject:</b> Re: 
      [rules-users] Grouping rules<br></font></span></div><br></div>
      <div><span>
      <div></div>I had another question on these lines. Is there a way to preven 
      even the LHS from evaluating for certain cases ? A few of my LHS 
      computation involve some expensive service calls and I would like to avoid 
      unless and until it is asolutely necessary.<br><br>Thanks <br><br>Jai 
      <br><br>
      <div class="gmail_quote">On Feb 1, 2008 8:35 AM, Jai Vasanth &lt;<a href="mailto:jaivasanth@gmail.com" target="_blank">jaivasanth@gmail.com</a>&gt; wrote:<br>
      <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks.&nbsp; 
        That helped. 
        <div>
        <div></div>
        <div><br><br>
        <div class="gmail_quote">On Feb 1, 2008 7:31 AM, Anstis, Michael (M.) 
        &lt;<a href="mailto:manstis1@ford.com" target="_blank">manstis1@ford.com</a>&gt; 
        wrote:<br>
        <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
          <div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Excuse me if you already understand but there is a difference 
          between rule patterns being&nbsp;evaluated and their consequence 
          running.</font></span></div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Rules LHS are evaluated when objects are inserted into working 
          memory whereas the consequence fires when you call 
          fireAllRules();</font></span></div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">The rules whose activations are executed are those in the given 
          Agenda Group; thereafter those not in any agenda group execute. So if 
          all rules are in an Agenda Group you should be OK.</font></span></div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Of 
          course they don&#39;t prevent all rule patterns&nbsp;from being checked as 
          objects are inserted into WM (which has a performance impact) but this 
          is what the RETE network was designed to 
          optimise.&nbsp;</font></span></div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">You could try another&nbsp;configuration (but I think Agenda 
          Groups are probably the preference by design). This gives complete 
          isolation - but I haven&#39;t tried it so it might not even be possible 
          ;-)</font></span></div>
          <blockquote dir="ltr" style="margin-right: 0px;">
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">global WorkingMemory wm;</font></span></div>
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">global RuleBase rbX;</font></span></div>
            <div dir="ltr" align="left"><span><font color="#0000ff" size="2">
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">global RuleBase rbY;</font></span></div></font></span></div>
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2"></font></span>&nbsp;</div>
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">rule &quot;Group X&quot;</font></span></div>
            <div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">when</font></font></span></div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">Fact( attribute == &quot;condition1&quot; 
            )</font></font></span></div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">then</font></font></span></div></div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">wm = 
            rbX.newStatefulSession();</font></font></span></div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">wm.fireAllRules();</font></font></span></div>
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">end</font></span></div>
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2"></font></span>&nbsp;</div>
            <div dir="ltr" align="left"><span>
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">rule &quot;Group Y&quot;</font></span></div>
            <div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">when</font></font></span></div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">Fact( attribute == &quot;condition2&quot; 
            )</font></font></span></div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">then</font></font></span></div></div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">wm = 
            rbY.newStatefulSession();</font></font></span></div>
            <div dir="ltr" align="left"><span><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff" size="2">wm.fireAllRules();</font></font></span></div>
            <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">end</font></span></div></span></div></blockquote>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Good luck.</font></span></div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Mike</font></span></div><br>
          <blockquote style="margin-right: 0px;">
            <div dir="ltr" align="left" lang="en-us">
            <hr>
            <font face="Tahoma" size="2">
            </font><div><font face="Tahoma" size="2"><b>From:</b> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b>On Behalf 
            Of </b>Jai Vasanth<br></font></div><font face="Tahoma" size="2"><b>Sent:</b> 01 February 2008 
            15:07<br><b>To:</b> Rules Users List<br><b>Subject:</b> Re: 
            [rules-users] Grouping rules<br></font><br></div>
            <div>
            <div></div>
            <div>
            <div></div><br>Thanks for responding <br>Yes,&nbsp; I did consider 
            agenda groups, but I thought agenda groups only ordered execution in 
            a particular fashion, so if Rule &quot;pick group X&quot; fires then it would 
            make sure that rules in Agenda Group X fire first before the 
            remaining but the remaining would fire eventually. Is my&nbsp; 
            understanding correct ?<br>I am looking for a solution for 
            completely isolating a rule set&nbsp; conditioned on an object 
            attribute.<br><br>
            <div class="gmail_quote">On Feb 1, 2008 12:46 AM, Anstis, Michael (M.) 
            &lt;<a href="mailto:manstis1@ford.com" target="_blank">manstis1@ford.com</a>&gt; wrote:<br>
            <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
              <div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">What about Agenda Groups?</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">Rule &quot;pick group X&quot;</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">when</font></span></div>
              <div dir="ltr" align="left"><span><font face="Courier New"><font size="2">&nbsp;&nbsp;&nbsp; <font color="#0000ff">Fact( attribute = 
              &quot;condition1&quot; )</font></font></font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">then</font></span></div>
              <div dir="ltr" align="left"><span><font face="Courier New"><font size="2">&nbsp;&nbsp;&nbsp; <font color="#0000ff">drools.setFocus(&quot;Group 
              X&quot;)</font></font></font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">end</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2"></font></span>&nbsp;</div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">Rule &quot;pick group Y&quot;</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">when</font></span></div>
              <div dir="ltr" align="left"><span><font face="Courier New"><font size="2">&nbsp;&nbsp;&nbsp; <font color="#0000ff">Fact( attribute = 
              &quot;condition2&quot; )</font></font></font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">then</font></span></div>
              <div dir="ltr" align="left"><span><font face="Courier New"><font size="2">&nbsp;&nbsp;&nbsp; <font color="#0000ff">drools.setFocus(&quot;Group 
              Y&quot;)</font></font></font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">end</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2"></font></span>&nbsp;</div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">Rule &quot;Group X1&quot;</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">Agenda Group &quot;Group X&quot;</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">when</font></span></div>
              <div dir="ltr" align="left"><span><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><font color="#0000ff" face="Courier New" size="2">then</font></span></div>
              <div dir="ltr" align="left"><span><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><font color="#0000ff" face="Courier New" size="2">end</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2"></font></span>&nbsp;</div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">Rule &quot;Group X2&quot;</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">Agenda Group &quot;Group X&quot;</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">when</font></span></div>
              <div dir="ltr" align="left"><span><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><font color="#0000ff" face="Courier New" size="2">then</font></span></div>
              <div dir="ltr" align="left"><span><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><font color="#0000ff" face="Courier New" size="2">end</font></span></div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
              <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">etc</font></span></div><br>
              <blockquote style="margin-right: 0px;">
                <div dir="ltr" align="left" lang="en-us">
                <hr>
                <font face="Tahoma" size="2"><b>From:</b> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b>On 
                Behalf Of </b>Jai Vasanth<br><b>Sent:</b> 31 January 2008 
                19:45<br><b>To:</b> <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><b>Subject:</b> 
                [rules-users] Grouping rules<br></font><br></div>
                <div>
                <div></div>
                <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></div></div></blockquote></div><br>_______________________________________________<br>rules-users 
              mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>

<br></blockquote></div><br></div></div></blockquote></div><br>_______________________________________________<br>rules-users 
          mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>

<br></blockquote></div><br></div></div></blockquote></div><br></span></div></blockquote></div><br>_______________________________________________<br>rules-users 
    mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>

<br><br clear="all"></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson 
  Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<br>&nbsp;&nbsp;Office: 
  +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, 
  a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a> 
</span></div></blockquote></div>
<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>

<br><br clear="all"></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a>
</div></div><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>