I think [EMAIL PROTECTED] wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > I would like to setup jess to runUntilHalt. The idea is > - > > - assert facts with a common unique key > - assert a trigger fact with this key that will fire > rules > - remove facts that contain key > > Questions: > 1. Is this algorithm logical?
Your description is a little sketchy, but you're not saying anything UNlogical here, anyway. > > 2. I would like to create a set of deficiencies based > on the asserted facts and then notify the calling > object that the deficiencies are ready. How do I know > when the engine is done? > Have the last rule call some Java function to indicate that the processing is done -- i.e., use a callback. > 3. Is there a way to match all facts given a slot value > without specifying the fact name? Not really. This is like asking if there's a way to search all the member variables of a Java object regardless of its type (in both cases you can use an extralingual "reflection" mechanism, and in both cases it's slow and inelegant.) In general if you find yourself wanting to do this, then you simply need to reexamine your data design. For example, you might use deftemplate inheritance so that the common data appears in a well-known place in all your facts, then match them with the parent template name. > Or what is the best way to remove old facts? Use reset? Have the last rule that needs a fact delete it? Depends on what you're trying to do. > -Matt > --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 Org. 8920, MS 9012 [EMAIL PROTECTED] PO Box 969 http://herzberg.ca.sandia.gov Livermore, CA 94550 -------------------------------------------------------------------- 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] --------------------------------------------------------------------
