[rules-users] FireAllRules and threads

Wolfgang Laun wolfgang.laun at gmail.com
Fri Jul 8 08:35:02 EDT 2011


On 8 July 2011 13:46, echirulli <echirulli at gmail.com> wrote:

> Hi there,
> I've got a question regarding statefull session and threads.
> I searched a lot about this topic but I'm still a bit confused so...
> When a StatefullSession - fireAllRules() returns, can I be sure that the
> entire rules processing has ended?
> I red something about the fact that this is true unless rules inference
> happens, is it correct?
>

No. A fireAllRules() returns after all of "inference" has happened and no
more activations are eligible for firing.


> My simple purpose is to insert a fact into a statefullsession working
> memory, fire rules, wait until the end of rules processing and than retract
> that fact.
> How can i do it?
>

FactHandle fh = kSession.insert( object );
kSession.fireAllRules();
kSession.retract( fh);

-W


> Thank you
> Errico
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/FireAllRules-and-threads-tp3151572p3151572.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110708/677a2512/attachment.html 


More information about the rules-users mailing list