Jess 7.0 also provides a way to create rules via XML (JessML) which, depending on your requirements, may be the easiest (and possibly the slowest) way to go.
See: jess.xml.JessSAXParser and: Jess70a4\examples\xml\sticks Jess70a4\examples\xml\mab I've not used this feature (yet) but I suspect it works as advertised. Good luck! alan > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Wednesday, April 13, 2005 4:07 PM > To: jess-users@sandia.gov > Subject: Re: JESS: Creating rules using the Jess API > > > I think M H wrote: > [Charset iso-8859-1 unsupported, filtering to ASCII...] > > Hi, > > > > Chapter 18 of the book "Jess in Action" is great, but > > nothing is really mentioned regarding creating rules > > using the Jess API. > > Jess 6 (and earlier) don't support creating rules except by > evaluating a "defrule" construct in the Jess language. Jess 7 > does actually support this, although I'm really at a loss as > to why anyone would want to do it. > > Many people come to Jess and this is the first thing they > want to do, though; it just seems natural to a Java > programmer, I suppose, so solve a problem by writing only > Java code. My advice to you -- before you delve into the > as-yet-undocumented Jess 7 APIs for rule creation > -- is to work with Jess for a while and get used to the kinds > of things you can do. Then when you look at the Java APIs, > you'll understand just how expressive the Jess language is in > its domain. For rules of even moderate complexity, the Java > code to create a rule will be ten times as long as the > equivalent Jess code -- or more; and it will be no more > efficient, because Jess's parser is quite fast, and the time > to parse and construct a rule is less than the time it takes > to compile a rule into a Rete network (which will also have > to be done for rules created using the API.) > > > > > --------------------------------------------------------- > 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] > -------------------------------------------------------------------- > > -------------------------------------------------------------------- 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] --------------------------------------------------------------------