, the Rule Engine for the JavaTM
|If youíre unfamiliar with the "watch" function, read about it now!
Watch allows you to see when various things happen in the Jess system, such as:
You can customize where the watch output is written using the "set-watch-router" function.
- Rule activations
- Rule firings
- Construct compilations
- Fact assertions and retractions
- Module focus changes
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. |
Union Pacific Railroad
Thanks, George! - JM
Front Page |
Recent Changes |
Powered by Friki |
Last Edited: 18 August 2006