Checking for Detailed Results of an Asynchronous Job
To retrieve details about specific records submitted as part of an asynchronous request, you use the getAsyncResult operation.
getAsyncResult Time Limits
Be aware of the following limits:
-
You can use the getAsyncResult operation for a particular job Id up to 20 times within a 30-day time period. If this limit is exceeded, the system returns an INVALID_JOBID user error.
-
Async job IDs are purged from the system every 30 days. If you attempt to download the results 31 days after your initial request, the system returns an INVALID_JOBID user error.
getAsyncResult Example
You can use code like the following to retrieve the getAsyncResult response. This example shows how to look for records that failed with a status detail code of “unexpected error” and then take some action with those records.
AsyncAddListResult result = (AsyncAddListResult)port.getAsyncResult("job ID", 1);
WriteResponseList responses = result.getWriteResponseList();
for (WriteResponse response : responses.getWriteResponse())
{
if (!response.getStatus().isIsSuccess())
{
if (response.getStatus().getStatusDetail()[0].getCode() == StatusDetailCodeType.UNEXPECTED_ERROR)
// add for resubmit
}
}
To use getAsyncResult with asyncInitializeList, you must be using the 2013.2 endpoint or later. You can monitor asyncInitializeList requests using the UI, as described in Monitoring Asynchronous Jobs from the UI.
getAsyncResult Faults
This operation can throw one of the following faults.
-
InvalidSessionFault
-
ExceededRequestLimitFault
-
ExceededUsageLimitFault
-
ExceededRecordCountFault
-
AsyncFault
-
UnexpectedErrorFault
For more information on faults, see SOAP Fault Status Codes.
You can see some details about asynchronous job results by navigating to Setup > Integration > SOAP Web Services Process Status and viewing the Response.xml file for the job. For details, see Monitoring Asynchronous Jobs from the UI.
Related Topics
- Synchronous Versus Asynchronous Request Processing
- Asynchronous Request Processing
- Checking the Status of an Asynchronous Job
- Monitoring Asynchronous Jobs from the UI
- Synchronous Request Processing
- Using the SOAP Web Services Usage Log
- Creating Integration Reports
- SOAP Web Services Governance Overview