[rules-users] field names containing underscore

Samuli Saarinen samuli.saarinen at remion.com
Tue May 31 03:50:09 EDT 2011


I was a bit of hasty posting this. As I checked it more closely it seams 
that if field name starts with uppercase letter it must be accessed 
using lower case in the rule. So this has nothing to do with the underscore.

Sorry for the noise.

Samuli

On 31.5.2011 10:37, Samuli Saarinen wrote:
> Hello,
>
> Currently it seams that using underscore as part of a field makes it
> impossible to use the field in a rule.
>
> eg.
> public class Bean {
>
> private boolean my_boolean;
> }
>
> rule "Test"
> dialect "mvel"
> 	when
>
>           b: Bean(my_boolean == true)
> ....
>
> When compiling the rule this results in "Unable to build constraint as
> 'my_boolean' is invalid" error using Drools 5.2.0.CR1
>
> and "Unable to create Field Extractor for 'my_boolean' of
> '[ClassObjectType class=com.test.Bean]'" using Drools 5.1.1
>
> Is this the expected behavior?
>
> Cheers,
>
> Samuli
>



-- 
Remion Oy           Etävalvontajärjestelmät liiketoiminnan
Samuli Saarinen           tehostamiseen
gsm +358 (0)50 3560075
fax +358 (0)3 2125064       www.remion.com



More information about the rules-users mailing list