I think Balaji Srinivasa wrote: > Hi All, > Is there a way to get a list of Facts that were > participants when a rule was fired? > > i.e. > If RuleA fired, I would like to know something like > FactA, FactC, FactD caused RuleA to fire. > > thx > balaji
If you mean interactively, while working at the Jess prompt: the (agenda) command, and the (watch rules) command, will give you all the information. If you're thinking about building an explanation facility of some kind, then what you should do is listen for JessEvents of type DEFRULE_FIRED. The content will be an object of type jess.Activation, which associates a rule and the set of facts that have activated it. You can store this information and use it in your explanations. See section 4.10 of the manual for more information. --------------------------------------------------------- Ernest Friedman-Hill Science and Engineering PSEs 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] --------------------------------------------------------------------
