I'd assume you need two rules:- rule test123a when $c : Cheese() $ct : CheeseType(cheese = $c) then $ct.setPrice("cheap"); update($ct); end
rule test123b when $c : Cheese( type = "myType" ) CheeseType(cheese = $c, price = "cheap" ) then ... end Java dialect doesn't support object graphs - I think MVEL does but I'm unfamilair with the syntax. You could also replace the two patterns (one for Cheese and the other CheeseType) with an eval but you'll loose performance. Forgive me if I'm wrong and this is 3.0.x and not 4.0.x. With kind regards, Mike -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 12 September 2007 22:11 To: rules-users@lists.jboss.org Subject: [rules-users] java void in LHS Hi all, I would like to insert a java void to my condition(LHS). Is there anyway to do that? Like an example below, how can I set something to my object before evaluate it. rule test123 when cheese: Chesse() --->>> chess.getType().setPrice("cheap"); eval (chesse.getType () == "myType") then ..... end Thanks, Tim _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users