Hello, all. I'd like to create patterns that are capable of matching against "top-level" member variables, as well the member variables of child Object references (also beans) on the parent. As an example, I might have an Order object with a top-level member "m_order_total" and also a Vendor bean reference as member "m_vendor". The Vendor bean, in turn has a member variable "m_vendor_id", which I would like to match against. I can create a rule that does the job like so: (defrule big-sale-vendor-5 "A Big-ticket purchase for Vendor 5" (order (m_order_total ?ot&:( > ?ot 3000 )) (vendor ?v&:(eq (get-member ?v m_vendor_id) 5)) ) => (printout t "Vendor 5 Big Sale Fired" crlf) ) But the syntax I intuitively wished to write was: (defrule big-sale-vendor-5 "A Big-ticket purchase for Vendor 5" (order (m_order_total ?ot&:( > ?ot 3000 )) (vendor (m_vendor_id ?vid&:(eq ?vid 5))) ) => (printout t "Vendor 5 Big Sale Fired" crlf) ) Which turns out to be a bad slot value for vendor, of course. I'm in the process of creating a rule compiler, and the elegance of mindless recursion seems desirable. Is there an obvious approach that I am missing? And what of the case when my parent bean contains a reference to an Object[] whose values a beans, and whose members I would also like to test against? As in: Order( m_order_total , OrderItem[] m_order_items) OrderItem( m_product_id ) Any assistance is very greatly appreciated. Thank you, -Ed Bean ------------------ [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] ---------------------------------------------------------------------
