A Template can be created from scratch using the Template builder. A Template can also be created from an existing Chain. Once a Chain is created and tested, it is easy to convert the configured Chain to a Template.
Creating a Template from a Chain is generally preferred as the configuration of a Chain and thereby resulting Template can be tested by simply executing the Chain. Once the Chain is producing the expected results, the Template can be created using the below steps. In contrast, when a Template is created from the Template builder interface, then a Chain needs to be created from a Template in order to test the configuration of the Template which is less efficient.
Step 1: Initialize the Chain to Template Wizard
To begin the process to convert a Chain to a Template, the Chain must be accessed in edit mode in the Chain Builder palette.
Click the vertical ellipse in the Chain header
Select the Create Template option.
The Chain to Template wizard will open.
Step 2: Define the Template Settings
The Chain to Template wizard enables the following information to be specified for the Template to be created:
Name: The name of the Template initially defaults to Chain Name - Template. This can be changed as desired.
Description: Optional; provide a summary of the intended use of the Template.
Folder: The Template folder in which the Template should be created. This initially defaults to the Default Folder but can be modified as needed.
Step 3: Define Template Variables (Optional)
Defining Template Variables is required when the Chain from which the Template was created utilizes a Workspace Variable, File Resource, Chain Variable, or a Dynamic Chain Variable. The Chain to Template wizard automatically detects any of these objects and generates a Template Variable for each unique item used within the Chain configuration.
While not required, it is recommended to rename each Template Variable generated by the wizard to align with Template Variable naming best practices. The Template Variable Value field is also populated by the Chain to Template wizard and it is recommended to remove the value to ensure maximum portability of the Template across various deployments.
Finally, be sure to specify the Variable Type as Dynamic or Resource when applicable. Click Save and the Template is created. Click the Publish button to finalize the Template.