[rules-users] How to terminate a StatefulKnowledgeSession

Mauricio Salatino salaboy at gmail.com
Wed Sep 21 12:40:35 EDT 2011


You need to analyze what the rules are doing, probably you have an infinite
loop in your rules that is causing recursion and never ending.
Can you share your rules? or activate the console logs to see what's
happening (KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession)).
Cheers

On Wed, Sep 21, 2011 at 1:24 PM, bishopmm <michael.marion.bishop at hp.com>wrote:

> I'm using Drools to build a wizard app within a web application. The
> StatefulKnowledgeSession runs within its own thread. After loading the
> rules, I call fireAllRules() to start the knowledge session. Within the
> wizard app, the user has the option to click on a cancel button in order to
> stop the wizard. When the user cancels the wizard, a rule is fired that
> attempts to stop the knowledge session. I've tried calling drools.halt()
> and
> drools.getWorkingMemory().clearAgenda() from within that rule, but
> fireAllRules() doesn't return, and the thread is left hanging. What do I
> need to do to get fireAllRules() to return? I'm fairly new to Drools, and I
> apologize in advance if I've missed something blatantly obvious.
>
> Thanks,
> Mike
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-terminate-a-StatefulKnowledgeSession-tp3355958p3355958.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
>



-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110921/a858e09c/attachment.html 


More information about the rules-users mailing list