hmm.. there is a problem with the action of the 2nd rule, so, converting it to vanilla DRL:<br><br>rule &quot;SpeCodeSpeValProdPlan12&quot;<br>salience 50<br><br>&nbsp;when<br>&nbsp; ...<br>&nbsp;then<br>&nbsp; if(common.getProd() == &quot;{prodCode1}&quot; || 
common.getPlan() ==<br>&quot;{planCode1}&quot;){System.out.println(&quot;Error&quot;);}<br>end<br><br>That doesn&#39;t look quite right - you are doing == on strings - .equals would be better). I would try that rule on its own, without a DSL - to see what is causing it. Also - why are you doing the if on the RHS? I would get rid of that if at all possible to save confusion later.
<br><br><div><span class="gmail_quote">On 6/30/07, <b class="gmail_sendername">McShiv</b> &lt;<a href="mailto:rajesh_sachin10@yahoo.co.in">rajesh_sachin10@yahoo.co.in</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>DRL Syntax<br>package com.policy;<br>expander SpeCodeSpeValProdPlan.dsl;<br>#list any import classes here.<br>import com.viking.common.transferbeans.CommonInformation;<br>import com.sentry.common.entitybeans.EntityBean
;<br>import com.sentry.common.entitybeans.Selected;<br>import java.util.ArrayList;<br>import java.util.List;<br>#declare any global variables here<br><br>rule &quot;SpeCodeSpeValProdPlan11&quot;<br>salience 100<br><br> when
<br>&nbsp;&nbsp;The EntityBean Contains Selected List<br> then<br>&nbsp;&nbsp;Assert All The Selected<br>end<br><br>rule &quot;SpeCodeSpeValProdPlan12&quot;<br>salience 50<br><br> when<br>&nbsp;&nbsp;The Question Code Is &quot;License&quot; And The Selected Value is &quot;Y&quot;
<br> then<br>&nbsp;&nbsp;Remove The Product &quot;09&quot; And Plan &quot;CD&quot;<br>end<br><br>DSL Syntax:<br><br>[when] The EntityBean Contains Selected List = entity : EntityBean();<br>eval(entity.getSelected() != null);<br>[then] Assert All The Selected = Object[] quoSelList = 
entity.getSelected();<br>for(int i = 0; i &lt; quoSelList.length; i++){ Selected queSel =<br>(Selected)quoSelList[i]; assert(queSel); System.out.println(queSel); }<br><br>[when] The Question Code Is &quot;{speCode1}&quot; And The Selected Value is
<br>&quot;{speValue1}&quot; = common : CommonInformation(); Selected(stateSpecificCode ==<br>&quot;{speCode1}&quot;, stateSpecificValue == &quot;{speValue1}&quot;);<br>[then] Remove The Product &quot;{prodCode1}&quot; And Plan &quot;{planCode1}&quot; =
<br>if(common.getProd() == &quot;{prodCode1}&quot; || common.getPlan() ==<br>&quot;{planCode1}&quot;){System.out.println(&quot;Error&quot;);}<br><br><br>The Selected Class is an Object Array inside EntityBean Class.<br>CommonInformation is a seperate class. CommonInformation &amp; EntityBean will
<br>be available in Working Memory(asserted earlier in java class).<br><br> I need to remove the Selected Classes in the Object array and assert into<br>the working memory. Thats what I am doing in the First Rule.<br><br>
In the Second rule I check for some condition and print the error according<br>to the condition.<br>Thanks,<br>McShiv<br><br>Fernando Meyer Camargo wrote:<br>&gt;<br>&gt; howdy,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is your package name right? please paste your rule code.
<br>&gt;<br>&gt; Fernando Meyer<br>&gt; <a href="mailto:fmcamargo@gmail.com">fmcamargo@gmail.com</a><br>&gt; GPG: 5A6D 3374 B055 A513 9A02&nbsp;&nbsp;A03B 3DB3 7485 D804 DDFB<br>&gt;<br>&gt;<br>&gt; On Jun 29, 2007, at 10:16 PM, McShiv wrote:
<br>&gt;<br>&gt;&gt;<br>&gt;&gt; com.package.FatalSystemException<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.drools.rule.Package.checkValidity(Unknown Source)<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.drools.reteoo.RuleBaseImpl.addPackage(Unknown Source)<br>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at<br>&gt;&gt; com.sentry.underwriting.ruleexecutor.DroolsExecutor.executeRules<br>&gt;&gt; (DroolsExecutor.java)<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at<br>&gt;&gt; com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.callRules
<br>&gt;&gt; Executor(RulesExecutionProcessor.java:82)<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at<br>&gt;&gt; com.sentry.underwriting.ruleexecutor.RulesExecutionProcessor.rulesExec<br>&gt;&gt; utionprocess(RulesExecutionProcessor.java:65)<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
<br>&gt;&gt; com.sentry.underwriting.ruleprocessor.RulesProcessor.processRules<br>&gt;&gt; (RulesProcessor.java)<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at<br>&gt;&gt; com.sentry.underwriting.test.UnderwritingDemo.main<br>&gt;&gt; (UnderwritingDemo.java
:21)<br>&gt;&gt; Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation<br>&gt;&gt; error File<br>&gt;&gt; com/policy/Rule_SpeCodeSpeValProdPlan12_0.java, Line 12, Column 176:<br>&gt;&gt; Unexpected token &quot;.&quot; in primary
<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 7 more<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; I am using Drools 3.0.6 version.<br>&gt;&gt;<br>&gt;&gt; I got the above message when the drl files are added to the<br>&gt;&gt; RuleBase class.
<br>&gt;&gt;<br>&gt;&gt; I debugged the code. The error was thrown when<br>&gt;&gt; ruleBase.addPackage(packageBuilder.getPackage()); line was called<br>&gt;&gt; in the<br>&gt;&gt; DroolsExecutor class.<br>&gt;&gt;<br>&gt;&gt; Can anyone please suggest me any sollution for this problem.
<br>&gt;&gt;<br>&gt;&gt; Thanks in addvance.<br>&gt;&gt;<br>&gt;&gt; Thanks,<br>&gt;&gt; McShiv.<br>&gt;&gt; --<br>&gt;&gt; View this message in context: <a href="http://www.nabble.com/Unexpected-">http://www.nabble.com/Unexpected-
</a><br>&gt;&gt; token-%22.%22-in-primary---Rule-Compilation-Error-<br>&gt;&gt; tf4002948.html#a11369488<br>&gt;&gt; Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>&gt;&gt;
<br>&gt;&gt; _______________________________________________<br>&gt;&gt; rules-users mailing list<br>&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;<br><br>--<br>View this message in context: <a href="http://www.nabble.com/Unexpected-token-%22.%22-in-primary---Rule-Compilation-Error-tf4002948.html#a11369670">
http://www.nabble.com/Unexpected-token-%22.%22-in-primary---Rule-Compilation-Error-tf4002948.html#a11369670</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>