Using Template Engine > Template Engine Process > Accessing a template

Accessing a template
A Template Engine Process can access a template in three different ways:
Using a template resource (From Design Center resource set option).
Using From Design Center resource set option
If you have created the template as a resource, you select From Design Center resource set and browse to and select the appropriate template resource.
The template is read once by Template Engine when you start the StreamServer application. If you want to modify the template, you must edit the template, export the Design Center Project, deploy and restart the StreamServer application.
Using From URI option
If the template is stored on a file system, web server or in a Content Management System (CMS), you select From URI and specify the URI to the template.
The template is read once by Template Engine when you start the StreamServer application. If you want to modify the template, you must edit the template and restart the StreamServer application.
Using Variable option
You can use a dynamic reference to one or more templates stored on a file system, web server or in a CMS. Select Variable and enter a variable that evaluates to the URI to the template.
The template is read by Template Engine during runtime. If you want to modify a template, you only have to edit the template and do not need to restart the StreamServer application.
Example 1
$template="C:\templates\invoice.txt";
 
Example 2
switch ($countryCode)
{
    case "USA":
        $template = "C:\templates\invoiceUSA.txt";
    break;
    case "Canada":
        $template = "C:\templates\invoiceCanada.txt";
    break;
    case "UK":
        $template = "C:\templates\invoiceUK.txt";
    break;
    default:
        $template = "C:\templates\invoiceUK.txt"
}
 
OpenText StreamServe 5.6.2 Updated: 2018-01-26