Hi,

I use Jess in a Java program.
My clp file has the following template definition and a few rules but no
asserts, no deffacts, no definstances.

(deftemplate moduleName::JavaObjecType (declare (from-class
JavaObjecType)))

The clp file is batched by the Java program.
I then set the current module to 'moduleName' and set the focus to
'moduleName'
I instantiate Java objects and add them to the working memory using
Rete.add().
After Rete.run(), I retrieve the Java objects using Rete.getObject().

All is well until I call Rete.reset() before I start something new.
I expect to see nothing in the working memory but, to my surprise, I see
all the objects I added.

Rete.clear() does clear the working memory but would also require that I
batch the clp file again, taking substantially more time.
Another way to remove these Java objects is to retrieve them using
Rete.getObjects() followed by Rete.removeAll(javaObjectCollection).

Did I miss anything? Or is reset() not working as documented?

Any feedback will be greatly appreciated.

Son Nguyen.

Reply via email to