I can confirm (using 5.3.0) that after
advance the clock to 1
insert an event with timestamp 1,
advance the clock to 3
insert another one with timestamp 3
advance the clock to 4
fire all rules
a rule with
Event() over window:time( 2s )
will fire twice (2 times). There is no difference between STREAM and CLOUD mode.
Indeed, the documentation (Fusion, 2.6.1, Sliding Time Windows)
appears to tell another story: "Sliding Time Windows allow the user
to write rules that will only match events occurring in the last X
time units." This is quite explicit.
Also, please note that firing all rules after each insertion produces
the expected results; the rule firings at T=3 and T=4 show only one
event in the window.
Even more surprisingly, running a rule that collects over a sliding
window works as intuitively expected:
$l: List() from collect( Event() over window:time( 2s ) )
Here the List will never contain more than one element, even when the
simple pattern (shown above) fires twice.
-W
On 28/02/2012, Hassan <azbakh01(a)gmail.com> wrote:
Hi guys,
While trying to understand how slinding window work, I realize that all
exemples are given with "accumulate" or "collect" functions , I
din't know
why ??
$a : List() from collect(Event1() over window:time(2s) from entry-point
"point")
// work
Bur why
$a : Event1() over window:time(2s) from entry-point "point")
doesn't work ??!
Thanks,
Youssef AZBAKH
--
View this message in context:
http://drools.46999.n3.nabble.com/Slinding-window-tp3783772p3783772.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users