nirajkumar motwani wrote:
Hi All,
I am new to using jess and was having some problems when i wrote a small java code...
when i do the following (below is part of the code), i donot get any fired rules, why is that:
...
engine.executeCommand("(watch rules)");
String rule3 ="(defrule euality-rule (test (eq 1 1)) => )";
engine.executeCommand(rule3); engine.executeCommand("(run)");
System.out.println("run command executed...");
...
The system.out statement is printed but thw watch rules does not indicate that any rule was fired? what am i doing wrong?
Thanks
Nirajkumar Motwani
Graduate Student
Computer Science Department
University Of Southern California
I'm a newbie too, but I think you should just insert a
engine.executeCommand("(reset)");
before the run-command. Then the rule will fire. You find more about the reset-command in Jess in Action section 6.1.1.
Johan
-- The University of Tokyo Dept. Precision Machinery Engineering Hongo 7-3-1, Bunkyo-ku Tokyo 113-8656 JAPAN
-------------------------------------------------------------------- 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] --------------------------------------------------------------------