As you might expect from the String you get from calling toString on
it, the object returned by getObject for a "rule fired" event is a
jess.Activation. This class has a getRule() method that returns a
jess.Defrule, and this class has a getName() method (and getModule(),
too.)


I think Young-Jin Lee wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi, I have a question on how to identify the fired rule in the Java
> application with Jess.
> I created JessEventHandler in my Java application so that I am notified
> whenever a rule is fired.
> But my problem is I cannot get the exact name of the rule. I need to know it
> because I need to do something for the rule filed.
> By using a getObject() method of JessEvent object, I can get the string
> representation of the fired rule, for example, [Activation:
> MAIN::Gravitational_acceleration-Force-relation  f-1 ; time=2 ; salience=0],
> but what I need is the name of the rule,
> Gravitational_acceleration-Force-relation.
> 
> A getObject() method of JessEvent object returns not just the name of the
> fired rule. How can I decode the return string of a getObject() method of
> JessEvent object?
> 
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 



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

Reply via email to