Hi, Thank you for the advice, I am able to print the activated facts out.
I have this one last question. How can I get the activated facts out into Java variable? I need to show the activated facts to user, the result or asserting a query to knowledge. Do I need to grab by attribs=* using string pattern matching? I tried Iterator i = r.listActivations(), but I do not know how to populate the Iterator contents out. Please advice. ------------------------- Fact-id=<Fact-2> id=2 attribs=control-message-frequency ------------------------- Fact-id=<Fact-1> id=1 attribs=low-budget f-0 (MAIN::initial-fact) f-1 (MAIN::adv-attributes (id 1) (attribs low-budget)) f-2 (MAIN::adv-attributes (id 2) (attribs control-message-frequency)) For a total of 3 facts. --- [EMAIL PROTECTED] wrote: > I think calvin pevee wrote: > > > > r.executeCommand("(defrule show-adv-attributes" + > > //"?fact <- (adv-attributes (id ?id) > ... > > > > Java throws me this exception:- > > > > Jess reported an error in routine > Jesp.parseDefrule. > > Message: Expected '=>' . > > Program text: ( defrule show-adv-attributes?fact > <- > > at line 1. > > > > > > Look at the error message. See how > "show-adv-attributes?fact" is > smooshed together? In assembling your String, you've > neglected to put > a space or newline in between the name of the rule > and the variable > that first pattern is bound to. '?' is a legal > character in names > (for better or for worse.) So anyway, that's why > there's an error on > this rule. > > There no difference at all between the syntax > accepted by > "executeCommand()" and the syntax you use in a .clp > file -- the same > parser reads them both. > > > --------------------------------------------------------- > Ernest Friedman-Hill > Advanced Software Research Phone: (925) > 294-2154 > Sandia National Labs FAX: (925) > 294-2234 > PO Box 969, MS 9012 > [EMAIL PROTECTED] > Livermore, CA 94550 > http://herzberg.ca.sandia.gov > > -------------------------------------------------------------------- > 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] > -------------------------------------------------------------------- > > __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail -------------------------------------------------------------------- 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] --------------------------------------------------------------------