I've been trying out the alerting feature in Data Pump - right now I can successfully add an Alert to the EventLog via my PostProcess script, which is great. However, what I'd really like to do is force the Job status to "Failed" in code if possible.
The PostProcess script is executing a stored procedure and checking the return value from the stored procedure. If the return value <> 0 (which would indicate an error in processing), an Alert is added to the EventLog. I've configured Email notifications in Data Pump Administrator for my specific Alert.
In the script, I'd also like to set the Job status to Failed if possible - if for some reason the email doesn't get delivered/read, it would be nice to have the Job status reflect what actually occurred - that it failed.
I reviewed the User Scripting Help file but could not find any property or method that might allow the job status to be set. Is there a way to set the job status in a script?