If you use a StatelessKnowledgeSession you won't need to remove the old facts.
If however you want to use a StatefulKnowledgeSession for other reasons the insert method returns a FactHandle that can be later used to retrieve the fact: ksession.retract(factHandle). Please refer to the documenation for more details. On 20 October 2010 16:35, nkumar <[email protected]> wrote: > > Hi.. > > > I want to delete the objects which i inserted earlier to execute the rules > upon. Why i want this is i have two lists containing 20 objects of two > different classes. for every combination i am assigning some values to the > class variables in the rule file. So at any single time i want to execute > rule on a single set of 2 classes. > > ksession.insert(object1 of class1) > ksession.insert(object1 of class2) > > > then next time i want this on > > > ksession.insert(object1 of class1) > ksession.insert(object2 of class2) > > and so on.. > > I can insert all the objects once and can execute the rules on the objects > but i have to save result of each combination in the list. No matter what > the output is. > > Please suggest how can i solve this. if i have to insert only 2 objects at > a > time then after inserting an object,there is no use to insert that again. > So > how can i remove the objects from the memory after executing the rules. > > > Thansk...appreciate your help. > -- > View this message in context: > http://drools-java-rules-engine.46999.n3.nabble.com/How-can-i-delete-any-object-after-executing-the-rules-from-the-memory-tp1739477p1739477.html > Sent from the Drools - User mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users >
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
