8.8

Table Of Contents
Condition or Action
When using the Run Script as a condition, you need a way to tell your process whether the
result is true or false. The condition result is returned by the "Script.ReturnValue" on page117
variable. If the return value is zero (the default), the condition is false. Otherwise, it is true.
When using the Run Script as an action task, the job file going out of the Run Script action
task will be the same as the one coming in, unless you have specifically changed it within your
script by writing to the file that is the target of the "Watch.GetJobFileName" on page108
function. The same goes for any job info, local or global variables, unless you use the
"Watch.SetJobInfo" on page112 or "Watch.SetVariable" on page114 functions to modify them.
APIs
Multiple APIs (methods of communicating with PReS Workflow scripting tools) are available
through the scripting engine, in all languages.
l The Watch object is used to communicate with your current process and configuration.
See "The Watch Object" on page103.
l The PReS Connect REST API consists of many services that expose access to a number
of areas including Workflow, data entity management and file store operations. See PReS
Connect REST API Cookbook.
l You can manipulate PDFfiles using the PReS Alambic API. See AlambicEdit Library
Reference. Note that the PReS Alambic API is part of the PDFTools.
l You can manipulate the metadata in your process using the Metadata API. See Metadata
API Reference.
l You can communicate with a SOAPserver using the SOAPAPI. See "SOAP Server API
Reference" on page96.
l You can communicate with the PlanetPress Capture Database using the Capture API.
See Capture API Reference.
l You can communicate the with the Data Repository using the Data Repository API. See:
"Data Repository API" on page119.
The Script Editor and XSLT Editor
How can I edit scripts and XSLT code?
Scripts can be edited in the Script Editor and the XSLT Editor. Both editors are visually
identical and share almost exactly the same commands. They let you import and export scripts,
Page 90