Hi all,

I have the following rule definitions.

;; =========================== Rule =======================
(deftemplate processmodel
  (slot processName)
  (multislot intendedApplication)
  (multislot measuredProperty)
)

(defquery search-by-property
  "find matched process models"
(declare (variables ?iA ?mP)) ;; <=== how can i take a list of variables, and match each of them in the list? (processmodel (processName ?processname) (intendedApplication $? ?iA $?) (measuredProperty $? ?mP $?))
)


(deffacts data
(processmodel (processName PeopleDetection) (intendedApplication Detection) (measuredProperty Object Pattern)) (processmodel (processName FaceRecognition) (intendedApplication Recognition) (measuredProperty Pattern)) (processmodel (processName RoomTemperature) (intendedApplication Measurement) (measuredProperty Temperature)) (processmodel (processName PresentStatus) (intendedApplication Detection) (measuredProperty Event Object))
      )

(reset)
(bind ?result (run-query* search-by-property Detection Object))


(while (?result next)
  (printout t (?result getString processname) crlf))

;; =========================== End Rule =======================

I can get the result:
PeopleDetection
PresentStatus

however, how can I make this query more dynamic? The numbers of my query variable are not fixed. so one can provide any number of query variables for this matching. so is there anyone know how to do it?

--
regards;

Peizhao

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