Did you set the event mask? (jess.Rete.setEventMask(JessEvent.FACT) YOu have to set the event mask to specify what kind of events you want to receive.

On Oct 19, 2008, at 2:26 PM, levent kent wrote:

Hi,

I am developing an academic application with Jess & Jade.
Is there any simple way to get all facts which are just inserted? Iterating over all the facts in working memory would be very inefficient, right?

I actually tried to add a JessListener
public class KitchenJessListener implements JessListener{
    public void eventHappened(JessEvent event) throws JessException {
        Object o=event.getObject();;
        if(event.getType()== JessEvent.FACT) {
            o=event.getObject();
        }
        System.out.println("event:"+o.toString());
    }
} using addJessListener function,
but the function is never invoked, though I insert new facts to the working memory in run time.


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com







--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to