[rules-users] error while running a dsl

Michael Anstis michael.anstis at gmail.com
Mon Sep 6 05:34:09 EDT 2010


Your DSL shows a class called "employee" with field "statename".

Perhaps your DSL should read:-

[when]employee belongs to a particular state{state}=$employee:employee
(state=="{state}");

[then]Greet Employee=System.out.println("Hello");

Your class name "employee" also doesn't follow normal practice of
capitalising the first letter; so "Employee" would be preferential.

2010/9/6 Kripa Nathwani <Kripa.Nathwani at lntinfotech.com>

>  Hello,
>
>
>
> I have written the following simple DSL in Drools:
>
>
>
> [when]employee belongs to a particular state{state}=$employee:employee
> (statename=="{state}");
>
> [then]Greet Employee=System.out.println("Hello");
>
>
>
> I have also created the corresponding model with a field named “state”.
>
> When I try to create business rule for the same and when I validate the
> rule I get the following error:
>
>
>
>
>
> *Unable to create Field Extractor for 'statename' of '[ClassObjectType
> class=dslDemoPackage.employee]' in rule 'testdsl'*
>
> * *
>
> Let me know how I can resolve.
>
>
>
>
>
> Best Regards,
>
> Kripa
>
>
>
> ------------------------------
> This Email may contain confidential or privileged information for the
> intended recipient (s) If you are not the intended recipient, please do not
> use or disseminate the information, notify the sender and delete it from
> your system.
>
> ______________________________________________________________________
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100906/39dda494/attachment.html 


More information about the rules-users mailing list