Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Error Handling

JS7 - JavaScript Jobs apply error handling at job level as offered by the JavaScript language.

For error handling at workflow level using JS7 - Workflow Instructions see JS7 - How to handle job errors.

Download workflow implementing JavaScript error handling (upload .json): pdJavaScriptErrorHandling.workflow.json

Terminating Job successfully

There are no specifics for successful termination of a JavaScript job:

...

  • As for every JavaScript function the return statement can be used to leave the processOrder() method prematurely.
  • If the return statement is not used then the job terminates successfully when leaving the processOrder() method.

Terminating Job successfully with warning

JavaScript Jobs can be configured to continue in case of warnings and to send a JS7 - Notification:

...

Optionally notifications for warnings are sent by mail if configured by JS7 - Notification.

Terminating Job with error

The typical error handling for JavaScript applies:

...