<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">No, the combination of accumulate/count
      + over should be fine (I didn't check though).<br>
      The problem is that you are simply creating the Events, but not
      inserting them in the wm.<br>
      You need to add insert(event) to your rules<br>
      <br>
      <br>
      On 03/11/2014 07:39 PM, grules wrote:<br>
    </div>
    <blockquote
cite="mid:777C617D1E76654192F0E67513AB376203994A2A@EXCHANGEMBW2.tmghealth.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I
            think you have to follow the structure of accumulate
            function. Like
            <o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><b><i><span
                style="font-size:10.5pt;font-family:&quot;Courier
                New&quot;;color:black;border:none windowtext
                1.0pt;padding:0in">&lt;result pattern&gt;</span></i></b><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"> from accumulate(
          </span><b><i><span
                style="font-size:10.5pt;font-family:&quot;Courier
                New&quot;;color:black;border:none windowtext
                1.0pt;padding:0in">&lt;source pattern&gt;</span></i></b><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">,<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            init(
          </span><b><i><span
                style="font-size:10.5pt;font-family:&quot;Courier
                New&quot;;color:black;border:none windowtext
                1.0pt;padding:0in">&lt;init code&gt;</span></i></b><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"> ),<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            action(
          </span><b><i><span
                style="font-size:10.5pt;font-family:&quot;Courier
                New&quot;;color:black;border:none windowtext
                1.0pt;padding:0in">&lt;action code&gt;</span></i></b><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"> ),<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            reverse(
          </span><b><i><span
                style="font-size:10.5pt;font-family:&quot;Courier
                New&quot;;color:black;border:none windowtext
                1.0pt;padding:0in">&lt;reverse code&gt;</span></i></b><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"> ), (optional)<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            result(
          </span><b><i><span
                style="font-size:10.5pt;font-family:&quot;Courier
                New&quot;;color:black;border:none windowtext
                1.0pt;padding:0in">&lt;result expression&gt;</span></i></b><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"> ) )<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">examples are:<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">when<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">&nbsp;&nbsp;&nbsp; $order : Order()<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">&nbsp;&nbsp;&nbsp; $total : Number( doubleValue
            &gt; 100 )
            <o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from accumulate(
            OrderItem( order == $order, $value : value ),<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;init(
            double total = 0; ),<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            action( total += $value; ),<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result( total ) )<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">then<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">&nbsp;&nbsp;&nbsp; # apply discount to $order<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:#0070C0">end<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">As I understand from your code,
            <o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;line-height:13.65pt;mso-list:l0
          level1 lfo1;background:whitesmoke;vertical-align:baseline">
          <span style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><span style="mso-list:Ignore">1.<span
                style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
              </span></span></span><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">Make List for Event class, because
            accumulate will loop through the elements of
            List&lt;Event&gt;<o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;line-height:13.65pt;mso-list:l0
          level1 lfo1;background:whitesmoke;vertical-align:baseline">
          <span style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><span style="mso-list:Ignore">2.<span
                style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
              </span></span></span><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">Init (write action codes, i.e.
            initialize value so you will find how many time it got
            looped)<o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;line-height:13.65pt;mso-list:l0
          level1 lfo1;background:whitesmoke;vertical-align:baseline">
          <span style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><span style="mso-list:Ignore">3.<span
                style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
              </span></span></span><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">Write code inside the block of
            action(//code here) and
            <o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;line-height:13.65pt;mso-list:l0
          level1 lfo1;background:whitesmoke;vertical-align:baseline">
          <span style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><span style="mso-list:Ignore">4.<span
                style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
              </span></span></span><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">Update it in result block i.e.
            result(//update here);<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black">Being said, follow the structure 1)
            init, 2) action, 3) result as above..<o:p></o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"
style="line-height:13.65pt;background:whitesmoke;vertical-align:baseline"><span
            style="font-size:11.0pt;font-family:&quot;Courier
            New&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
            Sandhya Sree [via Drools] [<a class="moz-txt-link-freetext" href="mailto:ml-node+">mailto:ml-node+</a><a
              moz-do-not-send="true"
              href="/user/SendEmail.jtp?type=node&amp;node=4028640&amp;i=0"
              target="_top" rel="nofollow" link="external">[hidden
              email]</a>]
            <br>
            <b>Sent:</b> Tuesday, March 11, 2014 1:51 PM<br>
            <b>To:</b> Gopu Shrestha<br>
            <b>Subject:</b> [rules-users] sliding window problem<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <div>
          <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.35pt;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">i
              have a class called Event which has the following members
              { name, source, timestamp } with getters ,setters and
              constructor. i have a rule file which creates Event
              objects whenever a file is added / deleted in a particular
              folder. the rule file is as follows<o:p></o:p></span></p>
          <pre style="margin-bottom:7.5pt;line-height:13.35pt;background:#EEEEEE;vertical-align:baseline;max-height:600px;word-wrap:normal;overflow:auto"><span style="font-size:10.5pt;font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">rule "new file"<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">when<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">$p: RuleContext( $old : getOldContext().getContainedFiles(), $new :getNewContext().getContainedFiles())<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">RuleContext( $old != $new)<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">accumulate( $s : Object( this not memberOf $old ) from $new, $plus : collectList( $s ) )&nbsp; <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">events : Object() from $plus;<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">then<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">Event event = new Event("new file added",$p.getOldContext().getParent(),new Date());<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">end<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in"><o:p>&nbsp;</o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in"><o:p>&nbsp;</o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">rule " file deleted"<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">when<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">$p: RuleContext( $old : getOldContext().getContainedFiles(), $new:getNewContext().getContainedFiles())<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">RuleContext( $old != $new)<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">accumulate( $t : Object( this not memberOf $new ) from $old, $mins : collectList( $t ) )<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">events : Object() from $mins; <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">then<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">Event event = new Event("file deleted",$p.getOldContext().getParent(),new Date());<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">end <o:p></o:p></span></code></pre>
          <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.35pt;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">(do
              not confuse with RuleContext and other unknown
              identifiers.. they r just related with other classes in
              the project.. these two rules just works fine )..i need to
              use a sliding time window and create another event if the
              number of file additions are &gt; 5 over the past 1
              minute. my rule file is :<o:p></o:p></span></p>
          <pre style="margin-bottom:7.5pt;line-height:13.35pt;background:#EEEEEE;vertical-align:baseline;max-height:600px;word-wrap:normal;overflow:auto"><span style="font-size:10.5pt;font-family:Consolas;color:black"><o:p>&nbsp;</o:p></span></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">declare Event <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">@role( event ) <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">end <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in"><o:p>&nbsp;</o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in"><o:p>&nbsp;</o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">rule "More than 5 additions"<o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">when&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">Number(intValue &gt; 5) <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">from&nbsp;&nbsp;&nbsp; accumulate( $tick : Event ( name == "new file added" ) over window:time( 1m ),</span></code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">
<code><span style="font-family:Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count( $tick ) ) )<o:p></o:p></span></code></span></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">then <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("too many additions"); <o:p></o:p></span></code></pre>
          <pre style="line-height:13.35pt;background:#EEEEEE;vertical-align:baseline"><code><span style="font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0in">end <o:p></o:p></span></code></pre>
          <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.35pt;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">i
              have enabled stream mode processing too.. but it doesnt
              seem to work. what could be the problem?<o:p></o:p></span></p>
        </div>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
          _______________________________________________ <br>
          rules-users mailing list <br>
          <a moz-do-not-send="true"
            href="/user/SendEmail.jtp?type=node&amp;node=4028639&amp;i=0"
            target="_top" rel="nofollow" link="external">[hidden email]</a>
          <br>
          <a moz-do-not-send="true"
            href="https://lists.jboss.org/mailman/listinfo/rules-users"
            target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/rules-users</a>
          <o:p></o:p></p>
        <div class="MsoNormal" style="text-align:center" align="center">
          <hr style="color:#CCCCCC" align="center" noshade="noshade"
            size="1" width="100%">
        </div>
        <div>
          <div>
            <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#444444">If
                  you reply to this email, your message will be added to
                  the discussion below:<o:p></o:p></span></b></p>
          </div>
          <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#444444"><a
                moz-do-not-send="true"
href="http://drools.46999.n3.nabble.com/rules-users-sliding-window-problem-tp4028639.html"
                target="_top" rel="nofollow" link="external">http://drools.46999.n3.nabble.com/rules-users-sliding-window-problem-tp4028639.html</a>
              <o:p></o:p></span></p>
        </div>
        <div style="margin-top:4.8pt">
          <p class="MsoNormal" style="line-height:18.0pt"><span
style="font-size:8.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#666666">To
              start a new topic under Drools: User forum, email
              <a moz-do-not-send="true"
                href="/user/SendEmail.jtp?type=node&amp;node=4028640&amp;i=1"
                target="_top" rel="nofollow" link="external">[hidden
                email]</a>
              <br>
              To unsubscribe from Drools, <a moz-do-not-send="true"
                href="" target="_top" rel="nofollow" link="external">
                click here</a>.<br>
              <a moz-do-not-send="true"
href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml"
                target="_top" rel="nofollow" link="external"><span
                  style="font-size:7.0pt;font-family:&quot;Times New
                  Roman&quot;,&quot;serif&quot;">NAML</span></a>
              <o:p></o:p></span></p>
        </div>
      </div>
      <br>
      <hr align="left" width="300">
      View this message in context: <a moz-do-not-send="true"
href="http://drools.46999.n3.nabble.com/RE-rules-users-sliding-window-problem-tp4028640.html">RE:
        [rules-users] sliding window problem</a><br>
      Sent from the <a moz-do-not-send="true"
        href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools:
        User forum mailing list archive</a> at Nabble.com.<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>