The answer depends on what the results are, precisely. For example, if
your Java code wants to know about the existence of certain facts
after a run, it can either call Rete.listFacts() to get an iterator
over all the facts, or it can use a defquery to find only specific
facts. 

If, on the other hand, you have a rule named compute-final-answer and
on its RHS it calculates a result like "42", then yes, that rule's RHS
should call (store RESULT 42) and the Java code should call
Rete.fetch("RESULT").intValue(null).

Does that answer your question?




I think Archana Raghavendra wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,
>         I have a question about extracting output from the jess engine to a java 
>program. I have a java program, which instantiates a rete object , I enter some facts 
>and rules from the java pgm into the rete engine. now, i assert some facts in the 
>engine which fire some rules and give me some results. How do I get these results 
>from the rete engine back into my java code?
> I understand that I have to do some "store' and "fetch" but I am getting confused ..
> 
> Thanks,
> Archana



---------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to