Currently, we integrate BODS jobs using Unix shell scripts. This is proving to be clumsy when trying to manage environments, getting job reports, and killing hung processes.
Using Automic RA Webservices 3.2, I am working on a POC to perform the following operations:
Job execution
1) Call Logon API and get back SessionID and capture it in a variable -> Only needed if we enable Session security
2) Call Run_Batch_Job with job details ; Get RunID as return value and capture in variable
2) Using RunID; Loop (Get_Trace_Log, Get_BatchJob_Status) until Status changes to 'Succeeded' or 'Error'; Probably check every 1 or 2 minutes
3) If Status = 'Succeded', Call Get_Trace_Log else if Status = 'Error', call Get_Trace_Log followed by Get_Error_Log (Get_Trace_Log gives generic job log while Get_Error_Log gives only error specific logs)
4) Call Logout to end the session -> Only needed if we enable Session security
Job cancellation
On Cancellation, Call Stop_Batch_Job using RunID, captured from Run_Batch_Job
Any advice will be appreciated.