AbortJob Method
Summary
Aborts a job in the Job Processor database.
Syntax
<OperationContractAttribute()>
<FaultContractAttribute(DetailType=Leadtools.Services.JobProcessor.FaultContracts.CloudFault,
Action="",
Name="",
Namespace="",
ProtectionLevel=ProtectionLevel.None,
HasProtectionLevel=False)>
Function AbortJob( _
ByVal request As AbortJobRequest _
) As AbortJobResponse
[OperationContractAttribute()]
[FaultContractAttribute(DetailType=Leadtools.Services.JobProcessor.FaultContracts.CloudFault,
Action="",
Name="",
Namespace="",
ProtectionLevel=ProtectionLevel.None,
HasProtectionLevel=false)]
AbortJobResponse^ AbortJob(
AbortJobRequest^ request
)
Parameters
Return Value
An Leadtools.Services.JobProcessor.DataContracts.AbortJobResponse class that indicates whether the job was successfully marked for aborting.
Example
using LeadtoolsJobProcessorExamples.JobService;
public void AbortJob(string jobID)
{
using (JobServiceClient jobServiceClient = new JobServiceClient())
{
AbortJobRequest abortJobRequest = new AbortJobRequest();
abortJobRequest.ID = jobID;
abortJobRequest.Reason = "Duplicate Job";
AbortJobResponse abortJobResponse = jobServiceClient.AbortJob(abortJobRequest);
if (abortJobResponse.IsAborted)
Console.WriteLine("The job was successfully aborted.");
else
Console.WriteLine("The job was not aborted.");
}
}
Public Sub AbortJob(ByVal jobID As String)
Using jobServiceClient As JobServiceClient = New JobServiceClient()
Dim abortJobRequest As AbortJobRequest = New AbortJobRequest()
abortJobRequest.ID = jobID
abortJobRequest.Reason = "Duplicate Job"
Dim abortJobResponse As AbortJobResponse = jobServiceClient.AbortJob(abortJobRequest)
If abortJobResponse.IsAborted Then
Console.WriteLine("The job was successfully aborted.")
Else
Console.WriteLine("The job was not aborted.")
End If
End Using
End Sub