12.07.2015 Views

Database.com Metadata API Developer's Guide - Salesforce.com

Database.com Metadata API Developer's Guide - Salesforce.com

Database.com Metadata API Developer's Guide - Salesforce.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

File-Based CallscancelDeploy()1. Issue a deploy() call to start the asynchronous deployment. An AsyncResult object is returned. Note the value in the idfield and use it for the next step.2. Issue a checkDeployStatus() call in a loop until the done field of the returned DeployResult contains true, whichmeans that the call is <strong>com</strong>pleted. The DeployResult object contains information about an in-progress or <strong>com</strong>pleteddeployment started using the deploy() call. When calling checkDeployStatus(), pass in the id value from theAsyncResult object from the first step.In <strong>API</strong> version 29.0, <strong>Database</strong>.<strong>com</strong> improved the deployment status properties and removed the requirement to usecheckStatus() after a deploy() call to get information about deployments. <strong>Database</strong>.<strong>com</strong> continues to support the useof checkStatus() when using deploy() with <strong>API</strong> version 28.0 or earlier.Sample Code—JavaSee the deploy() sample code for sample usage of this call.ArgumentsNameidincludeDetailsTypeIDbooleanDescriptionID obtained from an AsyncResult object returned by deploy() or a subsequentcheckDeployStatus() call.Sets the DeployResult object to include DeployDetails information ((true) or not(false). The default is false. Available in <strong>API</strong> version 29.0 and later.ResponseDeployResultcancelDeploy()Cancels a deployment that hasn’t <strong>com</strong>pleted yet.SyntaxCancelDeployResult = metadatabinding.cancelDeploy(string id)UsageUse the cancelDeploy() operation to cancel a deployment in your organization started by the deploy() operation, whichincludes deployments started by the Force.<strong>com</strong> Migration Tool and the Force.<strong>com</strong> IDE. The deployment can be in a queuewaiting to get started, or can be in progress. This operation takes the ID of the deployment you wish to cancel and returns aCancelDeployResult object. When the deployment is in the queue and hasn’t started yet, calling cancelDeploy() cancelsthe deployment immediately. When the deployment has started and is in progress, it might not get canceled immediately, soyou should call checkDeployStatus() to check the status of the cancellation.Cancel a deployment using these steps.1. Obtain the ID of the deployment you wish to cancel. For example, you can obtain the ID from the deploy() call in theAsyncResult object id field. Alternatively, you can obtain the ID in the <strong>Database</strong>.<strong>com</strong> user interface from Setup byclicking Deployment Status or Deploy > Deployment Status, and by noting the ID of a deployment started by the <strong>API</strong>.2. Issue a cancelDeploy() call to start the cancellation process. This call returns a CancelDeployResult object.3. Check the value in the done field of the returned CancelDeployResult. If the done field value is true, the deploymenthas been canceled and you’re done. If the done field value is false, the cancellation is in progress, and follow these stepsto check the cancellation status.32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!