What is the option to feed output values despite the job/transaction failing?
Issue: How to avoid Arguments not to show in Job when exception thrown?
Description:
Job Faulted Status: A job is in this state if it fails to start or the process throws an unhandled error during execution.
If the build process throws an abnormal exception, the status of the job will be marked as faulted and the out arguments will not retain. To retain the Out arguments, handle the exception using Try/Catch.
Example: Consider a workflow having two arguments "In_boolean", "Out_Result" and a snippet of the code looks like below.
On publishing and executing the above snippet of the code, the Job gets faulted and the out_Result argument is empty.
Post Exception Handling:
The same workflow is enclosed in the try/catch block and the code is published. The job marks as successful and Out_Result has some value.
Resolution:
- As per the best practice, handle the code from an abnormal termination.
The faulted jobs does not retain the out argument. To retain the out argument, handle the abnormal error using a try-catch block.