AFAIK compound DSL is not supported; however longer term we are looking to move to a more sophisticated approach using templates that&#39;ll allow compound construction.<br><br><br><div class="gmail_quote">On 17 December 2010 15:55, Chris Selwyn <span dir="ltr">&lt;<a href="mailto:chris@selwyn-family.me.uk">chris@selwyn-family.me.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I tried creating a DSL something like the following:-<br>
<br>
[when] there is a QQ with attr equal to {YYY} = there is a Q - with attr<br>
equal to {YYY}<br>
[when]there is a Q = Question()<br>
[when] - with attr equal to {YYY} = attr == &quot;{YYY}&quot;<br>
<br>
but I find that the expansion does not seem to work right.<br>
<br>
When I use this like<br>
<br>
when<br>
   there is a QQ with attr equal to abc<br>
then<br>
   ...<br>
<br>
What this expands to is<br>
<br>
Question() attr == &quot;abc&quot;<br>
<br>
I was hoping that the condition would be put inside the pattern.<br>
<br>
Is it not possible to make &quot;compound&quot; DSL statements that use inline &quot;-&quot;<br>
clauses?<br>
<font color="#888888"><br>
Chris Selwyn<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>
</font></blockquote></div><br>