<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hum, rigth ...<br>
    You want the last to be false ?<br>
    <br>
    may be something like that (ignore the type first to get the last,
    then test it in a eval)<br>
    <pre>rule "check_agains_last"
when
     $e1 : Event (eventType == Event.EventType.EVENT1)
     $e2 : Event (this before $e1)
     not Event (this after $e2)
<b>     eval ($e2.getEventType() == Event.EventType.EVENT2)</b>
then
    ...
end
</pre>
    <br>
    But to me this rule is too complex according to what it tells ...
    You should implement the chaining via the listener.<br>
    <br>
    <br>
    <br>
    Le 06/10/2011 19:09, tungl a &eacute;crit&nbsp;:
    <blockquote cite="mid:1317920978269-3400371.post@n3.nabble.com"
      type="cite">
      <pre wrap="">Thanks Vincent, but when I do it like this:


It's sufficient that EVENT2 has happened anywhere before EVENT1.

So EVENT1, EVENT2 =&gt; false, false
EVENT2, EVENT1 =&gt; false, true (that's right, but:)
EVENT2, EVENT1, EVENT1 =&gt; false, true, true (?)

How do I fix that?

--
View this message in context: <a class="moz-txt-link-freetext" href="http://drools.46999.n3.nabble.com/Get-previous-fact-from-working-memory-tp3399064p3400371.html">http://drools.46999.n3.nabble.com/Get-previous-fact-from-working-memory-tp3399064p3400371.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>
    <br>
    <div class="moz-signature">-- <br>
      <!--  @author Hadrien HUGOT -->
      <!-- Mod&egrave;le signature thunderbird et autres  -->
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <title>CARTE DE VISITE</title>
      <span
style="font-size:13.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#15185A">Vincent
        LEGENDRE</span><br>
      <i><span style="font-size:8.5pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#15185A">Consultant
          S&eacute;nior</span></i><br>
      <span style="font-size:4.5pt"> <br>
      </span>
      <span
style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#15185A">EURODECISION<o:p></o:p></span><br>
      <span
style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#15185A">9A
        rue de la Porte de Buc 78000 VERSAILLES<br>
        T&eacute;l. : +33 (0)1 39 07 12 40<br>
        Direct : +33 (0)1 39 07 26 16<br>
        <a href="www.eurodecision.com">www.eurodecision.com</a></span><br>
      <a href="http://www.eurodecision.com/"><span style="font-size:
          12pt; font-family: &quot;Times New
          Roman&quot;,&quot;serif&quot;; color: windowtext;
          text-decoration: none;"> <img
            src="cid:part1.09090408.05010104@eurodecision.com"
            alt="EURODECISION" border="no"></span></a><a
        href="http://www.eurodecision.com/"><span
          style="font-size:12.0pt;font-family:&quot;Times New
          Roman&quot;,&quot;serif&quot;;color:windowtext;
          text-decoration:none;text-underline:none"> </span></a>
    </div>
  </body>
</html>