Last updated
Was this helpful?
Last updated
Was this helpful?
Template Transformer generates XML, HTML, text, and other data from a specified template. The component can receive data to dynamically fill the template from a JSON received in its input message. Find out more about .
Take a look at the configuration parameters of the trigger. Parameters supported by are marked with (DB)
.
To understand better how to use the Template Transformer,
body: transformed template
_error: description of the error that occurred in the deployment
_body: if the option Preserve Original is enabled, the property will be shown in the output containing the input JSON
This component accepts a JSON object in its input, using a language called Freemarker to make the transformations and generate the template. It will search the JSON to be used inside the Model Path configuration property.
The structure will be equivalent to the one in the input, but with another model and another template representation as a string. In case of error, the "error"
property will be created at the same level as the original property.
The JSON dotted notation will look for the root element that is being processed by the pipeline and cross it according to the specifications given in the Model Path property.
In a Model Path representation containing a.b.c.d, "a" will be searched in the root element. Afterwards, it will be "b", then "c" and finally "d". If an array is found during the cross, then the algorithm will generate a cross path for each element of the array. The algorithm replaces all the occurrences of the defined path in Model Path.
_body: if the option Preserve Original is enabled, the property will be shown in the output containing the input JSON
We use Freemarker to make our conversions and transformations in the template inside this component.
Template Transformer generates XML, HTML, text and other data from a template. The Documentation Portal provides configuration parameters of this component.
Model Path
Path in which the input JSON finds the models to be used in the template (dotted notation).
body
String
Preserve Original
If activated, the option preserves the original fields received in the component input.
True
Boolean
Body
The template (string) to be replaced and transformed during the execution time with the received data, via JSON, configured in the Model Path property.
N/A
String