<div dir="ltr"><div>Hi Guys, I have one question about how lenght windows will work.</div><div><br></div><div>I have a rule like this. Basically, it is a &quot;crosses&quot; function, where the value of my object crosses a value.</div>
<div><br></div><div>rule &quot;mytest&quot;</div><div><span class="" style="white-space:pre">        </span>dialect &quot;mvel&quot;</div><div><span class="" style="white-space:pre">        </span>when</div><div><span class="" style="white-space:pre">                </span>t2_1 : Tick( value &lt; 102.352 ) over window:length (1)</div>
<div><span class="" style="white-space:pre">                </span>t1_1 : Tick( this before t2_1 , value &gt;= 102.352 ) over window:length (2)</div><div><span class="" style="white-space:pre">        </span>then</div><div><span class="" style="white-space:pre">                </span>//DO SOMETHING</div>
<div>end</div><div><br></div><div>23:51:32,150 INFO  [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351, tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26)</div>
<div><br></div><div>23:53:30,560 INFO  [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349, tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26)</div>
<div><br></div><div>If you see, the first activation, the </div><div>window:length(1), matched the object 27</div><div>window:length(2), matched the object 26</div><div><br></div><div>Then, after 2 minutes and some Ticks insertes in the WM</div>
<div>window:length(1), matched the object 146</div><div>but window:length(2), still matched the object 26</div><div><br></div><div>I would expect, that, as object 26 was the first one to be inserted, then it is outside the window:length(2).</div>
<div><br></div><div>Is my understanding correct? Am I making something wrong? I am using Drools 6.</div><div><br></div><div>Thanks!</div><div><br></div><div>Demian</div></div>