<br>&nbsp;&nbsp; Best way to investigate this is to expand your DSL to the DRL to check how the expansion is working.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DrlParser parser = new DrlParser();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String expanded = parser.getExpandedDRL( drlSourceString, dslReader );
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp; Check what is wrong in the expanded DRL. I see your map has an error:<br><br>$stud : Student(name == &quot;{studName}&quot;)<br><br>&nbsp;&nbsp; The comparison must be made with &#39;==&#39; as above instead of &#39;=&#39; as in your template. But I don&#39;t know if that is the only problem.
<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/7/12, McShiv &lt;<a href="mailto:rajesh_sachin10@yahoo.co.in">rajesh_sachin10@yahoo.co.in</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi All,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;I used the following code in the dsl file.<br><br>DSL:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;[when] Check whether the name is present as &quot;{studName}&quot; = $stud :<br>Student(name = &quot;{studName}&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;[then] Set the Error Code {errorCode} = String string = $stud.getName();
<br>Error(errorCode, string);<br><br>DRL:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;package com.policy;<br>&nbsp;&nbsp;&nbsp;&nbsp;expander StudendProgram.dsl;<br>&nbsp;&nbsp;&nbsp;&nbsp;import java.util.Iterator;<br>&nbsp;&nbsp;&nbsp;&nbsp;import com.class.Student;<br>&nbsp;&nbsp;&nbsp;&nbsp;import com.class.Error;<br><br>&nbsp;&nbsp; rule &quot;StudendProgram_1&quot;
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check whether the name is present as &quot;Stephen&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the Error Code 88<br>&nbsp;&nbsp;&nbsp;&nbsp;end<br><br><br>When I try to run this program I got the following error.
<br><br>&nbsp;&nbsp; Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation error<br>File com/policy/Rule_SpeCodeSpeValProdPlan12_0.java, Line 12, Column 176:<br>Unexpected token &quot;.&quot; in primary<br><br>When I remove the Line &quot;$stud.getName();&quot; in the then part and set the error
<br>code alone its working fine. The &quot;.&quot; inbetween $stud and getName() may be<br>the problem. But I don&#39;t know the solution for this.<br><br>Any suggessions on this.<br><br>Thanks,<br>McShiv....<br>--<br>View this message in context: 
<a href="http://www.nabble.com/Compilation-Error-in-Drools-tf4071029.html#a11569413">http://www.nabble.com/Compilation-Error-in-Drools-tf4071029.html#a11569413</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">
Nabble.com</a>.<br><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">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>