<div><br></div><div>   This is correct and works as designed. Please note that a direct event expiration does NOT cause a rule to be cancelled. So using sliding windows in isolation will be useless:</div><div><br></div><div>
X() over window:time(...)</div><div><br></div><div>   Will activate and fire for every single X, and that is correct. </div><div><br></div><div>   Now, if you use sliding windows in combination with other CEs, then the results will be affected by the sliding window. This is perfectly clear with accumulate/collect, but also happens when you are using multiple patterns. For instance:</div>
<div><br></div><div>X() over window:time( 1m )</div><div>Y() over window:time( 1m )</div><div><br></div><div>   This will create pairs of [X,Y] only for the X&#39;s and Y&#39;s that happened in the last minute, as intended. An X that just happened will not match an Y that happened 2 minutes ago.</div>
<div><br></div><div>   Edson</div><div><br></div><br><br><div class="gmail_quote">On Tue, Feb 28, 2012 at 7:18 AM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can confirm (using 5.3.0) that after<br>
    advance the clock to 1<br>
    insert an event with timestamp 1,<br>
    advance the clock to 3<br>
    insert another one with timestamp 3<br>
    advance the clock to 4<br>
    fire all rules<br>
a rule with<br>
   Event() over window:time( 2s )<br>
will fire twice (2 times). There is no difference between STREAM and CLOUD mode.<br>
<br>
Indeed, the documentation (Fusion, 2.6.1, Sliding Time Windows)<br>
appears to tell another story:  &quot;Sliding Time Windows allow the user<br>
to write rules that will only match events occurring in the last X<br>
time units.&quot; This is quite explicit.<br>
<br>
Also, please note that firing all rules after each insertion produces<br>
the expected results; the rule firings at T=3 and T=4 show only one<br>
event in the window.<br>
<br>
Even more surprisingly, running a rule that collects over a sliding<br>
window works as intuitively expected:<br>
   $l: List() from collect( Event() over window:time( 2s ) )<br>
Here the List will never contain more than one element, even when the<br>
simple pattern (shown above) fires twice.<br>
<span class="HOEnZb"><font color="#888888"><br>
-W<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
On 28/02/2012, Hassan &lt;<a href="mailto:azbakh01@gmail.com">azbakh01@gmail.com</a>&gt; wrote:<br>
&gt; Hi guys,<br>
&gt;<br>
&gt; While trying to understand how slinding window work, I realize that all<br>
&gt; exemples are given with &quot;accumulate&quot; or &quot;collect&quot; functions , I din&#39;t know<br>
&gt; why ??<br>
&gt;<br>
&gt; $a : List() from collect(Event1() over window:time(2s) from entry-point<br>
&gt; &quot;point&quot;)<br>
&gt;   // work<br>
&gt;<br>
&gt;<br>
&gt; Bur why<br>
&gt;<br>
&gt; $a : Event1() over window:time(2s) from entry-point &quot;point&quot;)<br>
&gt;<br>
&gt;<br>
&gt; doesn&#39;t work ??!<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Youssef AZBAKH<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context:<br>
&gt; <a href="http://drools.46999.n3.nabble.com/Slinding-window-tp3783772p3783772.html" target="_blank">http://drools.46999.n3.nabble.com/Slinding-window-tp3783772p3783772.html</a><br>
&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>