Say I have 2 classes defined as follows (with the Beans stuff in it as
well):

public class Aobj {
    String val;
    Bobj b;

    public void setVal(String v) { val=v; }
    public String getVal() { return val; }
    public void setB(Bobj bobj) { b=bobj; }
    public Bobj getB() { return b; }
}

public class Bobj {
    String ccc;

    public void setCCC(String c) { ccc = c; }
    public String getCCC() { return ccc; }
}

I have an instance of Aobj which contains an instance of Bobj.  How do
I get at the ccc variable in b from the instance of Aobj within JESS
rules?
I can get at the val attribute when passing in the Aobj instance via
defclass,
but I do not know how to get at the ccc variable.

(defclass aobj Aobj)
(defclass bobj Bobj)

(defrule rule1
    (aobj (val "XXX"))
    =>
    ....)

(defrule rule2
    (aobj (b ?b1))
    (?b1 (ccc "XXX")))     <==  something like this??
    =>
    ...)

Thanks for any help,
KathyLee Simunich
Argonne National Lab

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to