You could write a DSLR as<br> Set the rate of interest to @{tempvar}<br>and it should expand into<br> $loan.setRateOfInterest( @{tempvar} )<br><br>And I think that the DSL expander would ignore the template header, parameter definition and the start and end template lines.<br>
<br>But I'd hate to debug this rule concoction process. <br><br>If you use templates, consider the template as a very-high-level DSL statement, and forget about the DSL expansion.<br><br>IMHO, it's a myth that DSLs enable non-programmers to write anything but trivial (or very simple) rules. <br>
<br>Thanks for the explanation!<br>Wolfgang<br><br><br><br><div class="gmail_quote">2012/1/5 Michael Anstis <span dir="ltr"><<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Wolfgang,<br><br>I suspect the need arose from within Guvnor.<br><br>You can define a DSL sentence such "[then]Set the rate of interest to {rex} = $loan.setRateOfInterest( {rex} )<br><br>Currently in Guvnor you can only enter literal values for DSL variables whereas it'd be good to be able to specify {rex} as a template key so multiple rules, based on DSLs, can be generated from the template data. I am unsure if drools-expert Templates support interpolation of DSLs.<br>
<br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 5 January 2012 13:10, srinivasasanda <span dir="ltr"><<a href="mailto:srinivasasanda@gmail.com" target="_blank">srinivasasanda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Thank you Manstis for quick response.<br>
<br>
Regards,<br>
Srinivas<span class="HOEnZb"><font color="#888888"><br>
<span><font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Template-Key-in-DSL-tp3634710p3634749.html" target="_blank">http://drools.46999.n3.nabble.com/Template-Key-in-DSL-tp3634710p3634749.html</a><br>
</font></span><div><div>Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
</div></div></font></span></blockquote></div><br>
<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>