To tokenize scripts with chain variables, such as for flexible and dynamic scripts used with various command line interfaces (CLIs) like Windows® batch, Linux® shell, Essbase® MaxL, and Anaplan® Connect, add a step with a Handlebars connection command.
To enable these commands, an IT admin first creates a Handlebars connector.
Note: To specify a variable that should be replaced, templates use the syntax {{VARIABLE_NAME}}
.
Render file template
To render a file template with its variables replaced with the values specified, use a Render file template command. For this command, the template is passed as a file and outputs a file containing the resulting text.
Note: This command is used to create large (>32k characters) outputs. It produces a physical file that can be used by subsequent chain commands that require file input. One option to store a file template in Workiva is file resources.
Properties
Property |
Detail |
Template |
Enter the file template to render. |
Variables |
Enter the variables to use for the template. |
JSON variables |
Enter the JSON variables to use in the template, including expressions such as #each . |
Outputs
Output |
Output Type |
Rendered file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
There was an error rendering the template |
Render text template
To render a text template with its variables replaced with the values specified, use a Render text template command. For this command, the template is passed in as a text string and outputs the results as another text string.
Note: This command is used to create small to medium outputs. It generates a text-based output which cannot be used in subsequent commands that require a physical file.
Properties
Property |
Detail |
Template |
Enter the file template to render. |
Variables |
Enter the variables to use for the template. |
JSON variables |
Enter the JSON variables to use in the template, including expressions such as #each . |
Outputs
Output |
Output Type |
Rendered file |
File |
Exit codes
Code |
Type |
Detail |
0 |
Success |
Success |
1 |
Error |
There was an error rendering the template |
Additional resources