<html><body>
<DIV><FONT size=2>
<P>How is "</FONT><FONT face="Courier New" size=2>not</FONT><FONT size=2>" supposed to work with </FONT><FONT face="Courier New" size=2>insertLogical</FONT><FONT size=2>? Assume I have two different rules whose conditions are mutually exclusive, like the following:</P></FONT><B><FONT face="Courier New" color=#960000 size=2>
<P>rule</B></FONT><FONT face="Courier New" size=2> </FONT><FONT face="Courier New" color=#008000 size=2>"</FONT><FONT face="Courier New" color=#008000 size=2>Rule One</FONT><FONT face="Courier New" color=#008000 size=2>"</P></FONT><FONT face="Courier New" size=2>
<P></FONT><B><FONT face="Courier New" color=#960000 size=2>when</P></B></FONT><FONT face="Courier New" size=2>
<P></FONT><FONT face="Courier New" size=2>not NegativeResult()</P></FONT><FONT face="Courier New" size=2>
<P></FONT><B><FONT face="Courier New" color=#960000 size=2>then</B></FONT><FONT face="Courier New" size=2> </P>
<P></FONT><B><FONT face="Courier New" color=#960000 size=2>insertLogical</B></FONT><FONT face="Courier New" size=2>(</FONT><FONT face="Courier New" size=2>new ApplicantStatus("Approved")</FONT><FONT face="Courier New" size=2>);</P></FONT><B><FONT face="Courier New" color=#960000 size=2>
<P>end</P></B></FONT><FONT face="Courier New" size=2></FONT><B><FONT face="Courier New" color=#960000 size=2>
<P>rule</B></FONT><FONT face="Courier New" size=2> </FONT><FONT face="Courier New" color=#008000 size=2>"</FONT><FONT face="Courier New" color=#008000 size=2>Rule Two</FONT><FONT face="Courier New" color=#008000 size=2>"</P></FONT><FONT face="Courier New" size=2>
<P></FONT><B><FONT face="Courier New" color=#960000 size=2>when</P></B></FONT><FONT face="Courier New" size=2>
<P></FONT><FONT face="Courier New" size=2>NegativeResult()</P></FONT><FONT face="Courier New" size=2>
<P></FONT><B><FONT face="Courier New" color=#960000 size=2>then</B></FONT><FONT face="Courier New" size=2> </P>
<P></FONT><B><FONT face="Courier New" color=#960000 size=2>insertLogical</B></FONT><FONT face="Courier New" size=2>(</FONT><FONT face="Courier New" size=2>new ApplicantStatus("Denied")</FONT><FONT face="Courier New" size=2>);</P></FONT><B><FONT face="Courier New" color=#960000 size=2>
<P>end</P></B></FONT><FONT face="Courier New" size=2></FONT><FONT size=2>
<P>Assume that the above two rules are the only way an </FONT><FONT face="Courier New" size=2>ApplicantStatus</FONT><FONT size=2> fact can be inserted into working memory. I would expect, after all rules are run, that it would be impossible for there to be one </FONT><FONT face="Courier New" size=2>ApplicantStatus</FONT><FONT size=2> with </FONT><FONT face="Courier New" size=2>"Approved"</FONT><FONT size=2> as its reason, and another with </FONT><FONT face="Courier New" size=2>"Denied"</FONT><FONT size=2> as its reason, in the working memory.</P>
<P>I would expect that, before any </FONT><FONT face="Courier New" size=2>NegativeResult</FONT><FONT size=2> is inserted, that rule one could run, and insert an </FONT><FONT face="Courier New" size=2>ApplicantStatus</FONT><FONT size=2> fact with an </FONT><FONT face="Courier New" size=2>"Approved"</FONT><FONT size=2> reason. Then, after a </FONT><FONT face="Courier New" size=2>NegativeResult</FONT><FONT size=2> is inserted, that rule two could run, and insert an </FONT><FONT face="Courier New" size=2>ApplicantStatus</FONT><FONT size=2> fact with a </FONT><FONT face="Courier New" size=2>"Denied"</FONT><FONT size=2> reason. At this point I would expect that the original </FONT><FONT face="Courier New" size=2>ApplicantStatus</FONT><FONT size=2> fact, with an </FONT><FONT face="Courier New" size=2>"Approved"</FONT><FONT size=2> reason, would be retracted, since the conditions under which it was inserted are no longer true.</P>
<P>This is not what I am observing, however. I am finding </FONT><FONT face="Courier New" size=2>ApplicantStatus</FONT><FONT size=2> facts with both reasons in working memory at the end of the rules run. Should "not" work as I expect with regard to inserting a fact via </FONT><FONT face="Courier New" size=2>insertLogical()</FONT><FONT size=2>? Or is this a known limitation, or simply the way it is designed to work?</P>
<P>Thanks,</P>
<P>-Hans</P></FONT></DIV></body></html>