Hi, I'm new to jess but I've investigated several other commerical/open source rule engines. I have a pretty good understanding to the general idea of rule engines. I'm having difficulty specifying rules in Jess even after I spent one day reading the documentation. Specifically, my question is as follows.
I have developed separate java classes to represent my business objects. In another java program, I create a jess engine using the steps at this link http://www.jessrules.com/jess/docs/70/embedding.html. I asserted the facts to the working memory using engine.add(myObject). Now my question is how I'm going to use those objects in rule specification. Suppose I added two instance of the same type Customer to the working memory. I want to define a rule to check whether the two customers have the same name. "name" is a private field in class Customer and I provide setter and getter methods in the class to access this field. Could you please give me some sample code to do this. Thanks very much. p.s. The following example on the same page of the documentation seems require some other things to work. Is the source for this example available? (defrule 10%-volume-discount "Give a 10% discount to everybody who spends more than $100." (Order {total > 100}) => (add (new Offer "10% volume discount" (/ ?total 10)))) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------------------------------------------------------------- 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] --------------------------------------------------------------------
