In the FuzzyJess extension I added that function ... getCurrentActivation()
I stored the current activation when aboutToFire is called and reset it when

justFired is called. So when there is no executing rule it returns null.
Perhaps this can move to standard Jess in some compatible way and I can
remove these from FuzzyJess. Just a thought. See FuzzyRete.java.

Bob

Bob Orchard
National Research Council of Canada     Conseil national de recherches
Canada
Institute for Information Technology    Institut de technologie de
l'information
1200 Montreal Road, Building M-50       M50, 1200 chemin Montrial
Ottawa, ON, Canada K1A 0R6      Ottawa (Ontario) Canada K1A 0R6

(613) 993-8557 
(613) 952-0215 Fax / tilicopieur

[EMAIL PROTECTED] 

Government of Canada | Gouvernement du Canada

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 9:25 PM
To: [EMAIL PROTECTED]
Subject: Re: JESS: How to get rule name


I think Alan Moore wrote:
> How about returning the rule itself? An alternative would be to return the
> current activation.
> 
> My 2cts...

I like the getCurrentActivation() idea. I imagine people could get into
all kinds of mischief with that :) So there can be
getCurrentActivation(), and getCurrentRuleName() which delegates to it.



> 
> alan
> 
> I think Richard Kasperowski wrote:
> > 
> > Can I request a new feature?  It would be nice if there were a built-in 
> > function like (rule) or (this) or (self) that would return the rule 
> > object when you evaluate it on the RHS of a rule.
> 
> OK, I'll stick it in as a function on Rete, so you can call it like
> 
>         (bind ?rule ((engine) getCurrentRuleName))
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems 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]
--------------------------------------------------------------------

--------------------------------------------------------------------
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