<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Using Drools Expert 5.0.1</div>
<div>&nbsp;</div>
<div>The following rule fires both when the &#8220;not&#8221; is there, and also if the &#8220;not&#8221; is commented out. Clearly, both cannot be true, so there is something wrong somewhere.</div>
<div>&nbsp;</div>
<div>I&#8217;ve narrowed it down to the testing of the $parentEmploymentId declaration &#8211; the AccountHolder CE, which is inside the context of the &#8220;not&#8221;, is referencing $parentEmploymentId, which is declared outside the &#8220;not&#8221;.</div>
<div>If the indicated line is commented out, then the expression behaves sensibly (i.e. fires either when the &#8220;not&#8221; is used, or when it isn&#8217;t, but not both). However, an important business semantic element is then missing from the rule.</div>
<div>&nbsp;</div>
<div>Is this a bug in Drools, or am I misusing something?</div>
<div>&nbsp;</div>
<div><font face="Courier New, monospace" size="2">rule <font color="#2A00FF">&quot;RS7713.9.2_&quot;</font></font></div>
<div><font face="Courier New, monospace" size="2">when</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">Employment ( $parentEmploymentId : myId )</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">not </font><font face="Courier New, monospace" size="2"># if </font><font face="Courier New, monospace" size="2">the </font><font face="Courier New, monospace" size="2">not is commented out, </font><font face="Courier New, monospace" size="2">the
</font><font face="Courier New, monospace" size="2">rule still fires</font><font face="Courier New, monospace" size="2">!!!!</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">(</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">AccountHolder </font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">( </font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">$parentEmployerInfoId : myId</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">, parentId == $parentEmploymentId</font><font face="Courier New, monospace" size="2"> # if this line is commented, it behaves </font><font face="Courier New, monospace" size="2">sensibly
(per the </font><font face="Courier New, monospace" size="2">&#8216;</font><font face="Courier New, monospace" size="2">not</font><font face="Courier New, monospace" size="2">&#8217;</font><font face="Courier New, monospace" size="2">)</font><font face="Courier New, monospace" size="2">,
but misses an important </font><font face="Courier New, monospace" size="2">business </font><font face="Courier New, monospace" size="2">semantic</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">)</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">and </font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">BusinessName </font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">( </font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">parentId == $parentEmployerInfoId</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">, lines contains </font><font face="Courier New, monospace" size="2" color="#2A00FF">&quot;D</font><font face="Courier New, monospace" size="2" color="#2A00FF">I</font><font face="Courier New, monospace" size="2" color="#2A00FF">STRESS&quot;</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">)</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">) </font></div>
<div><font face="Courier New, monospace" size="2">then</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New, monospace" size="2">;</font></div>
<div><font face="Courier New, monospace" size="2">end</font></div>
<div>&nbsp;</div>
<div style="margin-top: 5pt; margin-bottom: 5pt; "><font face="Cambria, serif" size="4" color="#4F81BD"><b>Tom Murphy<br>

</b><font face="Calibri, sans-serif" size="2" color="#000000"><i>Business Process Consultant<br>

Wells Fargo HCFG - CORE Deal Decisioning Platform<br>

800 S. Jordan Creek Parkway | West Des Moines, IA 50266<br>

MAC: </i></font><font face="Calibri, sans-serif" size="2" color="#000000"><i>X2301-01B<br>

</i></font><font face="Calibri, sans-serif" size="2" color="#000000"><b>Office: </b></font><font face="Calibri, sans-serif" size="2" color="#1F497D"><b>515 324 4853</b></font><font face="Calibri, sans-serif" size="2" color="#000000"><b> | </b></font><font face="Calibri, sans-serif" size="2" color="#FF0000"><b>Mobile:
515 423 4334<br>

</b></font><font face="Calibri, sans-serif" size="1" color="#808080"><i>This message may contain confidential and/or privileged information.&nbsp; If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or
take any action based on this message or any information herein.&nbsp; If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.&nbsp; Thank you for your cooperation.</i></font></font></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</font>
</body>
</html>