You could implement a jess.JessListener, for JessEvent.DEFRULE_FIRED.

When this event happens, you have a  JessEvent event, and you can

   Activation act = (Activation)event.getObject();
   Defrule rule = act.getRule();
   Token token = act.getToken();
   int nfact = token.size();
   ..."rule:" + rule.getName()...
   for( int i = 0; i < nfact; i++ ){
       Fact f = token.fact( i );
       ..."fact", f.xxx()...
    }

You might also extract rule.getDescription(), provided you have them in your
rules.

-W

On 9 June 2010 16:26, Adam Malik <[email protected]> wrote:

> Dear JESS users!
>
> What is the best way to trace the work of JESS in order to explain the
> decisions to the user? Is there a way to store the decision making process
> in a list or a tree without modifying the rules?
>
>
> Best regards
>
> Adam
>
>
>
> --------------------------------------------------------------------
> 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