2022.2

Table Of Contents
Examples
JavaScript
var repoObject = new ActiveXObject("RepositoryLib.WorkflowRepository");
repoObject.ConnectionString = "C:\\User-
s\\Administrator\\Desktop\\repoObject.Repository";
(In JavaScript, backslashes have to be escaped.)
VB Script
set repoObject = CreateObject("RepositoryLib.WorkflowRepository")
repoObject.ConnectionString = "C:\User-
s\Administrator\Desktop\repoObject.Repository"
Debugging and error handling
This chapter touches on two subjects that are intrinsically linked, though their use is different.
Debugging is the act of running through your process, either step by step or as a whole, directly from
the PReS Workflow Configuration tool, in order to detect and resolve issues with your process.
Error handling, on the other hand, occurs when your configuration has been sent to PReS Workflow
services, and are running in "production" mode. The automated handling of errors within your pro-
cesses will have a large impact on recovering from errors as they happen during production.
About error handling
When your process is running, or during debugging, it may happen that the task that is currently run-
ning causes an error, and the task fails. For example, when trying to save to a folder that does not exist,
or printing to a printer that cannot be found.
When such an error occurs, in most cases you would want to be aware of it and to take certain actions
in order to correct or report the error. This is where our error handling features come in handy.
Most of the tasks, branches and conditions included in your process can have their own error handling
behavior, with the exception of Comments, the Input Error bin task, and older legacy tasks from pre-
vious versions of Workflow that did not have error handling.
By default, when an error occurs, the task is skipped and the unmodified job file is passed on to the next
task. You can overwrite this behavior by changing the options of the On Error tab of the process -
which sets the default error handling behavior for all the tasks in that process - or of an individual task.
Using the On Error tab
Whenever an error is triggered either during debugging or when a process runs in production, the set-
tings specified in the On Error tab of the task that generated the error will be used to determine a
course of action.
Page 82