[rules-users] persistent java objects in working memory
Chris Richmond
crichmond at referentia.com
Wed Sep 23 15:15:35 EDT 2009
Hello,
I am trying to create a set of java objects, which I insert into the session
at startup. Then at regular timed iterations I want to examine the values
of those objects. During the timer iteration, some fields may have been
changed by the primary program. So I have a rule for now that is just
trying to identify that the do indeed exist on each iteration:
rule "Identify Java Objects"
lock-on-active
when
$mo : MyDataObject();
then
System.err.println("MYOBJECT in system: " + $mo.getID + " | " +
$mo.getTestFieldData);
end
As I said, at startup I insert 3 of these objects into my session, then
every 10 seconds I just want to ensure they are there. However the output
from this rule only fires on the firet iteration, after that the rule
doesn't fire. I am not retrcating the objects or even concerning myself
with the FactHandle, as I plan to leave them in working memory and change
values on those 3 objects from the main application in each application
loop, then make decisions in the rule engine based on the values of those 3
objects. However, for now I just nee to find out why the objects only live
for my first loop and call of session.fireAllRules().
Any ideas or what I am doing wrong?
Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090923/b2e80c7b/attachment.html
More information about the rules-users
mailing list