1.6

Table Of Contents
To access ProcessName, OriginalFilename or TaskIndex (defined in Workflow):
automation.properties.OriginalFilename;
Example
Assume that a Workflow process can be triggered when an XML file appears in a certain folder.
The XML file contains data that you want to show on a web page.
Add a Set Job Infos and Variables Task to the Workflow process. Define a Job Info (see Set
Job Infos), say, %9, and fill it with data from the XML, for example:
xmlget('/request[1]/values[1]/first[1]',Value,KeepCase,NoTrim)
In Connect Designer, you can use the automation object to retrieve the value in a script, like
this:
var my_var = automation.jobInfos.JobInfo9;
before()
Insert content before each element in the set of HTML elements that match the selector of the
script or of another query in the template (see "query()" on page785). See also: "after()" on
page746.
before(content)
Before(content) inserts content before each element in the set of elements that match the
script's selector. Before() creates a new result set.
content
String, HTML string or result set to insert after the elements. In case a plain text string is
provided, it is automatically wrapped in a <span> element to avoid orphan text nodes to
appear in the <body> element.
Examples
This script looks for an element with the ID salesrepand inserts a paragraph before that
element.
results.before("<p>Lorem Ipsum</p>");
Page 754