automation
This object (of the type: Automation) encapsulates the properties of the OL Connect Workflow process that triggered the current operation.
Note: This object is only available in a Web context.
The automation object available in DataMapper scripts is not of the same type. It has different properties.
Properties
The following table lists the properties of the Automation object.
| Property | Description |
|---|---|
| jobInfos | Returns an object containing JobInfo 1 to 9 values from OL Connect Workflow (see Job Info variables in the Workflow Online Help). |
| Properties | Returns an object containing additional information (file name, process name and task ID) from OL Connect Workflow. |
Accessing automation properties
To access Job Info 1 to 9 (defined in Workflow; see Job Info variables in the Workflow Online Help):
automation.jobInfos.JobInfo1;
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 (see Set Job Infos and Variables in the Workflow Online Help) . Define a Job Info variable (see Job Info variables), 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, in a Web section, you can use the automation object to retrieve the value in a script, like this:
var my_var = automation.jobInfos.JobInfo9;