I think that PierceJ wrote:
>>It appears I must first call Rete.defclass(...)  BEFORE loading the rules
file.  What I am seeing is a
>>deftemplate is created when the rules file is loaded.

Hi Pierce,
You may be violating the Zen Of Jess
http://herzberg.ca.sandia.gov/jess/zen.shtml here. :-D

The Rete.defclass method is intended for creating a deftemplate of a
JavaBean to be "shadowed" in working memory as a "shadow fact".  Note that
the private fields of a JavaBean correspond to the slots in a shadow-fact,
and that Jess is expecting your class to be like a JavaBean (proper field
names, getters and setters, etc. so that Jess can use reflection to "read"
the bean) -- you certainly shouldn't pass Rete.defclass an Integer and
expect this to work.

Once Jess "knows" how to store your bean as a fact, then you can use that
deftemplate to add shadow-facts to working memory using Rete.definstance.
If you really want to try this via the API now, I recommend reading Jess In
Action section 6.5 or click here
http://herzberg.ca.sandia.gov/jess/docs/61/language.html#definstance_facts
and work through the examples.  If you do that, I'll be happy to hack
through some examples with you afterward.

IMHO - You're always better off learning Jess from the command line using
the Jess language before trying to program Jess's API directly.  Why?
Because you'll develop a better feel for when it's more efficient to write
Jess script, when to program the API itself, or when to integrate the two.
This flexibility is what separates Jess from other rule languages and
shells.

Hope this helps!
Cheers,

Jason
------------------------

Jason Morris
Morris Technical Solutions
[EMAIL PROTECTED]
www.morristechnicalsolutions.com
fax/phone: 503.692.1088




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