Thanks. I added a few more specific questions below. On Wed, 13 Nov 2002, [EMAIL PROTECTED] wrote:
> > 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. How do you know what is the last rule? Is it the order they are loaded? > > > 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. > All facts would descend from a base object so, yes this would work. > > > 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. > > Calling reset() would remove other facts added in by different clients. Having the last rule that needs the fact delete it is sketch for me because the fact may be used by multiple rules. If I can determine what is the last rule, then I could have it match the fact and delete it. > > > -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 > <a href="http://mail.smallleap.com/jump/http://herzberg.ca.sandia.gov">http://herzberg.ca.sandia.gov</a> > 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] > -------------------------------------------------------------------- -------------------------------------------------------------------- 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] --------------------------------------------------------------------
