I have probably not understand your problem, but I can't see why you
need a rule. What are the facts that will fire the rule you want? It
sounds like you want as output a (processing ?vector-of-childs), but do
you need to do so by a rule or by explicitely doing so?

For the later solution something like that would do it.

(defquery search
  "Find tags given a parent ID"
  (declare (variables ?id))
  (tag (parent ?id))
)

And then when you want to execute your code, you should do the
following:

(bind ?childs (run-query search 0))
(assert (processing ?childs))


Then your rule such as the one below would do your processing job:

(defrule process-vector
  (processing ?x)
  =>
  (process ?x)
)

Where "process" would be a user defined function.



Of course, in case there are some facts that should fire the whole
thing, it could be shorten to:

(defquery search
  "Find tags given a parent ID"
  (declare (variables ?id))
  (tag (parent ?id))
)
(defrule fire-processing-on-root-node
  (fact-to-match1)
  (fact-to-match2)
  =>
  (process (run-query search 0))
)



Regards,
J�r�me BERNARD.


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