Template Replace

For help on the aspects of configuration shared by all components, see General Configuration of Components.

The Template Replace component allows you to add dynamically generated values to an output file based on a template file. The template file and the output file are identical in structure, except that the template file refers to attributes by their attribute name. These attribute references are replaced by the attribute values in the output file.

For example, you might have an attribute myWidth whose value you want to include in the output file. The template file might look like this:

If the myWidth attribute had a value of ‘100’ when the workflow is run, the output file would look like this:

To configure the Template Replace component, provide the following information:

  • Template File — The location of the template file. The template file will include the structure of the output file and reference any attributes.

  • Output File — The location of the output file to be created. If configured correctly, any references to attributes from the workflow will be substituted with attribute values.

  • Path Attribute — The name of the attribute with which the output file is associated.

The following workflow is an example of how the Template Replace component can be used. The Data Editor component is used to feed the workflow attributes. The Template Replace component is used to dynamically write the attribute values to an output file. This action is based on a template file that is provided via the Template Replace component. The Text Editor is then added to automatically open the output text file.