[EMAIL PROTECTED] wrote: > > I think Alan Moore wrote: > [Charset iso-8859-1 unsupported, filtering to ASCII...] > > Greetings, > > > > This is going to sound really dumb... > > > > > I have a SimpleBean that has two properties property1 and > > property2. I also have two rules each matching one of the > > properties. > > > > When one of the properties changes, both rules fire even though only > > one pattern has a reference to the changed property slot. > > > > Has Jess always worked this way or has this behavior changed > > recently? > > Jess has always worked this way. Beans are exactly like Facts, which > behave exactly as they did in CLIPS. We've talked about changing this > behavior, and that might happen, but it wouldn't be free. Either facts > would have to change, too, or you'd lose some of the nice symmetry > that exists now. It's too radical of a change to be a runtime option. > > Of course, every time I say something like this in public, the next > day I think of a way to do it anyway...
I'd favor this a lot ... maybe a concept might be to map Java beans not to facts but rather to some kind of 'objects' (as COOL in Clips, which *do* behave as desired, i.e. here a rule fires only if any of the involved object properties has changed, real facts instead behave as in Jess). Maybe you could even adopt the Clips syntax ... (defrule fire-fact (templ-fact (slot ?a) ...) => ) and (defrule fire-fact (object (is-a templ-obj) (slot ?a) ...) => ) where 'templ-fact' is a deftemplate and 'templ-obj' a defclass. Of course this would require major user Jess code modifications, unless maybe you accept both formats above, and switch the behavior depending on the flavor - the first rule fires with the current policy (if *any* slot of the fact/bean changes), the latter with the alternate policy. This way you could have both and would be even backward compatible. Regards, tge > --------------------------------------------------------- > Ernest Friedman-Hill > Distributed Systems Research Phone: (925) 294-2154 > Sandia National Labs FAX: (925) 294-2234 > Org. 8920, MS 9012 [EMAIL PROTECTED] > PO Box 969 http://herzberg.ca.sandia.gov > Livermore, CA 94550 > > -------------------------------------------------------------------- > 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] > -------------------------------------------------------------------- -- ........................................................ Thomas Gentsch -------------- Phone: +49 711 486948 E-mail: [EMAIL PROTECTED] Mobil: +49 173 6620507 WWW: www.e-tge.de Fax: +49 711 4687889 www.blue-elephant-systems.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] --------------------------------------------------------------------