<div>Please ignore my previous email as I did not include subject.</div>
<div> </div>
<div>I have 4 drl files in my app. Loading all the 4 during application startup.<br>If any rule is satisfied in File 1,I don&#39;t want File 2 be called.Should execute File 3 and 4.<br>Similarly If rules in File 1 is not satisfied,want to call File 2 then File 3 and 4.</div>

<p>At present I am doing this way.Please let me know if this is ok or if there is any better solution.</p>
<p>Set an attribute when a rule is satisfied. (attribute is not dummy,I need it in my app)<br>Attribute is checked in each and every if it is null.</p>
<p><br>Example File1.drl contains 2 rules.If first rule is satisfied, don&#39;t want to execute second rule.So setting rule with a valid number.</p>
<p><br>File1.drl</p>
<p>rule &quot;1.Age Factor and Junior&quot;<br>     when<br>          d : CustomerDetail( rule == &quot;&quot; &amp;&amp; sale == &#39;Junior&#39; &amp;&amp; age in (&quot;16&quot;,&quot;17&quot;))<br>     then         <br>
     System.out.println(&quot;Junior and Age Satisfied &quot;); <br>      d.setRule(&quot;1&quot;);<br>end</p>
<p>rule &quot;2.Junior only Age Factor&quot;<br>     when<br>          m : CustomerDetail( rule == &quot;&quot; &amp;&amp; age in (&quot;16&quot;,&quot;17&quot;))<br>     then          <br>      System.out.println(&quot;Only junior Age satisfied.&quot;);<br>
      m.setRule(&quot;2&quot;);<br>end</p>
<p> </p>
<p>File2.drl</p>
<p>rule &quot;3.Age Factor and Senior&quot;<br>     when<br>          d : CustomerDetail( rule == &quot;&quot; &amp;&amp; sale == &#39;Senior&#39; &amp;&amp; age in (&quot;70&quot;,&quot;75&quot;))<br>     then         <br>
     System.out.println(&quot;Senior and Age Satisfied &quot;); <br>      d.setRule(&quot;10&quot;);<br>end</p>
<p>rule &quot;4.Senior only Age Factor &quot;<br>     when<br>          m : CustomerDetail( rule == &quot;&quot; &amp;&amp; age in (&quot;70&quot;,&quot;75&quot;))<br>     then          <br>      System.out.println(&quot;Only senior Age satisfied.&quot;);<br>
      m.setRule(&quot;11&quot;);<br>end</p>
<p>This one works but I see these disadvantages:<br>1)If the rule 1 is satisfied, rule2 is still executed.Similary all the rules in File2.drl.<br>2)Might impact performance all the 4 rules are called all time.</p>
<p>Any suggestions?</p>