<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Good question, not sure it is documented properly at the moment, I think it is the extends keyword, but you can’t easily use it anyway as you want the inverse of the other rule (regex doesn’t match) rather than the regex does match.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thomas<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] <b>On Behalf Of </b>Java Bean<br><b>Sent:</b> 06 December 2011 16:35<br><b>To:</b> Rules Users List<br><b>Subject:</b> Re: [rules-users] Salience & activation-group<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>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't valid - at least if you are just doing in comparisons.<o:p></o:p></p><p>How do I use inheritance in Drools ?<o:p></o:p></p><div id="yui_3_2_0_148_132311143960156"><div id="yui_3_2_0_148_1323111439601107"><div class=MsoNormal align=center style='text-align:center'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><hr size=1 width="100%" align=center></span></div><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> "Swindells, Thomas" <<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>><br><b>To:</b> Rules Users List <<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>> <br><b>Sent:</b> Tuesday, December 6, 2011 11:15 AM<br><b>Subject:</b> Re: [rules-users] Salience & activation-group<br></span><br><br>> Thanks for your quick response, but I am still confused.<br>><br>> An activation-group assures that only one rule in the group will fire (an XOR<br>> group)<br>><br>> 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'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>> The regular expression test has the higher salience and will trigger if it is a bad<br>> 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'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>><br>> In the mean time I will re-write the underWritingClassAsInt method to deal<br>> 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'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><o:p></o:p></p></div></div></div></div></body></html>