<br><br><div class="gmail_quote">On 8 July 2011 13:46, echirulli <span dir="ltr">&lt;<a href="mailto:echirulli@gmail.com">echirulli@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi there,<br>
I&#39;ve got a question regarding statefull session and threads.<br>
I searched a lot about this topic but I&#39;m still a bit confused so...<br>
When a StatefullSession - fireAllRules() returns, can I be sure that the<br>
entire rules processing has ended?<br>
I red something about the fact that this is true unless rules inference<br>
happens, is it correct?<br></blockquote><div><br>No. A fireAllRules() returns after all of &quot;inference&quot; has happened and no<br>more activations are eligible for firing.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

My simple purpose is to insert a fact into a statefullsession working<br>
memory, fire rules, wait until the end of rules processing and than retract<br>
that fact.<br>
How can i do it?<br></blockquote><div><br>FactHandle fh = kSession.insert( object );<br>kSession.fireAllRules();<br>kSession.retract( fh);<br><br>-W<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Thank you<br>
Errico<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/FireAllRules-and-threads-tp3151572p3151572.html" target="_blank">http://drools.46999.n3.nabble.com/FireAllRules-and-threads-tp3151572p3151572.html</a><br>

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>
</font></blockquote></div><br>