Sorry. I was reading the manual Section 8.2 (Definstance facts), where you postulate a Java Bean called ExampleBean. That's sitting in Java. The next paragraph shows, from an interactive session with Jess, the command (defclass simple ExampleBean). How does Jess know about ExampleBean in the first place? Where does it get imported, or how does Jess access the Bean, etc. That is my confusion here. There is an import commant (Section 16.87), but I don't expect to be able to import a java package into Jess unless it is in a specific location so Jess can find it, etc.

- Mike


On Jul 17, 2006, at 7:26 AM, friedman_hill ernest j wrote:

I think mdean77 wrote:
Ridiculous question.  I have a Bean in Java.  I want to have Jess
build itself a template for a shadow fact.  But Jess does not know
about the Bean.  How does one tell Jess about the classes that have
been created in Java?  Right now, I manually create a fact in Jess
and move the values from Java, but this is not ideal.


In Jess 7, you can use Rete.add(), which automatically creates the
template if needed and adds the object to working memory.  In Jess 6
-- or if you want to choose your own template name rather than using
the class name -- you can use the Rete.defclass() and
Rete.definstance() methods.

The manual section concerning templates, facts, and Java objects in
working memory has been completely rewritten for the next release -- I
hope it will make this stuff easier to learn and use.




---------------------------------------------------------
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 owner-jess- [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]
--------------------------------------------------------------------

Reply via email to