Hi,
I have a question regarding how to use the attribute
of a java object in the LHS of a rule.
I have a java object to be used in the JESS engine as in the
readme -
Foo foo = new Foo();
engine.executeCommand("(defglobal ?*x* = 0)");
Funcall f = new Funcall("bind", engine);
f.add(new Value(RU.putAtom("*x*"), RU.VARIABLE));
f.add(new Value(foo, RU.EXTERNAL_ADDRESS));
f.simpleExecute(f, rete.globalContext());
The object has a member variable called - cmp
I want a rule to fire depending on the value of the cmp member variable
I envisage using something like follows
(defrule r1
(get ?*x* cmp)
=>
(DO SOMETHING)
)
Is this okay??
The next problem I have is that, I set the member variable cmp in the
right side
of another rule. In this situation will the above rule check (get) the
new value and
test it. Do I need to add "notify changed" functions to the Foo object?
Is my methodology correct?
Thanks for any help.
Regards
Conor Power.
--
Conor Power
Cunav Technologies
45 Dawson Street, Dublin 2, Ireland.
T: 353-1-670-6909 (Ext: 114) F: 353-1-670-6919 W:http://www.cunav.com
---------------------------------------------------------------------
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]
---------------------------------------------------------------------