Signiant Support

What is the best way to monitor SOAP initiated jobs? Print


When using the SOAP interface for submitting jobs, what is the best way to monitor the jobs to ensure that they are running?  


The recommended approach is to make use of the getJobActiveStatus and getLastJobResult SOAP calls as follows:
  • Submit the job (and force it if the frequency is 'none')
  • Wait a period of time*
  • Get the status of the job using the getJobActiveState SOAP call. This will return one of the following:
           NEW - Job has been submitted but has not yet been evaluated
           IDLE - Job is not currently running
           RUNNING - Job is currently running
           STARTING - Job is in the process of being started
  • Repeat the second and third points until job moves from RUNNING to IDLE (NEW and STARTING may appear, but the jobs do not typically stay in those states for any length of time)
  • When the job is IDLE, get the exit code of the job using the getLastJobResult SOAP call. A '0' indicates success. Any positive value indicated a failure. The code will be the same as the return codes seen in the GUI. 
  • If the getLastJobResult returns an error, take whatever action is appropriate (eg, resubmit or force the job)
  • If the jobs stay in a NEW state for an extended period of time, use the shortUpdateJob SOAP call to cause a reevaluation, or delete and resubmit the job with the removeJob and shortCreateJob SOAP calls.

Additional Information 

See the Signiant SOAP Guide for complete details on using the SOAP interface and the calls mentioned in this solution.