[EMAIL PROTECTED] 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.I think Richard Kasperowski wrote:In the RHS of a rule, is there a way to get the rule name?Write a JessListener class which watches for DEFRULE_FIRED events. The event will arrive just before the RHS of the rule executes. Call getObject() on the JessEvent. It'll be a jess.Activation objects. The name of the rule will be in Activation.getRule().getName(). Call Rete.store("RULE", theName). Then on a rule's RHS you can (fetch RULE) to get the name.
--
Richard Kasperowski
Tel: 617-576-1552, Fax: 617-576-2441
mailto:[EMAIL PROTECTED]
http://www.altisimo.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]
--------------------------------------------------------------------