title: How to make a continues slide window time checking by Drools?
body: <p>My case is: If the sum of withdraw of my bank account is greater than 1000$ within any continues 10 mins, E.g., 0m-10m and then 0m1s-10m1s, then 0m2s-10m2s, which is a sliding time window, the bank system should send me a warning message.</p>
  
  <p>So, can anyone help me writing the rule by Drools?</p>
  
  <p>My initial idea is below: </p>
  
  <pre><code>when
                Number( $total : intValue, intValue &gt;= 1000)
                from accumulate (Withdraw ($money : money)
                over window:time( 10m )
                from entry-point ATMEntry,
                sum($money))
  then
      System.out.println("Warning! too more withdraw:"+$total);
  </code></pre>
  
  <p>However, it will just check the upcoming 10m for one time. After the first 10m, no matter how many withdraw object that I insert to ATMEntry are, I will not receive the warning message.</p>
  
  <p>And if I fire above rule interval in different session, for example every 1m, it makes me confused about how to insert withdraw object to ATMEntry for different session.</p>
  
  <p>So, is that possible to use Drools to in my case?</p>
  
  <p>Thanks,</p>