Our code predates Rete.setMark(), etc., so we use bsave and bload to save state and backtrack. Will be interested to hear your results with setMark(), in particular w.r.t. whether the agenda is restored to its previous state. Thanks,
Jonathan

On 12/1/2008 12:46 PM, Jason Morris wrote:
Hi All,
One convenient architecture for controlling processes in Jess is to create one or more components whose sole purpose is to abstract the interaction with the rule engine (Rete object).  This abstraction I like to call a RuleEngineManager.  The RuleEngineManager is a facade to the Rete object, which allows for the application programmer to command the application in domain specific terminology which wraps the appropriate underlying Jess API code.

The process flow is something like this:

1. The user interacts with the application.
2. The application interacts with the RuleEngineManager.
3. The RuleEngineManager delegates to helpers such as a:
    - WorkingMemoryManager:  Manages the high-level working memory processes such as initialization, rollback, and queries.
    - RuleManager: Manages the loading and unloading of rule modules and focus stack.
4. The delegate performs the assigned task, executing a callback if necessary.

In the application that I'm currently coding, we have need to rollback the working memory to a previous state when certain conditions arise. 
Of course, Jess provides the WorkingMemoryMarker class and its methods to provide the State object. 

To implement the actual stack of working memory markers in the WorkingMemoryManager, I've decided to use the org.apache.commons.collections.map.LinkedMap , which allows me to label the markers and keep them in sequential order.

I thought I'd pass this along as a tip and ask the general question:

Has any one else used this or a similar architectural approach; and, if so, how did you tackle it?

Cheers,
Jason

-----------------------------------------------------------
Morris Technical Solutions LLC
[EMAIL PROTECTED]
(517) 304-5883
-------------------------------------------------------------------- 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] --------------------------------------------------------------------

Reply via email to