<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Both should fire when there is no
      message.<br>
      <br>
      This said, the two are not equivalent. <br>
      The negation of <br>
      Message( sent == true, status != INITIALIZED )<br>
      is:<br>
      Message( sent == false <b>||</b> status == INITIALIZED )<br>
      That is, by deMorgan's laws, you need to negate<br>
      the operators AND flip the and/or connectives.<br>
      <br>
      In case something still seems weird, could you<br>
      please specify the drools version you're using, <br>
      as well as which facts you are inserting exactly?<br>
      <br>
      Thanks<br>
      Davide<br>
      <br>
      <br>
      On 05/29/2014 09:33 PM, rogerL wrote:<br>
    </div>
    <blockquote cite="mid:1401395595103-4029761.post@n3.nabble.com"
      type="cite">
      <pre wrap="">Are the two following statements not equivalent?

    forall($msg:Message()
            Message(this==$msg, sent==true, status!=State._INITIALIZED)
    )


    not( Message(sent==false, status==State._INITIALIZED) )

My understanding is that they both ensure that there are no Message objects
in WM with property 'sent' set to false and property 'status' set to
State._INITIALIZED.

In my situation, the 'forall' approach is working as expected, the 'not'
approach fires once (when there are no Message objects in WM) and never
again.

Appreciate if anyone could shed light on this.



--
View this message in context: <a class="moz-txt-link-freetext" href="http://drools.46999.n3.nabble.com/Not-and-forall-operator-behaviour-tp4029761.html">http://drools.46999.n3.nabble.com/Not-and-forall-operator-behaviour-tp4029761.html</a>
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

</pre>
    </blockquote>
    <br>
  </body>
</html>