Introduction
Job errors and warnings are detected by JS7 from a job's return code:
- For Shell Jobs the return code corresponds to the job's exit code.
- For JVM Jobs the return code is available from the order outcome with the
returnCode
return variable.
In addition, for Shell Jobs output that possibly is available from the stderr channel can be used to decide about errors and warnings.
Detect Job Errors
Detect Errors from Job Return Codes
Download workflow example (upload .json): pdwExitCodeError.workflow.json
Assume a workflow configuration with a job script that terminates with a non-zero exit code configured like this:
- Return Code on Success: Return code 0 is specified to signal successful execution of the job. Any other return code signals failed execution. More than one return code can be specified separated by comma.
- Return Code on Failure: Alternatively one or more return codes can be specified that signal failed execution. Any other return code signals successful execution.
When an order is added to the workflow the job will fail and log output will be created like this:
Detect Errors from Output to the stderr Channel
Download workflow example (upload .json): pdwStdError.workflow.json
Assume a workflow configuration with a job script that creates output in the stderr channel like this:
The "Job Options" tab offers to select the Fail on output to stderr checkbox like this:
When an order is added to the workflow the job will fail and log output will be created like this:
Detect Job Warnings
Detect Warnings from Job Return Codes
Download workflow example (upload .json): pdwExitCodeWarning.workflow.json
Assume a workflow configuration with a job script that terminates with a non-zero exit code configured like this:
- Return Code on Success: Return code 0 is specified to signal successful execution of the job. Any other return code signals failed execution. More than one return code can be specified separated by comma.
- Return Code on Warning: Return code 1 is specified to signal a warning. A number of return codes can be specified separated by comma. Such return codes are considered successful, however, a JS7 - Notification can be created for jobs that terminate with a return code signaling warnings.
When an order is added to the workflow the job will terminate successfully and log output will be created like this:
Feature Status:
FEATURE AVAILABILITY STARTING FROM RELEASE 2.4.1
- JOC-1350Getting issue details... STATUS
Detect Warnings from Output to the stderr Channel
TODO
Feature Status:
FEATURE AVAILABILITY STARTING FROM RELEASE 2.4.1
- JOC-1363Getting issue details... STATUS