I am not sure yet if this function should be in the rules or not, but here
is something which is not accepted by the rule engine:

(defrule completerRule1
    (Session (readyToRun TRUE) (currentCompleterQuestion ?q) (OBJECT ?x))
    (test (> (str-index ("ASP" ?q)) -1)
    =>
    (bind ?r (new CompleterResponseElement))
    (call ?r setResponseElementInfo 1 "Aspirine" "")
    (call ?x addCompleterResponseElement ?r)
    (bind ?r (new CompleterResponseElement))
    (call ?r setResponseElementInfo 2 "Aspiration" "")
    (call ?x addCompleterResponseElement ?r)
    (bind ?r (new CompleterResponseElement))
    (call ?r setResponseElementInfo 3 "Aspartam" "")
    (call ?x addCompleterResponseElement ?r)
)

The idea is:

If I find a Session object which is ready to run and with a
currentCompleterQuestion containing the string ASP then the rule fires.
Now, this does not work. In the documentation, it says the parameters to
str-index need to be ATOMS. But how? I am getting a string from my Java
object!

Thanks!

-- 
Alexander Lamb 
Groupe Serveurs Applicatifs
Division d'Informatique Midicale
Htpitaux Universitaires de Genhve
21 rue Micheli-du-Crest
CH-1211 Genhve 4 / Switzerland
Tel: +41-22 372.48.46 Fax: +41-22 372.61.98
[EMAIL PROTECTED] / http://www.hcuge.ch

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