[rules-users] Error writing DSL
Edson Tirelli
tirelli at post.com
Thu Sep 13 13:24:33 EDT 2007
I recommend you take a look at the manual, and help us improve if it is
not clear there. To add constraints to the previous pattern, you must use
"-" in the beginning of the mapping.
[]s
Edson
2007/9/13, kissro at lidp.com <kissro at lidp.com>:
>
> In eclipse, I have this coded in a .dsl
>
> There is a Policy p:Policy()
> for a male sex = "m"
> with a premium less than {premium} premium < {premium}
> Accept policy p.setStatus(32)
>
> My .dslr rule file contains this
>
> rule "Low Premium"
> when
> There is a Policy
> for a male
> with a premium less than 50.00
> then
> Accept policy
> end
>
>
> The .drl view shows this
>
> rule "Low Premium"
> when
> p : Policy()
> sex = "m"
> premium < 50.00
> then
> p.setStatus(32);
> end
>
>
> I'm getting the error - Unexpected token 'sex'. I tried removing the
> 'for a male' part leaving 'with a premium less than 50.00' but then
> I get 'Unexpected token 'premium''. How do I code the .dsl and/or .dslr
> files to get the expected results.
>
> Thanks,
>
> Rod
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070913/2a2e2f73/attachment.html
More information about the rules-users
mailing list