In the pattern

  (typeSavoirApprenant "implicite" (get ?connUO objet)) 

you clearly want the function call (get ?connUO objet) to be evaluated
during pattern-matching, but your syntax is incorrect. Jess is trying
to interpret your function call as part of the pattern -- i.e.,
asuming you think that "get" is the name of a slot in the
typeSavoirApprenant fact.

One syntax that will work for you would be like this:

  (typeSavoirApprenant "implicite" =(get ?connUO objet)) 

the "=" sign turns the function call into a "return value constraint"
-- i.e, a proper part of the pattern.

I think Catherine CLEDER wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> 
> 
> 
> Hello,
> 
> I have a problem to combine, in Jess, a value returned by a method on a 
> java fact, and a deffacts fact.
> 
> 
> once I have
> 
>-------------------------------------------------------------------------------------------------------------------
> (deffacts ConnaissanceLing
>       (typeSavoirApprenant "implicite"  " relation spatiale")
>       (typeSavoirApprenant "implicite"  " correspondance chaine ecrite orale") )
> 
>-------------------------------------------------------------------------------------------------------------------
> 
> 
> and secondly I have a rule such as :
> 
> 
>-------------------------------------------------------------------------------------------------------------------
> (defrule ruleTest
>       (uop
>               (conn ?connUO)
>               (OBJECT ?o2) )
>       (typeSavoirApprenant "implicite" "toto")                        ; this call to 
>a 
> deffacts is ok.
>       (typeSavoirApprenant "implicite" (get ?connUO objet))   ; <------------- 
> generate a bad slot value !
> ;     (porteSur "texte" (get ?o2 objet))
> 
>       =>
>       (printout t " RCO-Priorite-1.05 appliquie" crlf)
> )
> 
>-------------------------------------------------------------------------------------------------------------------
> 
> In this rule, the third instruction call a fact from the deffacts, with a 
> (get ?connUO objet) that returns a String (java.lang.String). and Jess 
> generate a Bad Slot value ...
> Is it impossible to use this way ?
> 
> Thanks for your help,
> 
>       Catherine CLEDER
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

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