In this case: the sum of measures in the window between 3 and 2 minutes<br>ago equals the difference of the measures in the window between 3 and now<br>and 2 and now, respectively.<br><br>-W<br><br><div class="gmail_quote">
On 6 September 2011 21:56, cfuser <span dir="ltr">&lt;<a href="mailto:cfuser@yahoo.com">cfuser@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Can you offset the sliding window functionality to look for a window in the<br>
past?  What I&#39;m trying to do is offset the window from &#39;now&#39;.  E.g.<br>
Assuming it is 12:05 and I have been receiving objects for 5 minutes, I&#39;m<br>
trying to get this to sum received objects between 2 and 3 minutes ago.<br>
<br>
rule &quot;Accumulate attempts over 1 minute (window over time)&quot;<br>
    when<br>
        $measure : Number()<br>
            from accumulate( MyData( $m:measures[&quot;attempts&quot;],<br>
objectType==&quot;climber&quot; )<br>
                over window:time( 2m, 3m ) from entry-point &quot;My Stream&quot;,<br>
                sum($m))<br>
<br>
    then<br>
    #<br>
end<br>
<br>
Looking at the SlidingTimeWindow source code, it looks as though you can&#39;t<br>
offset the window by a delay?  Is that accurate?  If you can&#39;t do that<br>
directly via a sliding window, is there a way to work around this?<br>
<br>
TIA.<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/CEP-sliding-window-in-the-past-tp3314638p3314638.html" target="_blank">http://drools.46999.n3.nabble.com/CEP-sliding-window-in-the-past-tp3314638p3314638.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>