Hi,
I am using Jess6.0a2 embedded in an enterprise java bean application. I have
a number of EntityBeans, that when they are created, i store their reference
in the Rete object like this:
rete.store(name + "INSTANCE", entityBean);
rete.executeCommand("(assert (" + name + " " + id + "(fetch " + name +
"INSTANCE)))");
so an example fact asserted would be (generateBill 23 <reference to
generateBill EntityBean> )
I have several rules set in the engine as below.
(defrule discountBill (generateBill ?id ?generateBill) (test (call
?generateBill isCompleted)) => (printout t
\"discountBill ready\" crlf))
What i am trying to do is activate the discountBill rule, when the
generateBill Entity Bean isCompleted.
My problem is that it appears the (test (call ?generateBill isCompleted))
is evaluated only once at the start, when it returns FALSE, and not again
later on when (call ?generateBill isCompleted) returns TRUE. So the
discountBill rule never fires even though the test should be returning TRUE,
at the later stage.
Is this assumption true that the test only gets evaluated once, or do tests
get evaluated every time run() is called and am i missing something???
any help/ advice would be much appreciated.
regards
colin...............
---------------------------------------------------------------------
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]
---------------------------------------------------------------------