Using the On Error tab

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 previous versions of Workflow that did not have error handling.

By default, any Action task, Branch, Splitter or Condition that generates an error will simply be ignored, and the unmodified job file is passed on to the next task (not within a branch). Any initial input task that generates an error will stop the process from running as a whole, and Output tasks will not generate output.

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.

Whenever an error is triggered either during debugging or when a process runs in production, the settings specified in the On Error tab of the task that generated the error will be used to determine a course of action.

Note: One of the options is to trigger an error management process when an error occurs. To learn how to create such an error process, see Creating and using Error processes.

On Error Tab

The On Error tab is common to all tasks and processes. It can be found in the Task Properties dialog.

  • Send to Process: Check this option to start an error management process and send the job file to it.
  • Error Process drop-down: Enabled only when the Send to Process option is checked. Lists any process of which the initial input task is the Input Error Bin task.
  • Action: In the initial input tasks, this group is disabled and defaults to Stop Process. In all other tasks where the On Error tab is present, the following options are available:
    • Default: By default, the task is ignored as if it did not exist and the error is logged before continuing the branch or process; the job file is passed on to the next task in the process. When an error occurs in a loop (or in a plugin that acts like a loop), the loop may log the error, terminate the current iteration and proceed with the next iteration.
    • Stop Branch: If the task is in a branch of the process, the branch is stopped and the job file is returned to the process after the branch. The branch will not produce any output. If the task is not on a branch, the entire process will be stopped.
    • Stop Process: The process is stopped and no more processing is done. No further output is produced.
  • Log Message: Check this option to enable logging a custom error message in the PReS Workflow log file and in the Windows Application Events.
  • Message: Enabled only when the Log Message option is checked. Enter a message that will be logged in the PReS Workflow log file. You can use any variables available in PReS Workflow to customize the message.
  • Store the message in variable: Select in which jobinfo, local or global variable you want to store the message content.
  • ID: Enter an error ID. This ID will be visible in the Windows Event Viewer. However, the ID is not visible in the PReS Workflow log file.
  • Store the ID in variable: Select in which jobinfo, local or global variable you want to store the error ID.
  • Reset to defaults: Resets all options in this tab to their default values.

When storing the message or ID, if they are stored in a jobinfo they will be available in any error handling process where errors are being forwarded. If your process continues after the error, the contents of the variables selected in this window will be available to the rest of your process, or as long as they are not overwritten.

All error codes are listed in the online help of a newer version of PReS Workflow; see: Workflow 2023.2. Though some error messages are specific to a task in particular, others may apply to any and all tasks because they are related more to the system than to PReS Workflow itself. Some examples would be W3813, W3830, W3991, W4005. These correspond to issues such as not having any space to write files, permission errors on folders or files, etc.