On Mar 21, 2007, at 11:23 AM, Nara Hari wrote:
Now what is the best way to get the rules into Jess, using Jess
syntax like
engine.executeCommand("(jess syntax)") or using Java API?
Depends on how you're building the rules, but generally, the easiest
way is to build the rule in the Jess language or in JessML and let
Jess parse it. The Java API for rule building is accessible in Java
7, but not documented well, and still subject to change.
The facts are added to the engine and value is read back from
engine using
fetch() this seems like a slow process...is there a better way?
Store/fetch is just a convenience mechanism, and there's nothing
magic about it at all. It's just a thin wrapper over a HashMap stored
with the Rete object. Your rules can call your Java methods
directly; give the Jess code an object to call a method on, and then
let the rule call the method to report a result rather than asserting
a fact that you just have to query for later.
---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://www.jessrules.com
--------------------------------------------------------------------
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]
--------------------------------------------------------------------