That worked.  Thank you very much.

--- On Tue, 8/2/11, Wolfgang Laun <wolfgang.laun@gmail.com> wrote:

From: Wolfgang Laun <wolfgang.laun@gmail.com>
Subject: Re: [rules-users] How to remove Drools 5 facts from a web service
To: "Rules Users List" <rules-users@lists.jboss.org>
Date: Tuesday, August 2, 2011, 1:35 AM

2011/8/1 Matthew Erler <wires8@yahoo.com>
The first thing that the service method needs to do is clear out all the facts inserted during the last service method invocation.  I use StatefulKnowledgeSession.insert(Object fact) to add facts and StatefulKnowledgeSession.getAgenda().clear() to clear out all facts. 

The Agenda is where all rule activations live. Facts are reachable via the kSession object, e.g., kSession.getFactHandles(), and you could use retract() on them. But note well that retracting facts is not a free lunch: each one updates the Rete network.

Calling kSession.dispose() and kBase.newStatefuleKnowledgeSession() is a perfectly reasonable way to clear the ring for the next round.

-W

-----Inline Attachment Follows-----

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users