<div dir="ltr"><br> Hmm, in this case, it is definitively a bug. "not" IS the existential qualifier, i.e., the constrary of exists. So it should be simply redundant to write "not exists". Need to investigate that.<br>
<br> []s<br> Edson<br><br><div class="gmail_quote">2008/7/31 <span dir="ltr"><<a href="mailto:ringsah@comcast.net">ringsah@comcast.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<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="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;"><div><div></div><div class="Wj3C7c">-------------- Original message -------------- <br>From: Ingomar Otter <<a href="mailto:iotter@mac.com" target="_blank">iotter@mac.com</a>> <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 <a href="mailto:ringsah@comcast.net" target="_blank">ringsah@comcast.net</a>: <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")); >
> 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>
</div></div>> > This is not what I am observin!
g, howe
ver. I am finding <br><div class="Ih2E3d">> > 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>> > <a href="mailto:rules-users@lists.jboss.org" target="_blank">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>> _______________________________________________ <br>> rules-users mailing list <br>
> <a href="mailto:rules-users@lists.jboss.org" target="_blank">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> </div>
</blockquote></div>
<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></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>