&nbsp;<br>&nbsp;&nbsp;&nbsp; Brian, the order of the mappings is important, because DSL is a &quot;text match&quot; engine. So, always write your DSL Mapping file having the most restrictive mappings first.<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br>
<br><div><span class="gmail_quote">2007/9/17, Brian Enderle &lt;<a href="mailto:brianke@gmail.com">brianke@gmail.com</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;">
I have the following DSL entries:<br><br>County is invalid for State<br>[condition][]County is invalid for State=eval(StringUtils.isNotBlank<br>($i.getCntyCd())) and eval(!$i.getCntyCd().substring(0,2).equals($i.getStateCd
<br>()))<br><br>POB County is invalid for State<br>[condition][]POB County is invalid for State=eval(StringUtils.isNotBlank<br>($i.getPobCntyCd())) and eval(!$i.getPobCntyCd().substring(0,2).equals<br>($i.getPobStateCd()))
<br><br>The rule in which I am using the DSL entry is as follows:<br>rule &quot;LevelOne: Place Of Birth, County is invalid&quot;<br>&nbsp;&nbsp; agenda-group &quot;LevelOne&quot;<br>&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;There is a NwCitizenship<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - pobCntryCd equals 
MessageConstants.COUNTRY_CODE_US<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;POB County is invalid for State<br>&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Report error&gt;<br>end<br><br><br>When I atempt to use the POB County... rule I get the following error:<br><br>org.springframework.beans.factory.BeanCreationException
: Error creating bean<br>with name &#39;ruleBase&#39; defined in class path resource [spring-beans.xml]:<br>Invocation of init method failed; nested exception is<br>org.drools.rule.InvalidRulePackage: [143,33]: unknown:143:33 Unexpected
<br>token &#39;$i&#39;[143,47]: unknown:143:47 mismatched token:<br>[@987,4726:4726=&#39;)&#39;,&lt;12&gt;,143:47]; expecting type THEN<br>Caused by: org.drools.rule.InvalidRulePackage: [143,33]: unknown:143:33<br>Unexpected token &#39;$i&#39;[143,47]: unknown:143:47 mismatched token:
<br>[@987,4726:4726=&#39;)&#39;,&lt;12&gt;,143:47]; expecting type THEN<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.drools.rule.Package.checkValidity(Package.java:420)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.drools.common.AbstractRuleBase.addPackage<br>(AbstractRuleBase.java
:292)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.sample.RuleBaseBeanFactory.afterPropertiesSet<br>etc...<br><br>However, if I change &quot;POB County&quot; to &quot;POBCounty&quot; (no space, only change the<br>DSL call leaving the actual code the same) everything works.&nbsp;&nbsp;Can someone
<br>explain why the two rules cannot coexist with the space in &quot;POB County&quot;?<br><br>Thanks,<br>Brian Enderle<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>