Mapping status codes
When you invoke a task through the console, the Batch Manager returns a numeric status code indicating the result. These are the default codes:
| Code | Description |
|---|---|
| -1 | ErrorRunningBatchManager |
| 0 | None |
| 1 | NoInvocationData |
| 2 | Completed |
| 3 | CompletedWithErrors |
| 4 | CompletedWithWarnings |
| 5 | HaltedBeforeCompletion |
| 6 | HaltedBeforeInvocation |
| 7 | TimedOutBeforeCompletion |
| 8 | UnhandledExceptionOccurred |
| 9 | NoJobsToRun |
You can also use the Configuration Editor to set your own status codes for the console. To define a status code, add a child node in the BatchManager configuration. Status codes can be defined in two different ways.
To override one of the default codes, enter these attributes:
- Status
- Enter the task status for which you're defining the code.
- Exit Code
- Enter the numeric code that you want to use for the specified task status.
You can also define your own codes, such as a code 10 for user exceptions. To define a code, enter these attributes:
- Task Type
- Enter the task for which the code is defined.
- Status
- Enter the task status for which you're defining the code.
- Result Code
- Enter the result code for which you're defining the exit code. Each exit code represents a combination of a status and a result code. You can use the Batch Manager Log to determine the correct values to use.
- Exit Code
- Enter the numeric code that you want to use for the specified combination of a status and a result code.