Leadtools.Services.Cloud.ServiceContracts Namespace > IJobService Interface : GetJobInformation Method |
[OperationContractAttribute()] [FaultContractAttribute(DetailType=Leadtools.Services.Cloud.FaultContracts.CloudFault, Action="", Name="", Namespace="", ProtectionLevel=ProtectionLevel.None, HasProtectionLevel=false)] GetJobInformationResponse GetJobInformation( GetJobInformationRequest request )
'Declaration <OperationContractAttribute()> <FaultContractAttribute(DetailType=Leadtools.Services.Cloud.FaultContracts.CloudFault, Action="", Name="", Namespace="", ProtectionLevel=ProtectionLevel.None, HasProtectionLevel=False)> Function GetJobInformation( _ ByVal request As GetJobInformationRequest _ ) As GetJobInformationResponse
'Usage Dim instance As IJobService Dim request As GetJobInformationRequest Dim value As GetJobInformationResponse value = instance.GetJobInformation(request)
[OperationContractAttribute()] [FaultContractAttribute(DetailType=Leadtools.Services.Cloud.FaultContracts.CloudFault, Action="", Name="", Namespace="", ProtectionLevel=ProtectionLevel.None, HasProtectionLevel=false)] GetJobInformationResponse^ GetJobInformation( GetJobInformationRequest^ request )
Use this method to retrieve all information for the specified job in the cloud database.
Public Sub GetJobInformation(ByVal jobID As String) Using jobServiceClient As JobServiceClient = New JobServiceClient() Dim getJobInformationRequest As GetJobInformationRequest = New GetJobInformationRequest() getJobInformationRequest.ID = jobID Dim getJobInformationResponse As GetJobInformationResponse = jobServiceClient.GetJobInformation(getJobInformationRequest) If Not getJobInformationResponse.JobInformation Is Nothing AndAlso (Not String.IsNullOrEmpty(getJobInformationResponse.JobInformation.ID)) Then 'Show the job information Console.WriteLine(String.Format("Job ID: {0}", getJobInformationResponse.JobInformation.ID)) Console.WriteLine(String.Format("Add Time: {0}", getJobInformationResponse.JobInformation.AddedTime)) Console.WriteLine(String.Format("Status: {0}", getJobInformationResponse.JobInformation.Status)) Console.WriteLine(String.Format("Attempts: {0}", getJobInformationResponse.JobInformation.Attempts)) If (Not String.IsNullOrEmpty(getJobInformationResponse.JobInformation.JobType)) Then Console.WriteLine(String.Format("Job Type: {0}", getJobInformationResponse.JobInformation.JobType)) End If If Not getJobInformationResponse.JobInformation.LastStartedTime Is Nothing Then Console.WriteLine(String.Format("Last Started Time: {0}", getJobInformationResponse.JobInformation.LastStartedTime)) End If If Not getJobInformationResponse.JobInformation.LastUpdatedTime Is Nothing Then Console.WriteLine(String.Format("Last Updated Time: {0}", getJobInformationResponse.JobInformation.LastUpdatedTime)) End If If getJobInformationResponse.JobInformation.Status = JobStatus.Started Then Console.WriteLine(String.Format("Progress: {0}", getJobInformationResponse.JobInformation.Percentage)) End If If (Not String.IsNullOrEmpty(getJobInformationResponse.JobInformation.Worker)) Then Console.WriteLine(String.Format("Worker: {0}", getJobInformationResponse.JobInformation.Worker)) End If If getJobInformationResponse.JobInformation.Status = JobStatus.Completed Then Console.WriteLine(String.Format("Completed Time: {0}", getJobInformationResponse.JobInformation.CompletedTime)) End If If getJobInformationResponse.JobInformation.Status = JobStatus.Failed Then Console.WriteLine(String.Format("Failed Time: {0}", getJobInformationResponse.JobInformation.FailedTime)) Console.WriteLine(String.Format("Error ID: {0}", getJobInformationResponse.JobInformation.FailureInformation.FailedErrorID)) Console.WriteLine(String.Format("Error Message: {0}", getJobInformationResponse.JobInformation.FailureInformation.FailedMessage)) End If End If End Using End Sub
using LeadtoolsCloudExamples.JobService; public void GetJobInformation(string jobID) { using (JobServiceClient jobServiceClient = new JobServiceClient()) { GetJobInformationRequest getJobInformationRequest = new GetJobInformationRequest(); getJobInformationRequest.ID = jobID; GetJobInformationResponse getJobInformationResponse = jobServiceClient.GetJobInformation(getJobInformationRequest); if (getJobInformationResponse.JobInformation != null && !String.IsNullOrEmpty(getJobInformationResponse.JobInformation.ID)) { //Show the job information Console.WriteLine(String.Format("Job ID: {0}", getJobInformationResponse.JobInformation.ID)); Console.WriteLine(String.Format("Add Time: {0}", getJobInformationResponse.JobInformation.AddedTime)); Console.WriteLine(String.Format("Status: {0}", getJobInformationResponse.JobInformation.Status)); Console.WriteLine(String.Format("Attempts: {0}", getJobInformationResponse.JobInformation.Attempts)); if (!String.IsNullOrEmpty(getJobInformationResponse.JobInformation.JobType)) Console.WriteLine(String.Format("Job Type: {0}", getJobInformationResponse.JobInformation.JobType)); if (getJobInformationResponse.JobInformation.LastStartedTime != null) Console.WriteLine(String.Format("Last Started Time: {0}", getJobInformationResponse.JobInformation.LastStartedTime)); if (getJobInformationResponse.JobInformation.LastUpdatedTime != null) Console.WriteLine(String.Format("Last Updated Time: {0}", getJobInformationResponse.JobInformation.LastUpdatedTime)); if (getJobInformationResponse.JobInformation.Status == JobStatus.Started) Console.WriteLine(String.Format("Progress: {0}", getJobInformationResponse.JobInformation.Percentage)); if (!String.IsNullOrEmpty(getJobInformationResponse.JobInformation.Worker)) Console.WriteLine(String.Format("Worker: {0}", getJobInformationResponse.JobInformation.Worker)); if (getJobInformationResponse.JobInformation.Status == JobStatus.Completed) Console.WriteLine(String.Format("Completed Time: {0}", getJobInformationResponse.JobInformation.CompletedTime)); if (getJobInformationResponse.JobInformation.Status == JobStatus.Failed) { Console.WriteLine(String.Format("Failed Time: {0}", getJobInformationResponse.JobInformation.FailedTime)); Console.WriteLine(String.Format("Error ID: {0}", getJobInformationResponse.JobInformation.FailureInformation.FailedErrorID)); Console.WriteLine(String.Format("Error Message: {0}", getJobInformationResponse.JobInformation.FailureInformation.FailedMessage)); } } } }