®, the Rule Engine for the Java TM Platform
If you’re unfamiliar with the "watch" function, read about it now!
http://www.jessrules.com/jess/docs/70/functions.html#watch
Watch allows you to see when various things happen in the Jess system, such as:
- Rule activations
- Rule firings
- Construct compilations
- Fact assertions and retractions
- Module focus changes
You can customize where the watch output is written using the "set-watch-router" function.
http://www.jessrules.com/jess/docs/70/functions.html#set-watch-router
Watch is good in that it will show you everything that’s happening in the system, but sometimes it’s just too much data to shift through. This is especially true when you're trying to determine what facts in working memory are causing a rule to fire.
The most powerful utility I’ve found for debugging my Jess programs is the simple jess.Main console application. From this command-line application, you can examine what facts are in working memory: "(facts)", see what rule activations are on the agenda: "(agenda)", and step through the rule firings one at a time: "(run 1)".
Unfortunately, Jess expert systems in real applications are usually embedded into larger Java programs, which makes accessing the command loop more difficult. This CommandLoop function may allow you to explicitly start the console from an otherwise back-end process.
StepFunction | Fire one single rule and output the agenda for all modules in the focus stack. |
AllAgenda | Output the agendas for each module in the focus stack. |
NextAgenda | Output the agenda for the next module in the focus stack. |
ListAllFacts | List all the facts accross all the different modules in the system. |
CommandLoop | Explicitly start a command-loop from within your expert system. |
WatchRouter | Direct watch information to different routers. |
Submitted by:
GeorgeWilliamson
Union Pacific Railroad
gawillia@up.com
Thanks, George! - JM
|
Front Page |
Sandbox |
Recent Changes |
Powered by Friki |
Last Edited: 18 August 2006
|