Yes - use 'salience.'
(defrule rule-1 (declare (salience 1)) (foo) => )
(defrule rule-2 (declare (salience 2)) (foo) => )
rule-2 (the rule with the higher salience value) will always fire
before rule-1.
Note that overuse of salience is bad form, and generally will reduce
your rule-based system to a deterministic prodedural program.
I think H�kan Lindgren wrote:
>
> Hi, all!
> Is there some way to set priority on rules. For example if two rules are
> ready to be fired but i want the rules to be fired in a specific order.
> How do I do.
>
> / Hakan
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. 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 9214 [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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------