You need to use queries, which are documented in detail here:

http://www.jessrules.com/jess/docs/71/queries.html

It sounds to me, however, as if you're still trying to put the cart before the horse. None of your questions have hinted at the existence of any rules. If you're not writing rules, there's little reason for you to be using Jess. If you *were* writing rules, then there would be little reason to search for values from Java, but rather the rules could send them to Java code as appropriate.



On Nov 26, 2010, at 2:22 AM, alvin0618 wrote:


How i do retrieve the facts' values from Jess to Java? I have read some example, they're just using printout t for displaying the message from Jess
instead of showing assign into a variable. Could someone can show one
example as the condition at below.

JESS part:

(deftemplate person (slot firstName) (slot lastName) (slot age))

(assert (person (firstName Fred) (lastName Smith) (age 19)))


Java Part:
public class RuleEngine {
        private Rete engine;
       private String firstName;
       private String lastName;
        private Int age;
        
        public RuleEngine() throws JessException
        {
                engine = new Rete();
                engine.batch("my_engine.clp");

               /* What should i do over here?????*/     
        }
}



--
View this message in context: 
http://old.nabble.com/Retrieve-Variable-from-Jess-to-Java-tp30308902p30308902.html
Sent from the Jess mailing list archive at Nabble.com.



--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov .
--------------------------------------------------------------------

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012                            ejfr...@sandia.gov
Livermore, CA 94550                             http://www.jessrules.com





--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
--------------------------------------------------------------------

Reply via email to