[rules-users] Strange rule compilation issue.

Brice Figureau brice+drools at daysofwonder.com
Wed Feb 3 12:10:36 EST 2010


Hi,

I have the following MVEL expression in a rule (with drools 5.1.0M1):

Scenario( id == 6147 )

Scenario is an interface which has the following accessor (and tons of
other methods):

public interface Scenario 
{
...
	public int getId();
...
}

But either in Eclipse or when compiling the rules I get the following
error:
Unable to create Field Extractor for 'id' of '[ClassObjectType class=com.daysofwonder.mm.Scenario]'

I tried tons of variants including:
Scenario( getId == 6147 )
that still doesn't work.

The only variant I could make work is:

$s : Scenario( )
Scenario ( eval($s.getId() == 6147 ) )

which is plain ugly.

using something else than a Scenario or defining a new interface with
only getId() in it makes it work.

Any idea about what I got wrong?
How can I debug the situation?

Thanks,
-- 
Brice Figureau
My Blog: http://www.masterzen.fr/




More information about the rules-users mailing list