Meant to say: using drools 5.0.1.<br><br>- Paul<br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 1:22 AM, Paul R. <span dir="ltr">&lt;<a href="mailto:reverselogic@gmail.com">reverselogic@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>I&#39;m using an accumulate on a sliding window to count the number of events, which occur in a 30 second window;<br>
the events are inserted every 5 seconds - so with a 30 second window, I would expect 6 events to occur.<br>
<br>The rule below never fires, though from the log output, it looks as though the condition has matched successfully?<br><br>declare Foo <br>    @role ( event ) <br>    @expires ( 60s ) <br>    @timestamp ( date ) <br>end<br>

<br>rule &quot;Count Foo&quot;<br>when<br>    c : Number(intValue &gt; 5) from accumulate<br>        $f : Foo()<br>            over window:time ( 30s )<br>            from entry-point ChannelDataStream, <br>        count($f))<br>

then<br>    System.out.println(&quot;Count [30s] = &quot; + c);<br>end<br><br>OBJECT ASSERTED value:com.test.DroolsTest$Foo@c52200 factId: 1<br>OBJECT ASSERTED value:com.test.DroolsTest$Foo@128edf2 factId: 3<br>OBJECT ASSERTED value:com.test.DroolsTest$Foo@1dddba factId: 4<br>

OBJECT ASSERTED value:com.test.DroolsTest$Foo@c7e8a7 factId: 5<br>OBJECT ASSERTED value:com.test.DroolsTest$Foo@7b4703 factId: 6<br>ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0] declarations: c=6(2)<br>
OBJECT ASSERTED value:com.test.DroolsTest$Foo@1732ed2 factId: 7<br>
ACTIVATION CANCELLED rule:Count Foo activationId:Count Foo [2, 0] declarations: c=6(2)<br>ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0] declarations: c=6(2)<br>OBJECT ASSERTED value:com.test.DroolsTest$Foo@be76c7 factId: 8<br>

ACTIVATION CANCELLED rule:Count Foo activationId:Count Foo [2, 0] declarations: c=6(2)<br>ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0] declarations: c=6(2)<br><br><br>Can anybody explain why this is happening? I&#39;ve attached a test case, which demonstrates the problem.<br>

<br>Thanks in advance.<br><font color="#888888"><br>- Paul<br>
</font></blockquote></div><br>