<div class="gmail_quote"><br>Hi!<br>i'm new to use a drools-fusion, i've a next lhs condition in rule:<br> $o: Order(status!="EU_C_R1_INIT")<br> SystemConfig(value:value) from hbnSession.createQuery("from SystemConfig where name=:name").setString("name","nRicMax").uniqueResult()<br>
$nRic : Number(intValue < value) from accumulate($n: Order(this==$o) over window:time(1d),count($n))<br>Data:<br>1) Order 1 date 28 aug 2009 EU_C_INIT<br>
2) Order 1 date 31 aug 2009 EU_A_INIT<br>
3) Order 1 date 31 aug 2009 EU_B_INIT<br>
4) Order 1 date 30 aug 2009 EU_B_INIT<br>
5) Order 1 date 28 aug 2009 EU_A_INIT<br>
6) Order 1 date 01 aug 2009 EU_A_INIT<br>
7) Order 1 date 28 aug 2009 EU_C_INIT<br>
8) Order 1 date 28 aug 2009 EU_C_INIT<br><br>Only the first condition is verified [ Order(status!="EU_C_R1_INIT") ] altough there are facts that verify Order(this==$o) over window:time(24h) ]<br>There are n-k facts that don't verify a previous condition but them come count also:<br clear="all">
I espect that drools count a 2-3-4 but it count also 5-6-7: i'm confused<br>P.S. i did set a stream mode, i' had set a timestamp attribute in event fact @timestamp(myTimestampLong), i tried with pseudo clock (making it advance for new Date().getTime() or at origin, therefore 01 jan 1970 [without event @timestamp attribute] ) <br>
Regards<br>Francesco<br>
</div>