[rules-users] Variable length sliding windows?

Lauer, Will C Will.Lauer at ca.com
Thu Mar 1 11:25:23 EST 2012


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






More information about the rules-users mailing list