Title: Re: JESS: Still a problem when trying to match an object in an object... Even more info
Well,

To find an answer, I tried to simplify the problem.

So I wrote:

(defrule ASP1
    (OrmedContext
        (readyToRun TRUE)
        (task "script")
        (selectedCompleterResponse ?r)
        (OBJECT ?x)
    )
    =>
    (printout t ?r crlf)
    (bind ?s (new OrmedScript "Aspirine"))
    (call ?s addInstruction (new OrmedScriptInstruction "Aspirine Cardio (100mg)" TRUE TRUE TRUE))
    (call ?s addInstruction (new OrmedScriptInstruction "Aspirine 500mg" TRUE TRUE TRUE))
    (call ?s addInstruction (new OrmedScriptInstruction "Aspirine 1000mg" TRUE TRUE TRUE))
    (call ?x setCurrentScript ?s)
)

Well, I still crash in the definstance:

**** ERROR IN DEFINSTANCE: Jess reported an error in routine DefinstanceList.createFact.
  Message: Called method threw an exception.
    at jess.DefinstanceList.createFact(DefinstanceList.java:119)
    at jess.DefinstanceList.definstance(DefinstanceList.java:177)
    at jess.Rete.definstance(Rete.java:1162)
    at jess.Rete.definstance(Rete.java:1154)
    at Session.<init>(Session.java:39)

The maddening thing is that it is probably something obvious and stupid I didn’t see!

Alex

--
Alexander Lamb
Groupe Serveurs Applicatifs
Division d'Informatique Médicale
Hôpitaux Universitaires de Genève
21 rue Micheli-du-Crest
CH-1211 Genève 4 / Switzerland
Tel: +41-22 372.48.46 Fax: +41-22 382.86.80
[EMAIL PROTECTED] / http://www.hcuge.ch

Reply via email to