The Resource filter stores output as resources in the runtime repository. The stored resources can be accessed from, for example, Template Engine, SMTP (MIME) connector and MIMEAddPart script function.For example, a StoryTeller document can be stored as a resource via a Resource filter, and this resource can then be wrapped into the output from a Template Engine Process.
The name of the resource. This name, or the GUID of the resource, can later be used to access the resource. Yes – Use Duration and Time unit below to specify for how long to store the resource in the runtime repository.No – Do not set an expiry time for the resource. You can use a Resource output connector (see Resource output connector in the Connectors documentation) or a Resource filter to store output as resources in the runtime repository. For example, you can use the connector if you only want to store the output as resources, and use the filter if you want to deliver output via a standard output connector and driver (e.g. a File connector and PDF driver) and at the same time store the output as resources.A resource stored in the runtime repository can be accessed by referencing the GUID or name of the resource. The following types of URIs can be used to access a resource:
•
•
•
•
•
• For example, Template Engine can use the #include directive to include the resource in the output:#include('resource://name=my_text')This example includes a Message with a StoryTeller Process and a Template Engine Process, where the StoryTeller Process is run before the Template Engine Process.The StoryTeller Process is connected to a Null output connector with a Resource filter and a PDF driver. In the Resource filter, Content type is set to application/pdf and Resource name is set dynamically by the variable $resource.The variable $resource is a unique name set by a script run before the StoryTeller Process:CreateGlobalSerNo("resourcenumbers", 1, 1, -1);$resource = "res_" + str(GetGlobalSerNo("resourcenumbers"));The Template Engine Process is connected to a File output connector. In the Template Engine Process, a reference is made to the resource generated by the StoryTeller Process. The reference is an #include directive using the resource protocol and the variable set by Resource name to reference the resource:#include("resource://name=$variables.resource?outputEnc=base64")When the StreamServer application is run, the StoryTeller PDF is stored as a resource in the runtime repository, and then wrapped base64 encoded into the output from the Template Engine Process.
| OpenText StreamServe 5.6.2 | Updated: 2018-01-26 |