I think [EMAIL PROTECTED] wrote:
> 
>  (defclass a com.xyz.A )
> (defclass b com.xyz.B )
> (defrule assign
>   (a ?type)
>    (b ?type)

Note, again, that this rule will never match instances of the
defclasses described above, for reasons previously discussed; and
again, that variables names have no meaning. You probably mean to
write

 (defrule assign
   (a (type ?t))
   (b (type ?t))

>        =>
>     (printout t  "Matched types" crlf)   )
>                                                                             
>                                                                             
>  where 'type' is the property of bean A and B                               
>   In Java program I want to assert facts and fire the rules.                
>                                                                             
>  Rete engine = ...                                                          
>  engine.definstance("a", a, false);                                         
>  engine.definstance("b", b, false);                                         
>                                                                             
>  will this fire the rules? If not how can I fire the above rules from Java  
>  program?                                                                   

Rules only fire during a call to the Rete.run() or Rete.runUntilHalt()
method. After you've defined all  your rules and put your definstances
into working memory, you can call run() to fire the matching rules.




---------------------------------------------------------
Ernest Friedman-Hill  
Science and Engineering PSEs        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