I think calvin pevee wrote: > Hi, > > I am back, I tried out the store/fetch. BUT, it return > me only the latest fired facts. Why? I need both (any) > facts which is fired. Is like the variable > (fact-in-java) is overwritten. How can I get the > activated facts out, I mean all the fired facts? > Please advice. >
store/fetch is just a thin layer over a HashMap. You put something in, whatever was previously in there under the same key goes away. Remember that from the Jess language, you have full access to all of Java. Your mainline Java code could store() an ArrayList under the given key, and then your rule could, instead of calling (store), use (fetch) to get that ArrayList, and call add to install more results. This way all the results would accumulate in the ArrayList. Of course, you could use a Set, or a Map, or whatever you want. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------
