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.
[]s Edson 2008/7/31 <[EMAIL PROTECTED]> > Ingomar, > > 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. > > Thanks! > -Hans > > > -------------- Original message -------------- > From: Ingomar Otter <[EMAIL PROTECTED]> > > > Hans, > > If you change "not NegativeResult()" to "not (exits > > NegativeResult())" this should result in the expected behaviour. > > > > Cheers, > > Ingomar > > > > Am 31.07.2008 um 17:19 schrieb [EMAIL PROTECTED]: > > > > > How is "not" supposed to work with insertLogical? Assume I have two > > > different rules whose conditions are mutually exclusive, like the > > > following: > > > rule "Rule One" > > > when > > > not NegativeResult() > > > then > > > insertLogical(new ApplicantStatus("Approved")); > > > end > > > rule "Rule Two" > > > when > > > NegativeResult() > > > then > > > insertLogical(new ApplicantStatus("Denied")); > > end > > > Assume that the above two rules are the only way an ApplicantStatus > > > 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 > > > ApplicantStatus with "Approved" as its reason, and another with > > > "Denied" as its reason, in the working memory. > > > I would expect that, before any NegativeResult is inserted, that > > > rule one could run, and insert an ApplicantStatus fact with an > > > "Approved" reason. Then, after a NegativeResult is inserted, that > > > rule two could run, and insert an ApplicantStatus fact with a > > > "Denied" reason. At this point I would expect that the original > > > ApplicantStatus fact, with an "Approved" reason, would be retracted, > > > since the conditions under which it was inserted are no longer true. > > > This is not what I am observin! g, howe ver. I am finding > > > ApplicantStatus 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 insertLogical()? Or is this a known limitation, > > > or simply the way it is designed to work? > > > Thanks, > > > -Hans_______________________________________________ > > > rules-users mailing list > > > rules-users@lists.jboss.org > > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > > rules-users mailing list > > rules-users@lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > -- Edson Tirelli JBoss Drools Core Development JBoss, a division of Red Hat @ www.jboss.com
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users