I have around 8 to 9 conditions. Around 12 rules in each drl file(files &amp;rules will grow). This will make rule file complicated.<br><br>
<div class="gmail_quote">On Mon, Nov 23, 2009 at 1:19 PM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Best to specify all conditions in full, with all relevant properties,<br>i.e., add sale != &quot;Junion&quot;/&quot;Senior&quot; in rules 2 and 4.<br>
-W<br>
<div>
<div></div>
<div class="h5"><br><br><br><br>On 11/23/09, Lindy hagan &lt;<a href="mailto:lindyhagan@gmail.com">lindyhagan@gmail.com</a>&gt; wrote:<br>&gt; I have 4 drl files in my app. Loading all the 4 files during application<br>&gt; startup.<br>
&gt; If any rule is satisfied in File 1,I don&#39;t want File 2 be called.Should<br>&gt; execute File 3 and 4.<br>&gt; If rules in File 1 is not satisfied,want to call File 2 then File 3 and 4.<br>&gt;<br>&gt; At present I am doing this way.Please let me know if this is ok or if there<br>
&gt; is any better solution.<br>&gt;<br>&gt; Set an attribute when a rule is satisfied. (attribute is not dummy,I need it<br>&gt; in my app)<br>&gt; Attribute is checked in each and every if it is null.<br>&gt;<br>&gt;<br>
&gt; Example File1.drl contains 2 rules.If first rule is satisfied, don&#39;t want to<br>&gt; execute second rule.So setting rule with a valid number.<br>&gt;<br>&gt;<br>&gt; File1.drl<br>&gt;<br>&gt; rule &quot;1.Age Factor and Junior&quot;<br>
&gt;      when<br>&gt;           d : CustomerDetail( rule == &quot;&quot; &amp;&amp; sale == &#39;Junior&#39; &amp;&amp; age in<br>&gt; (&quot;16&quot;,&quot;17&quot;))<br>&gt;      then<br>&gt;      System.out.println(&quot;Junior and Age Satisfied &quot;);<br>
&gt;       d.setRule(&quot;1&quot;);<br>&gt; end<br>&gt;<br>&gt; rule &quot;2.Junior only Age Factor&quot;<br>&gt;      when<br>&gt;           m : CustomerDetail( rule == &quot;&quot; &amp;&amp; age in (&quot;16&quot;,&quot;17&quot;))<br>
&gt;      then<br>&gt;       System.out.println(&quot;Only junior Age satisfied.&quot;);<br>&gt;       m.setRule(&quot;2&quot;);<br>&gt; end<br>&gt;<br>&gt;<br>&gt;<br>&gt; File2.drl<br>&gt;<br>&gt; rule &quot;3.Age Factor and Senior&quot;<br>
&gt;      when<br>&gt;           d : CustomerDetail( rule == &quot;&quot; &amp;&amp; sale == &#39;Senior&#39; &amp;&amp; age in<br>&gt; (&quot;70&quot;,&quot;75&quot;))<br>&gt;      then<br>&gt;      System.out.println(&quot;Senior and Age Satisfied &quot;);<br>
&gt;       d.setRule(&quot;10&quot;);<br>&gt; end<br>&gt;<br>&gt; rule &quot;4.Senior only Age Factor &quot;<br>&gt;      when<br>&gt;           m : CustomerDetail( rule == &quot;&quot; &amp;&amp; age in (&quot;70&quot;,&quot;75&quot;))<br>
&gt;      then<br>&gt;       System.out.println(&quot;Only senior Age satisfied.&quot;);<br>&gt;       m.setRule(&quot;11&quot;);<br>&gt; end<br>&gt;<br>&gt; This one works but is it possible , If the rule 1 is satisfied, rule2 is<br>
&gt; still executed.Is there any way we can stop rule2 from beinge executed?<br>&gt; Similary stop File2.drl being executed. Any suggestions?<br>&gt;<br></div></div>_______________________________________________<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></blockquote>
</div><br>