achong wrote:-
> > 1.    Will like to know which rule gets triggered each time. Since there
> > could be more than one rules which meet the requirement. My java application
> > will need to know specifically which rule was triggered and at what
> > sequence.

<[EMAIL PROTECTED]> answered:-
> This sounds pretty procedural to me. Why would you need to know that?
> Anyway, you can install a JessListener listening to rule firings:
> 
>       // Make Rete engine fire the DEFRULE_FIRED event
>       int mask = rete.getEventMask() | JessEvent.DEFRULE_FIRED;
>       rete.setEventMask(mask);
... [ snip details of 'work around']..

{Although I've not yet installed/run jess (nor any java) } I think the
original poster (achong) is missing the BIG picture:
* jess is derived from the CLIPS expert system,
* expert system's are part of artificial intelligence,
* AI systems are often non-deterministic, like sorting potatos sizes
     through 3 sieves - you can't be sure which hole a particular potato
    will pass, to get the correct selection.
* as the original post wrote: several rules may be satisfied.
    Handling this is called 'conflict resolution'.
    The designer(s) of jess have decided which of several methods to
        resolve this 'several rules being satisfied'. ie . how to chose a winner.
* to query/challenge this is as inappropriate as to check on the detailed
     actions of the airline pilot when you are a passenger.  An Expert 
   System will give you a final answer(s), as the airline will get you to your
    destination.
* if your "java application will need to know specifically which rule was
      triggered ..." then perhaps you need your own custom ES ?


Chris Glur.



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