There are a couple of ways you could do this now. One would be to use JessEvents. Register a JessListener and let it handle DEFULE_FIRED events by invoking a function you specify, under conditions you specify. I've attached a short Jess-language program which demonstrates something like this.

Another way would be to extend jess.Rete and override "aboutToFire()" or "justFired()"; these hooks are provided to let you do per-rule processing like this.

Attachment: follow.clp
Description: Binary data


On Oct 23, 2007, at 4:13 PM, Shi Paul wrote:

Hi Ernest or others,
Here is the situation, say there are 2 rules A and B, I want whenever A fires B fires as well(or less frequently based on some other conditions) and I don't want to just copy A's conditions into B since that way I have to maintain 2 places. What I'd like to see in Jess is some kind of instructional command (for example (follow- rule A) in B's LHS), or better yet if Jess can hook up with some rules before or after A fires (which resembles AspectJ programming). I think it'd be a great feature if Jess allows that.

Thanks,
Paul


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.com



Reply via email to