[rules-users] Problem binding to property "attributes"

Anstis, Michael (M.) manstis1 at ford.com
Wed Feb 7 08:11:25 EST 2007


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!");
	End

I 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
* <manstis1 at ford.com>
Ford Motor Company Ltd. 
Registered in England: No. 235446 
Registered Office: Eagle Way BRENTWOOD Essex CM13 3BW

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070207/df3f2d53/attachment.html 


More information about the rules-users mailing list