The order of the DSL entries matter.<br>You should interchange the first and second lines in the DSL that you have provided.<br><br clear="all">Regards,<br>Prem<br>
<br><br><div class="gmail_quote">2009/7/21 Luis Silva <span dir="ltr">&lt;<a href="mailto:lesilvav@gmail.com">lesilvav@gmail.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;">

Hi everebody, I&#39;ve a quiestion about DSL:<br><br>I have the next DSL:<br><br><span style="font-family: courier new,monospace;">[when][]Get month = $month: Month();</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">[when][]Get month summer = $month: Month(id in (6,7,8,9));</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">[then][]Print months = System.out.println(&quot;Month: &quot; + $month.getId());</span><br>


<span style="font-family: courier new,monospace;"></span><br>And the next Rule:<br><br><span style="font-family: courier new,monospace;">rule dsl2drl_1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">when</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   Get month summer</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">then</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   Print months;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">end</span><br><br>When the ksession fires we get the error: DSLR: [10,20]: [ERR 101] Line 10:20 no viable alternative at input &#39;summer&#39; in rule dsl2drl_1<br>


<br>But It works ok if I change the first DSL from :<br><ul><li><span style="font-family: courier new,monospace;">Get month = $month: Month();</span></li></ul><span style="font-family: courier new,monospace;">to (&#39;s&#39; is added in &#39;month&#39; word) :<br>


</span><ul><li><span style="font-family: courier new,monospace;">Get months = $month: Month();</span></li></ul><br>What could be the problem? I use Drools 5.0.0.CR1 and jdk1.5.0_16<br><br>I attached a small project for test.<br>


<br>Thanks<br><font color="#888888"><br><br><br><br style="font-family: courier new,monospace;">-- <br>Luis Enrique Silva Valdivieso<br>Cel. 00 51 1 991546707<br>Casa 00 51 1 4476616<br>
</font><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>