On 21 September 2011 11:01, Michael Anstis <michael.anstis(a)gmail.com> wrote:
This JIRA basically says it's a bug that Templates cannot be
expanded
unless a value is given for each template-key.
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).
You can expand templates programmatically with any value as an actual macro
parameter.
To solve the spreadsheet dilemma you could think up several hacks, similar
to the one that was reported as implemented for
https://issues.jboss.org/browse/JBRULES-2409 only yesterday, e.g., another
spreadsheet setting
EmptyString <text>
defining <text> as a stand-in for the nothingness of the empty string.
-W
E.G. Smurf( name == "@{smurfName}", colour=="@{smurfColour}" )
won't be
included in the generated DRL unless a value for "smurfName" and
"smurfColour" is given.
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"?
Obviously, in my example, Smurfs are always blue ;)
Cheers,
Mike
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev