Understanding Exit Code Interpretation: fail_codes vs. success_codes Precedence
search cancel

Understanding Exit Code Interpretation: fail_codes vs. success_codes Precedence

book

Article ID: 408778

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

This document clarifies the default behavior and design logic for interpreting exit codes as either a success or a failure. The method of interpretation depends directly on whether fail_codes or success_codes are explicitly defined within a system's configuration, and understanding this design is crucial for accurately predicting job run behavior.

Resolution

The determination of whether a task or job's exit code signifies a success or a failure is governed by a specific design logic concerning the definition of fail_codes and success_codes
1. If fail_codes are explicitly specified:
* When fail_codes are defined in the configuration, the system considers only the codes listed within this parameter as indicators of a failure.
* Any other exit code received, which is not explicitly present in the fail_codes list, will be interpreted as a success.
* In this scenario, the definition of success_codes is implicitly all codes not covered by fail_codes
2. If fail_codes are NOT defined:
* If the fail_codes parameter is not defined, the system will rely solely on the success_codes definition to determine the job's status.
* In this case, only the codes explicitly listed within success_codes will be considered a success.
* Any exit code that is not explicitly present in the success_codes list will be treated as a failure. This design ensures a clear and predictable method for determining the completion status of tasks or jobs based on their configured exit code parameters.