Can't pass variable text into a template for use in a Planning expression
Summary:
I have a groovy rule that executes a calc that references a Template. Here is a snippet:
String ApproverMsg = '"' + "This is a Test" + '"' Calc =""" %Template(name:="promotion",application:="testapp",plantype:="testdb", dtps:=( "ApproveMsg":=[[$ApproverMsg]] )) """;
In the Template referenced, I use a design time prompt (of type string passed in from the rule above) in a Planning expression like so:
"Approver" = [[PlanningFunctions.getIdForString([ApproveMsg])]];
Unfortunately it throws an error on execution. If however I hardcode the DTP in the Template call instead of using a variable it works fine:
Calc =""" %Template(name:="prmotion",application:="testapp",plantype:="testdb", dtps:=( "ApproveMsg":=[["This is a Test"]] )) """;
Tagged:
0