I think Shoeb Bhinderwala wrote:
> How do I match a property of a property of a Java Bean 
> in a Jess rule and bind it to a variable? 
[...]
> 
>         /* assert Trade */
>         Funcall lFuncall = new Funcall("definstance", mRete);
>         lFuncall.add(new Value(aName, RU.ATOM));
>         lFuncall.add(new Value(aTrade));
>         lFuncall.execute(mRete.getGlobalContext());
> 

Note that the Rete class has a public definstance() method now -- you
can just say

        mRete.definstance(aName, aTrade, true);


[...]
> Why doesn't Jess accept the following:
> (defrule is-cash
>     (trade (requestId ?requestId) (security ?security))
>     (?security (secType "CASH"))
[...]

Every defclass gets a slot OBJECT, and the shadow facts use this to
hold a reference to the represented object; so you write your rule as

 (defrule is-cash
     (trade (requestId ?requestId) (security ?security))
     (security (OBJECT ?security) (secType "CASH"))
      ...



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

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