<p id="yui_3_2_0_148_1323111439601102">Or
 do the check for both parts in both rules , or use inheritance, but the
 easiest way would probably be to just have it return null if the number
 isn&#39;t valid - at least if you are just doing in comparisons.<br></p><p>How do I use inheritance in Drools ?<br></p>  <div class="yui_3_2_0_148_132311143960154" id="yui_3_2_0_148_132311143960156" style="font-family: arial, helvetica, sans-serif; font-size: 10pt;">
 <div id="yui_3_2_0_148_1323111439601107" class="yui_3_2_0_148_132311143960161" style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <font id="yui_3_2_0_148_1323111439601109" face="Arial" size="2"> <hr size="1">
  <b><span style="font-weight:bold;">From:</span></b> &quot;Swindells, Thomas&quot; &lt;<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt; <br>
 <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, December 6, 2011 11:15 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users] Salience &amp; activation-group<br> </font> <br>
<br>&gt; Thanks for your quick response, but I am still confused.<br>&gt;<br>&gt; An activation-group assures that only one rule in the group will fire (an XOR<br>&gt; group)<br>&gt;<br>&gt; Salience controls the order of evaluation<br>
No salience controls the order of the activations firing.<br>There is no ordering of evaluating rules because rules aren&#39;t evaluated.<br>Instead the rules clauses are transposed into a RETE graph which evaluates each clause as the necessary data is available.<br>
If two rules share a clause then they may share a node in the RETE graph.<br><br>&gt; The regular expression test has the higher salience and will trigger if it is a bad<br>&gt; number ... so why is the other rule even being tested?<br>
The RETE graph is evaluated as deeply as possible in order to produce the current list of possible activations.<br>The activations are then sorted by salience and filtered by agenda-group. The top of the list is taken and fired.<br>
If any other pending activations have the same activation-group those pending activations are then removed.<br>(It&#39;s a lot more complicated than that as you have things such as lock on active, no-loop, etc but it hopefully<br>
makes it make a little more sense.<br><br>&gt;<br>&gt; In the mean time I will re-write the underWritingClassAsInt method to deal<br>&gt; with a bad number ... but this seems wrong to me.<br>Or
 do the check for both parts in both rules , or use inheritance, but the
 easiest way would probably be to just have it return null if the number
 isn&#39;t valid - at least if you are just doing in comparisons.<br><br>Thomas<br><br><br>**************************************************************************************<br>This
 message is confidential and intended only for the addressee. If you 
have received this message in error, please immediately notify the <a href="mailto:postmaster@nds.com">postmaster@nds.com</a>
 and delete it from your system as well as any copies. The content of 
e-mails as well as traffic data may be monitored by NDS for employment 
and security purposes. To protect the environment please do not print 
this e-mail unless necessary.<br><br>NDS Limited. Registered Office: One
 London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company 
registered in England and Wales. Registered no. 3080780. VAT no. GB 603 
8808 40-00<br>**************************************************************************************<br><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><br> </div> </div>