[rules-users] Variable length sliding windows?

Wolfgang Laun wolfgang.laun at gmail.com
Thu Mar 1 16:51:58 EST 2012


Don't you fret because this isn't available. It's not difficult to collect
facts over a variable interval, provided the timestamp is a regular
property. An auxiliary fact defines the window's boundaries, and then you
use ops like <= to select the facts.
-W

On 1 March 2012 17:25, Lauer, Will C <Will.Lauer at ca.com> wrote:

> I'm evaluating the use of Drools Fusion for a new project and have a
> question about sliding windows that wasn't clear from the documentation.
> Does the time specification in a sliding window need to be hardcoded in the
> rule, or can it be derived from something else? Basically, I'm wondering
> whether I can write a rule that looks something like
>
>        when
>                ...
>                Window ($win : length)
>                Number (intValue > $someValue) from accumulate (
>                        Sample($len: length, value > $someThreashold) over
> window:time ($win),
>                        sum($len) )
>        then
>                ...
>        end
>
> I know window:time() supports constant values like "10m", but can the
> window be driven from one of the other facts in the LHS picked up by the
> LHS of the rule?
>
>
> Will Lauer
> CA Technologies
> Sr Software Architect
> Tel:  +1-713-625-9410
> Cell: +1-979-820-2210
> Will.Lauer at ca.com
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120301/aac588ad/attachment.html 


More information about the rules-users mailing list