Your DSL shows a class called &quot;employee&quot; with field &quot;statename&quot;.<div><br></div><div>Perhaps your DSL should read:-</div><div><br></div><div><p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">
[when]employee belongs to a particular state{state}=$employee:employee (state==&quot;{state}&quot;);</p></div><div><p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">[then]Greet Employee=System.out.println(&quot;Hello&quot;);</p>
</div><div><br></div><div>Your class name &quot;employee&quot; also doesn&#39;t follow normal practice of capitalising the first letter; so &quot;Employee&quot; would be preferential.</div><div><br><div class="gmail_quote">
2010/9/6 Kripa Nathwani <span dir="ltr">&lt;<a href="mailto:Kripa.Nathwani@lntinfotech.com">Kripa.Nathwani@lntinfotech.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hello,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I have written the following simple DSL in Drools:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">[when]employee belongs to a particular state{state}=$employee:employee (statename==&quot;{state}&quot;);</p>
<p class="MsoNormal">[then]Greet Employee=System.out.println(&quot;Hello&quot;);</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I have also created the corresponding model with a field named “state”.</p>
<p class="MsoNormal">When I try to create business rule for the same and when I validate the rule I get the following error:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b><i><span style="font-size:12.0pt;color:#444444">Unable to create Field Extractor for &#39;statename&#39; of &#39;[ClassObjectType class=dslDemoPackage.employee]&#39; in rule &#39;testdsl&#39;</span></i></b></p>

<p class="MsoNormal"><b><i><span style="font-size:12.0pt;color:#444444"> </span></i></b></p>
<p class="MsoNormal"><span style="color:#444444">Let me know how I can resolve.</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;font-family:&quot;Brush Script MT&quot;;color:black">Best Regards,</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;font-family:&quot;Brush Script MT&quot;;color:black">Kripa
</span></p>
<p class="MsoNormal"> </p>
</div>
<br>
<hr>
<font face="Arial" color="Black" size="3">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.<br>
</font>
<br>
______________________________________________________________________<br>
</div>

<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br></div>