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"><<a href="mailto:cfuser@yahoo.com">cfuser@yahoo.com</a>></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'm trying to do is offset the window from 'now'. E.g.<br>
Assuming it is 12:05 and I have been receiving objects for 5 minutes, I'm<br>
trying to get this to sum received objects between 2 and 3 minutes ago.<br>
<br>
rule "Accumulate attempts over 1 minute (window over time)"<br>
when<br>
$measure : Number()<br>
from accumulate( MyData( $m:measures["attempts"],<br>
objectType=="climber" )<br>
over window:time( 2m, 3m ) from entry-point "My Stream",<br>
sum($m))<br>
<br>
then<br>
#<br>
end<br>
<br>
Looking at the SlidingTimeWindow source code, it looks as though you can't<br>
offset the window by a delay? Is that accurate? If you can'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>