<div dir="ltr">hi,<div><br></div><div>i have a rule file as follows:</div><div><br></div><div><div>declare Event </div><div> @role( event ) </div><div>end </div><div><br></div><div>declare window Ticks</div><div> Event()</div>
<div> over window:time(1m )</div><div>end</div><div><br></div><div>rule "More than 5 file added events"</div><div>when </div><div> $p: RuleContext() </div><div> Number(intValue > 4) from </div>
<div> accumulate( $e :Event (name == "new file added") from window Ticks, count($e) ) </div><div>then </div><div> Event event = new Event("too many files added last minute",$p.getOldContext().getParent(),new Date());</div>
<div> event.display();</div><div>end </div></div><div><br></div><div><br></div><div>this rule gets fired only if i add more than 4 files all at once..</div><div>say if i add first 2 files within the first 10 seconds, next two files after the 20th second and next two files after 40th second, this rule is not getting fired.. ( there are 6 file added events in the window over past 1 min and the rule should have got fired ). what is the problem with the current rules and how can i modify it to meet my requirement?</div>
<div><br></div><div><br></div><div>Thanks.</div></div>