QueueSystem.CancelJob method
Cancels the specified job in the Project Server Queuing Service. Allows correlated and incomplete jobs to be cancelled.
Namespace: WebSvcQueueSystem
Assembly: ProjectServerServices (in ProjectServerServices.dll)
Syntax
'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/CancelJob", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub CancelJob ( _
jobUID As Guid, _
cancelCorrelationJobs As Boolean, _
cancelSendIncompleteJobs As Boolean _
)
'Usage
Dim instance As QueueSystem
Dim jobUID As Guid
Dim cancelCorrelationJobs As Boolean
Dim cancelSendIncompleteJobs As Boolean
instance.CancelJob(jobUID, cancelCorrelationJobs, _
cancelSendIncompleteJobs)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/CancelJob", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void CancelJob(
Guid jobUID,
bool cancelCorrelationJobs,
bool cancelSendIncompleteJobs
)
Parameters
jobUID
Type: System.GuidQueue job GUID.
cancelCorrelationJobs
Type: System.BooleanIf true, cancel correlated jobs.
cancelSendIncompleteJobs
Type: System.BooleanIf true, also cancel jobs that are still getting queued (the JobState is SendIncomplete).
Remarks
CancelJob sets the job completion state (JobState) of the specified job to Canceled. If cancelCorrelationJobs is false, the result is functionally equivalent to setting the state to FailedNotBlocking; that is, the current job failed, but correlated jobs farther down the queue continue to process.
Note
There is a potential race condition between checking the state of a job and calling CancelJob. When an application checks the state of a job, the state might be ReadyForProcessing. Before calling CancelJob, the state can switch to Processing or any other state.
Project Server Permissions
Permission |
Description |
---|---|
Allows the user to manage the Project Server queue. Global permission. |