Newer Version Available

This content describes an older version of this product. View Latest

checkRetrieveStatus()

Checks the status of declarative metadata call retrieve() and returns the zip file contents.

Syntax

1RetrieveResult = metadatabinding.checkRetrieveStatus(ID id);

Usage

checkRetrieveStatus is part of the procedure for retrieving metadata components from an organization. It is used together with the checkStatus call which indicates when the asynchronous retrieve call has completed. Once checkStatus indicates that the call is completed, call checkRetrieveStatus to get the zip file contents:

  1. Issue a retrieve() call to start the asynchronous retrieval. An AsyncResult object is returned. If the call is completed, the done field contains true. Most often, the call is not completed quickly enough to be noted in the result. If it is completed, note the value in the id field returned and skip the next step.
  2. If the call is not complete, issue a checkStatus() call in a loop using the value in the id field of the AsyncResult object, returned by the retrieve() call in the previous step. Check the AsyncResult object returned until the done field contains true. The time taken to complete a retrieve() call depends on the size of the zip file being deployed, so use a longer wait time between iterations as the size of the zip file increases.
  3. Issue a checkRetrieveStatus() call to obtain the results of the retrieve() call, using the id value returned in the first step.

Sample Code—Java

See the retrieve() sample code for sample usage of this call.

Arguments

Name Type Description
id ID ID obtained from a RetrieveResult object returned by a retrieve() call or a subsequent AsyncResult object returned by a checkStatus() call.

Response

RetrieveResult