automation

This is a ScriptableAutomation object that encapsulates the properties of the PlanetPress Workflow process that triggered the current operation.

In the Designer, currently this object is only available in a Web context.

Properties

The following table lists the properties of the Automation object.

Property Type Description
JobInfo ScriptableAutomationProperty Returns a ScriptableAutomation object containing JobInfo 1 to 9 values from PlanetPress Workflow
Properties ScriptableAutomationProperty Returns a ScriptableAutomation object containing additional information (file name, process name and task ID) from PlanetPress Workflow

Accessing automation properties

To access JobInfo 1 to 9 (defined in Workflow):

automation.jobInfo.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. 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;
 
  • Last Topic Update: 24/01/2017 09:32
  • Last Published: 7/6/2017 : 9:49 AM