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@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@ca.com



_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users