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