On 1 December 2010 17:19, Anais Martinez <span dir="ltr">&lt;<a href="mailto:amartinez@iti.upv.es">amartinez@iti.upv.es</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
&gt; What does your thread do after it returns from fireAllRules?<br>
<br>
My thread sleeps five minutes and then it fires again: (intervalLength =<br>
5*60*1000):<br></blockquote><div><br>You might as well let the Engine sleep, waiting for news.<br><br>If you turn it on, every now and then, you&#39;ll get all sorts of delays. Say,<br>an event arrives 1ms after you&#39;ve returned from an unsuccessful fireAllRules()<br>
(there&#39;s no &quot;fireRules()&quot; method, is there?), then you won&#39;t get any reaction<br>until next time round, i.e., 5 minutes later. This may not be as expected.<br><br>Regards<br>-W<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
@Override<br>
    public void run(){<br>
<br>
        while(!end){<br>
            try {<br>
                Thread.sleep(intervalLength);<br>
                int nRules = ksession.fireRules();<br>
                if(nRules &gt; 0){<br>
                    logger.debug(nRules + &quot; reglas disparadas.&quot;);<br>
                }<br>
            }<br>
            catch (InterruptedException e) {<br>
                logger.error(e);<br>
            }<br>
<br>
        }<br>
<br>
    }<br>
<br>
&gt;Well, if the events arrive on schedule it should be OK, but what about the<br>
delayed arrivals?<br>
<br>
Ah, ok...<br>
<br>
Thank you, again.<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Question-about-collect-and-sliding-windows-tp1999562p2000077.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Question-about-collect-and-sliding-windows-tp1999562p2000077.html</a><br>

Sent from the Drools - User 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>
</font></blockquote></div><br>