On 21 September 2011 11:01, Michael Anstis <span dir="ltr"><<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This JIRA basically says it's a bug that Templates cannot be expanded unless a value is given for each template-key.<br></blockquote><div><br>I don't think it says that. The JIRA is due to the impossibility of distinguishing between nothing and an empty string in a spreadsheet cell (unless it were written with delimiting quotes, which it isn't).<br>
<br>You can expand templates programmatically with any value as an actual macro parameter.<br><br>To solve the spreadsheet dilemma you could think up several hacks, similar to the one that was reported as implemented for <a href="https://issues.jboss.org/browse/JBRULES-2409" target="_blank">https://issues.jboss.org/browse/JBRULES-2409</a> only yesterday, e.g., another spreadsheet setting<br>
<br> EmptyString <text><br><br>defining <text> as a stand-in for the nothingness of the empty string.<br><br>-W<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>E.G. Smurf( name == "@{smurfName}", colour=="@{smurfColour}" ) won't be included in the generated DRL unless a value for "smurfName" and "smurfColour" is given.<br>
<br>IMO, I'd agree - it's a painful limitation, however thought I'd ask if anybody knows of any history as to why it might have been implemented this way before I stamp over what might be considered as "correct behavior"?<br>
<br>Obviously, in my example, Smurfs are always blue ;)<br><br>Cheers,<br><br>Mike<br>
<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>