I have a Jess script which runs rules on shadow facts created within a
Java class. This works fine. Problem is when I try to execute rules
based upon facts defined within the Jess script itself - it won't
recognise them:

; 1. Create a hardware sensor to read the source data.
;    Takes a parameter that is the data source name
; 2. Create a monitor that polls the hardware sensor

(bind ?hware (new HWSensor "testDat2.dat"))
(defclass mon Monitor)
(definstance mon (new Monitor ?hware))

; Facts within this script

(deftemplate posLshift
 (slot truth_val (default 0)))

(deftemplate alarm
 (slot truth_val (default 0)))

(deftemplate threshold
 (slot cutoff (default 0)))


(defrule TA::Initiates
 (mon (reading ?r&:(>= ?r 143))
 (tstamp ?t&:(> ?t 0))
 (posLshift (truth_val false)))
 =>
 (assert posLshift(truth_val 1))
 (printout t "Initiates: Data "?r" bpm, timestamp "?t", Fluent truth
count:  "  crlf))

Error is:

"Jess reported an error in routine Jesp.parsePattern
while executing (batch rules/ec-1.clp).
Message: No such slot posLshift in template MAIN::mon at token
'posLshift'."

Thanks in advance for any help...

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