<html><body>
<DIV>Ingomar,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I tried this, and indeed that worked. I was surprised, as I thought "not" was meant more to mean that a fact inside its parentheses did not exist, rather than a logical negation, which is the way you used it in your example. However, if I do what you said, it does work exactly how I expected "not" alone to work.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks!</DIV>
<DIV>-Hans</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message -------------- <BR>From: Ingomar Otter &lt;iotter@mac.com&gt; <BR><BR>&gt; Hans, <BR>&gt; If you change "not NegativeResult()" to "not (exits <BR>&gt; NegativeResult())" this should result in the expected behaviour. <BR>&gt; <BR>&gt; Cheers, <BR>&gt; Ingomar <BR>&gt; <BR>&gt; Am 31.07.2008 um 17:19 schrieb ringsah@comcast.net: <BR>&gt; <BR>&gt; &gt; How is "not" supposed to work with insertLogical? Assume I have two <BR>&gt; &gt; different rules whose conditions are mutually exclusive, like the <BR>&gt; &gt; following: <BR>&gt; &gt; rule "Rule One" <BR>&gt; &gt; when <BR>&gt; &gt; not NegativeResult() <BR>&gt; &gt; then <BR>&gt; &gt; insertLogical(new ApplicantStatus("Approved")); <BR>&gt; &gt; end <BR>&gt; &gt; rule "Rule Two" <BR>&gt; &gt; when <BR>&gt; &gt; NegativeResult() <BR>&gt; &gt; then <BR>&gt; &gt; insertLogical(new ApplicantStatus("Denied")); <BR>&gt; 
&gt; end <BR>&gt; &gt; Assume that the above two rules are the only way an ApplicantStatus <BR>&gt; &gt; fact can be inserted into working memory. I would expect, after all <BR>&gt; &gt; rules are run, that it would be impossible for there to be one <BR>&gt; &gt; ApplicantStatus with "Approved" as its reason, and another with <BR>&gt; &gt; "Denied" as its reason, in the working memory. <BR>&gt; &gt; I would expect that, before any NegativeResult is inserted, that <BR>&gt; &gt; rule one could run, and insert an ApplicantStatus fact with an <BR>&gt; &gt; "Approved" reason. Then, after a NegativeResult is inserted, that <BR>&gt; &gt; rule two could run, and insert an ApplicantStatus fact with a <BR>&gt; &gt; "Denied" reason. At this point I would expect that the original <BR>&gt; &gt; ApplicantStatus fact, with an "Approved" reason, would be retracted, <BR>&gt; &gt; since the conditions under which it was inserted are no longer true. <BR>&gt; &gt; This is not what I am observing, howe
ver. I am finding <BR>&gt; &gt; ApplicantStatus facts with both reasons in working memory at the end <BR>&gt; &gt; of the rules run. Should "not" work as I expect with regard to <BR>&gt; &gt; inserting a fact via insertLogical()? Or is this a known limitation, <BR>&gt; &gt; or simply the way it is designed to work? <BR>&gt; &gt; Thanks, <BR>&gt; &gt; -Hans_______________________________________________ <BR>&gt; &gt; rules-users mailing list <BR>&gt; &gt; rules-users@lists.jboss.org <BR>&gt; &gt; https://lists.jboss.org/mailman/listinfo/rules-users <BR>&gt; <BR>&gt; _______________________________________________ <BR>&gt; rules-users mailing list <BR>&gt; rules-users@lists.jboss.org <BR>&gt; https://lists.jboss.org/mailman/listinfo/rules-users </BLOCKQUOTE></body></html>