I think J. Michael Dean wrote:
> I think I have resolved my internal confusion.  I am thinking about  
> Jess rules as being type-safe, which is nonsense.  So if I have a  
> rule file that refers to some kind of fact that does not exist, there  
> will be no error - the rules that depend on that fact simply will not  
> fire.  So if I instantiate the relevant fact from within Java,  then  
> the rules will fire.  So my question about "how does the rule file  
> know about a shadow fact" is meaningless - the rule file doesn't care.

The rules don't care about the *facts*, but they do care about the
*template*. Before you can define a rule that will match any kind of
unordered template (including those used by Java objects in working
memory,) the corresponding template has to be defined. In Jess 7, you
can do this with either "defclass" or "deftemplate":

(defclass Example com.mycompany.Example)

-or- 

(deftemplate Example
  (declare (from-class com.mycompany.Example)))




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

Reply via email to