Hello,

  This is in reference to the message below, the exact text of my rules
follows.

-Ryan

(defrule accepting-enrollment-rule "Please enter valid program."
  (declare (salience 10000))
  (Program (stop_time ?stop_time)(programId ?programId))
  =>
  (if (< 0 (compare-datetime ?stop_time)) then
    (defglobal ?*program_id* = ?programId) else
  (assert (testResults (failureMsg "Program is not accepting orders
anymore.")))
))

(defrule enrollment-validation "Valid enrollment record not found."
  (enrollment_detail (customer_id ?customer_id)(program_id ?program_id)
    (stop_time ?stop_time))
  (test (eq program_id *program_id*))
  =>
  (if (> 0 (compare-date ?stop_time)) then (assert (testResults (failureMsg
"Enr
ollment in program has expired, user must reenroll.")))))

-----Original Message-----
From: Withers, Ryan(STL) [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 26, 2001 5:33 PM
To: [EMAIL PROTECTED]
Subject: JESS: Eval Salience


Hello,

  I am trying to evaluate rules in a certain order declaring a salience
value like so (declare (salience 10000)), I have two rules defined one with
a salience value of -5000 and one with a value of 10000.  I would assume the
one with the salience of 10000 would fire first followed by the one declared
-5000.  The reason I want firing precedence is to be able to use a global
variable defined by the rule that should be firing first in the rule that is
firing second. 

  I am using Jess5.1, if anyone knows of anything that would help me figure
out how to handle this situation I would appreciate it.

Sincerely,

Ryan

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

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