Hi Brice,
You are doing it right:
Scenario( id == 6147 )
We've been through quite some changes in trunk, and because of that
there were some regressions that are being fixed as we speak. I suggest that
you either use the stable 5.0.1 for now or if you can wait till M2, it
should fix this kind of issue.
Edson
2010/2/3 Brice Figureau
<[email protected]<brice%[email protected]>
>
> 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/
>
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users