I think Steffen Luypaert wrote:
> 
> I didnt think of this. But to understand the retraction, one has to see 
> the code of the JessListener Java class. So if u look at the Jesscode, 
> you won't understand or or when the retraction happens. In a sense, it 
> happens 'outside' the reasoning of Jess. 

Actually, you can write event handlers in Jess, too. There's a
jess.JessEventAdapter class that you can use like this:

  Jess> ((engine) setEventMask (get-member jess.JessEvent FACT))
  Jess> (deffunction my-handler (?evt)
           (printout t EVENT: (?evt getObject) crlf))
  TRUE
  Jess> ((engine) addJessListener
                  (new jess.JessEventAdapter my-handler (engine)))
  Jess> (assert (foo))
  EVENT:<External-Address:jess.Fact>
  <Fact-0>


This kind of "multiparadigm" support is one of Jess's real
strengths. Event-driven "rule engines" are what IBM (but nobody else)
usually means when they talk about rules. Jess lets you combine
forward and backward chaining, events, and other stuff all in one
package. 



---------------------------------------------------------
Ernest Friedman-Hill  
Science and Engineering PSEs        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]
--------------------------------------------------------------------

Reply via email to