[rules-users] facthandle iterator

Christine christine at christine.nl
Tue May 6 09:50:35 EDT 2008


Hi All,
I thought this:
   public void retractFacts() {
        Iterator iter = workingMemory.iterateFactHandles();
        while (iter.hasNext()) {
            FactHandle handle = iter.next();
            workingMemory.retract(handle);
        }

    }

would retract all facts, but in fact I get a compilation error because
iter.next is an object, not a factHandle. How do I retract facts using an
iterator iterating all facts?

kind regards
Christine




More information about the rules-users mailing list