The order of the DSL entries matter.
You should interchange the first and second lines in the DSL that you have
provided.

Regards,
Prem


2009/7/21 Luis Silva <[email protected]>

> Hi everebody, I've a quiestion about DSL:
>
> I have the next DSL:
>
> [when][]Get month = $month: Month();
> [when][]Get month summer = $month: Month(id in (6,7,8,9));
> [then][]Print months = System.out.println("Month: " + $month.getId());
>
> And the next Rule:
>
> rule dsl2drl_1
> when
>    Get month summer
> then
>    Print months;
> end
>
> When the ksession fires we get the error: DSLR: [10,20]: [ERR 101] Line
> 10:20 no viable alternative at input 'summer' in rule dsl2drl_1
>
> But It works ok if I change the first DSL from :
>
>    - Get month = $month: Month();
>
> to ('s' is added in 'month' word) :
>
>    - Get months = $month: Month();
>
>
> What could be the problem? I use Drools 5.0.0.CR1 and jdk1.5.0_16
>
> I attached a small project for test.
>
> Thanks
>
>
>
>
> --
> Luis Enrique Silva Valdivieso
> Cel. 00 51 1 991546707
> Casa 00 51 1 4476616
>
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to