Michael,
Yes, it is a known problem. "attributes" is a reserved word in JBoss Rules and can't be used as an attribute name in 3.0.x. The issue is already solved in trunk as we made the parser context aware to allow for keywords reuse. See:
http://jira.jboss.com/jira/browse/JBRULES-214 []s Edson Anstis, Michael (M.) wrote:
Hi, I have a simple class:- public class Simple { private Attributes attributes; public Attributes getAttributes() { return this.attributes; } } And a simple rule:- rule "Simple" when $s : Simple( $a : attributes ) then System.out.println("Simple!"); EndI receive an "Unexpected token $a" error in the Eclipse plug-in. Thinking it might just be related to the plug-in I naively run the code and receive a org.drools.rule.InvalidRulePackage error.If I change the property name to something else like this:- public class Simple { private Attributes attributes; public Attributes getSmurf() { return this.attributes; } } rule "Simple" when $s : Simple( $a : smurf ) then System.out.println("Simple!"); End Everything is fine. Is this a known issue? With kind regards, Michael Anstis ------------------------------------------- *Next Generation Estimating System* ( Trafford House (Int) 8 718 2239 ( Trafford House (Ext) +44 (0)1268 702239 * <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> Ford Motor Company Ltd. Registered in England: No. 235446 Registered Office: Eagle Way BRENTWOOD Essex CM13 3BW ------------------------------------------------------------------------ _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
-- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.com _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
