2022.2

Table Of Contents
Variable Name
Description
Example Usage (VBScript)
"Watch.ExpandResourcePath"
on page132
Expands a Connect resource file name (e.g. invoice.OL-template) to its fully qualified path (e.g. C:\Pro-
gramData\Objectif Lune\PlanetPress Workflow\Documents\invoice.OL-template).
var fullPath = Watch.ExpandResourcePath("invoice.OL-template");
"Watch.ExpandString" on
page133
Retrieves the content of any Workflow string, containing any variable available to Watch, including data selections.
var watchDate = Watch.ExpandString("%y-%m-%d");
"Watch.GetConnectToken" on
page134
Uses the default Connect Server host as defined in the Workflow preferences to log into the Connect Server and
retrieve an authorization token.
var tokenConnect = Watch.GetConnectToken();
"Watch.GetConnectTokenEx"
on page135
Uses the arguments passed to it to log into the Connect Server and retrieve an authorization token.
var tokenConnect = Watch.GetConnectTokenEx("localhost", 1234, "myUser", "secret");
"Watch.GetJobFileName" on
page136
Retrieves a string containing the job path and file name located in the job spool folder.
var s = Watch.GetJobFilename();
"Watch.GetJobInfo" on page136
Retrieves the content of a numbered job info (%1 to %9).
var s = Watch.GetJobInfo(9);
"Watch.GetMetadataFilename"
on page137
Retrieves a string containing the job's metadata path and filename. This is useful when using the Metadata API in your
script. (See Metadata API.)
var s = Watch.GetMetadataFileName();
"Watch.GetOriginalFileName" on
page138
Retrieves a string containing the job's original path and filename. Note: this filename is generally no longer available if it has
been captured by Watch.
var s = Watch.GetOriginalFileName();
Watch.GetPDFEditObject
Is used to manipulate PDF files using the AlambicEdit API. The AlambicEdit library allows Workflow to access, create or
modify PDF files.
"Watch.GetPreferences" on
page138
Retrieves a specific type of Connect resources when it is passed a file extension (e.g. "OL-template") or all Connect
resources when it is passed an empty string.
dim JSONString
JSONString = Watch.GetPreferences();
"Watch.GetResources" on
page140
Retrieves a specific type of Connect resources when it is passed a file extension (e.g. "OL-template") or all Connect
resources when it is passed an empty string.
var allTemplates = Watch.GetResources("OL-template");
"Watch.GetVariable" on page141
Retrieves the content of a local or global variable by name.
var s = Watch.GetVariable("MyVariable");
"Watch.InstallResource" on
page141
Is used to copy or unpack resources, such as a Connect Designer template, Data Mapping Configuration, package file,
etc., from the supplied path to the Connect Documents folder.
Watch.InstallResource("c:\myfile.ol-package");
"Watch.Log" on page142
Writes to the Workflow log file, or the message window when in debug - can accept multiple log levels from 1 (red) to 4
(gray).
Watch.Log("Hello, World!", 3);
"Watch.SetJobInfo" on page143
Writes the value of a string to a numbered job info.
Watch.SetJobInfo(9, "Job info 9 Value");
"Watch.SetVariable" on page144
Writes the value of a string to a local or global variable by name.
Watch.SetVariable("MyVariable", "Hello World!");
Page 130