The field of class employee must be <br>    String statename;<br>with matching getter and setter ( String getStatename(); void setStatename( String value ); )<br><br>The identifier &quot;state&quot; is just for the DSL translator, to transfer the string XXX from<br>
&quot;... a particular state XXX&quot; into the String literal of the field constraint.<br><br>-W<br><br><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="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div link="blue" vlink="purple" lang="EN-US">
<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: 12pt; color: rgb(68, 68, 68);">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: 12pt; color: rgb(68, 68, 68);"> </span></i></b></p>
<p class="MsoNormal"><span style="color: rgb(68, 68, 68);">Let me know how I can resolve.</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style=""><span style="font-size: 14pt; font-family: &quot;Brush Script MT&quot;; color: black;">Best Regards,</span></p>
<p class="MsoNormal" style=""><span style="font-size: 14pt; font-family: &quot;Brush Script MT&quot;; color: black;">Kripa
</span></p>
<p class="MsoNormal"> </p>
</div>
<br>
<hr>
<font size="3" color="Black" face="Arial">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>