[rules-users] DSL: concatenating DSLs using "and" and "or"

Chong Minsk Goh cmgoh1979 at gmail.com
Mon Dec 15 03:10:57 EST 2008


Hi,

We are currently using Drools to enable conditional routing for our
application. We are using DSLs to make it more user friendly.

Using Eclipse DSL editor, I noticed that there is an error (Duplicate
Declaration of variable) if I use "and" to concatenate 2 DSL statements
using the same variable name but this error does not appear if I use "or"

For example,

DSL Statement
[when]there is an "{id}"=$node: Node(nodeId=="{id}")

Using "and"
(there is an "{id}") and (there is an "{id}")

Using "or"
(there is an "{id}") or (there is an "{id}")

With the brackets, each DSL statement should be isolated right? But it is
kinda tricky as if we need to use 2 or more DSL statements together using
the same variable name.

Also, is there any means to create unique variables for use in DSL,
especially when joining for 2 or more DSL statements is required.


Best regards
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081215/c39ed168/attachment.html 


More information about the rules-users mailing list