[rules-users] How to terminate a StatefulKnowledgeSession

bishopmm michael.marion.bishop at hp.com
Wed Sep 21 12:24:37 EDT 2011


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.



More information about the rules-users mailing list