Great !
I thank you to aswer me so quickly.

Samuel Kentzel

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: jeudi, 29. novembre 2001 17:14
To: [EMAIL PROTECTED]
Subject: Re: JESS: Catch the current instance evaluated by a rule ?




Every defclass gets an OBJECT slot, which contains a reference to the
Bean. 

 (deffrule myRule 
    (person (OBJECT ?per))
    (test (myFunction ?per))
 =>
 (printout t "Fire" crlf))

This is mentioned and illustrated in manual section 2.7.4.

I think Samuel Kentzel wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> I try to do somethings like this :
> 
> (defclass person Person)
> (bind ?p1 (new Person))
> (bind ?p2 (new Person))
> (bind ?p3 (new Person))
> (definstance person ?p1 static)
> (definstance person ?p2 static)
> (definstance person ?p3 static)
> 
> (deffunction myFunction(?per) (.....use of the current instance of the
> person.......... return TRUE))
> 
> I wrote a rule like this :
> 
> (deffrule myRule 
>    (person ?per)
>    (test (myFunction ?per))
> =>
> (printout t "Fire" crlf))
> 
> This rule doesn't work. It seems that Jess cannot bind the current
instance
> of person in the ?per variable.
> Why we can bind a member of person (like : (person (name ?n)) but not the
> instance itself (person ?per)) ?  
> Do you have a solution to solve this problem ?
> 
> Tanks for your answer
> 
> Samuel Kentzel
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------- 
> 
> ---------------------------------------------------------------------- 
> 
> >> This email and any files transmitted with it are CONFIDENTIAL and
> intended solely for the use of the individual or entity to whom they are
> addressed. 
> >> Any unauthorised copying, disclosure, or distribution of the material
> within this email is strictly forbidden. 
> >>  Any views or opinions presented within this e-mail are solely those of
> the author and do not necessarily represent those of Odyssey Asset
> Management Systems SA unless otherwise specifically stated. 
> >> An electronic message is not binding on its sender.  Any message
> referring to a binding engagement must be confirmed in writing and duly
> signed. 
> >>If you have received this email in error, please notify the sender
> immediately and delete the original.
> 
> --------------------------------------------------------------------
> 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]
--------------------------------------------------------------------




---------------------------------------------------------------------- 

---------------------------------------------------------------------- 

>> This email and any files transmitted with it are CONFIDENTIAL and
intended solely for the use of the individual or entity to whom they are
addressed. 
>> Any unauthorised copying, disclosure, or distribution of the material
within this email is strictly forbidden. 
>>  Any views or opinions presented within this e-mail are solely those of
the author and do not necessarily represent those of Odyssey Asset
Management Systems SA unless otherwise specifically stated. 
>> An electronic message is not binding on its sender.  Any message
referring to a binding engagement must be confirmed in writing and duly
signed. 
>>If you have received this email in error, please notify the sender
immediately and delete the original.

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