I'm a new user to Jess, and I've been trying to get it running reading
the documentation and the examples, but I still can't..
My main problem is understanding the way the objects are "inserted" into
jess... but let me try to explain...
What I intend to do is apply a set of rules to several facts (a vector
for example). For this, I used the pumps example as a base. I defined 2
classes in the rule file:
(defclass emailInfo jesstests.EmailInfo)
(defclass popImap jesstests.PopImap)
and in my class, I am trying to do the following:
try {
for (int i = 0; i < emailInfo.size(); i++) {
EmailInfo einfo = (EmailInfo)emailInfo.elementAt(i);
Funcall f = new Funcall("definstance", rete);
f.add(new Value("emailInfo", RU.ATOM));
f.add(new Value(einfo));
f.execute(rete.getGlobalContext());
}
rete.executeCommand("(run)");
} catch (Exception e) {
e.printStackTrace();
}
This throws an exception in the createFact method in Definstance.
However, I'm also not certain this will do what I intend.. since I don't
know if every time I'm calling Funcall, the object is saved in the
engine, or even if it is being overwritten...
Can anyone point me in any direction?
--
Cheers,
-- Ricardo Manuel Oliveira
-- Computer Science Student
-- FCT - University of Coimbra
---------------------------------------------------------------------
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]
---------------------------------------------------------------------