<div>   import java.util.List</div><div><br></div><div>   Edson<br><br><div class="gmail_quote">2011/10/31 diana-mendes <span dir="ltr">&lt;<a href="mailto:diana-mendes@hotmail.com">diana-mendes@hotmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
Thank you for your response, I understand how the sliding window works now.<br>
However, when I use the code you wrote I get the following error:<br>
<br>
Exception in thread &quot;main&quot; java.lang.RuntimeException: Unable to resolve<br>
ObjectType &#39;List&#39; : [Rule name=&#39;Rule2&#39;]<br>
<br>
Unable to Analyse Expression $last2:<br>
[Error: unable to resolve method using strict-mode:<br>
java.lang.Object.$last2()]<br>
<br>
<br>
My rule looks like this:<br>
<br>
rule &quot;Rule2&quot;<br>
        when<br>
<div class="im">              $last2: List() from collect( Notif() over window:length(2) )<br>
              $nNewONT : Number() from accumulate ( Notif( specificProblem<br>
== &quot;New ONT&quot; ) from $last2, count() )<br>
</div>        then<br>
              ...<br>
end<br>
<br>
<br>
Do Lists require any additional code?...<br>
<div class="im"><br>
Thanks in advance,<br>
<br>
Diana<br>
<br>
<br>
<br>
--<br>
</div>View this message in context: <a href="http://drools.46999.n3.nabble.com/Sliding-Length-Windows-tp3438408p3467432.html" target="_blank">http://drools.46999.n3.nabble.com/Sliding-Length-Windows-tp3438408p3467432.html</a><br>

<div><div></div><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>