The following code is a defquery that is not doing anything; I expected a printout of a condition code of 1091 - the one that is part of the defclass (and thence a definstance executed from within a Java program)) declared as: (defclass event com.phs3.data.ojb.EventImpl ) I know event has the conditionCodeId 1091 in that slot as I have printed it out in the RHS of other rules. And an AbstractList$Itr is returned after the query call as in the JIA example. Thoughts?
(defquery find-conditions ;; pattern matches all the events whose conditionCodeID slot holds a number; only one for now (declare (variables ?wantedConditionCode)) (event (conditionCodeId ?ccId&:( = ?wantedConditionCode))))
;; now invoke the query (bind ?it (run-query find-conditions 1091)) (bind ?token (call ?it next)) (while (?it hasNext) (bind ?token (call ?it next)) (bind ?fact (call ?token fact 1)) (bind ?conditionCodeId (fact-slot-value ?fact conditionCodeId)) (printout t "Defquery says " ?conditionCodeId crlf)) |
- JESS: initial problems MAtt Farmer
- Re: JESS: initial problems ejfried
- Re: JESS: initial problems James Owen
- JESS: Re: Defquery problem Michael Knapik
- JESS: Re: Defquery problem Eric Wang
- JESS: Re: Re: Defquery problem Michael Knapik