Evaluate template¤
Evaluates a template. Input values can be addressed using the variables ‘input1’, ‘input2’, etc. Global variables are available in the ‘global’ scope, e.g., ‘global.myVar’.
Examples¤
Notation: List of values are represented via square brackets. Example: [first, second] represents a list of two values “first” and “second”.
Substitutes each input variable by its value:
-
Parameters
- template:
-
Input values:
[John][Doe]
-
Returns:
Concatenates all values of a multi-valued input:
-
Parameters
- template:
Hello {{input1}}
- template:
-
Input values:
[A, B]
-
Returns:
[Hello AB]
Supports iterating over the values of a multi-valued input:
-
Parameters
- template:
Hello {% for value in input1 %}{{value}}, {% endfor %}how are you doing?
- template:
-
Input values:
[Bob, Eve]
-
Returns:
[Hello Bob, Eve, how are you doing?]
Supports method calls on input values:
-
Parameters
- template:
{{ input1.trim() }}
- template:
-
Input values:
[ John ]
-
Returns:
[John]
Rejects unscoped variables that are no input variables:
-
Parameters
- template:
Hello {{badVariable}} {{input1}}
- template:
-
Input values:
[John]
-
Returns:
[] - Throws error:
ValidationException
Rejects wrongly numbered input variables, the numbering starts at input1 without leading zeros:
-
Parameters
- template:
Hello {{input01}}
- template:
-
Returns:
[] - Throws error:
ValidationException
Rejects scoped variables from unknown scopes, e.g. misspelled scope names:
-
Parameters
- template:
Hello {{projekt.myVar}}
- template:
-
Returns:
[] - Throws error:
ValidationException
Fails at execution time if a referenced input is not connected:
-
Parameters
- template:
Hello {{input1}}
- template:
-
Returns:
[] - Throws error:
UnboundVariablesException
Parameter¤
Template¤
The template, using Jinja syntax.
- ID:
template - Datatype:
template - Default Value:
None
Language¤
The template language. Currently, Jinja is supported.
- ID:
language - Datatype:
string - Default Value:
jinja
Advanced Parameter¤
None