Failure strategy
A failure strategy can be defined for each external application. This supports a fail fast strategy, where the external application will fail on a defined trigger, and write defined messages.
Under the Failure strategy tab of an external application, a process result, what should trigger its failure, and the message to post about that failure are configured (figure 15.14).
The types of results that can be included in a failure trigger configuration are:
- A result file produced by the native process, as configured in the External command tab.
- The std out process stream
- The std error process stream
- An exit code from the terminated process
Where the external process result selected is a result file, the failure trigger is always the non-existence of the result file. For the other three result types, the trigger is defined using Java regular expressions, which are matched against the process result. For std out and std error streams, the expression is matched against each line. In the case of exit codes, the expression is matched against a string representation of the exit code integer value.
Figure 15.14: Failure triggers for an external application are configured under the Failure strategy tab.
Other notes about failure strategies and troubleshooting
'
- When external applications fail, any results files produced despite the job failure will be posted. In such cases, the std out and std error files can contain valuable troubleshooting information.
- When an external application is included in a workflow, the final, substituted command line executed by the external application and the native process exit code are posted to the workflow log, as well as any errors contained in the server result (thus also all failures triggered).
- Audit log entries for external applications include the native process command line and the exit value.