JobState Enumeration

JobState Enumeration

Indicates the state of a data upload job.

Public Enum JobState Inherits System.Enum

[C#]
public enum JobState : System.Enum

Remarks

Name

Description

CompletedFailure

Indicates that the job has completed but failed due to an error or exception.

CompletedInvalid

Indicates that the job has completed but the points of interest data were found to be in an invalid format.

CompletedPartialSuccess

Indicates that the job has successfully completed, but some records had problems such as failure to geocode, invalid fields etc.

CompletedSuccess

Indicates that the geocoding has completed successfully.

Expired

Indicates that the job has expired since it waited for more than 25 minutes without any upload activity.

InProcess

Indicates that your points of interest data is being processed for geocoding.

Loading

Indicates that you are uploading the data to the MapPoint servers. If you are done with uploading data you need to call the FinishUpload method to complete the upload process.

Pending

Indicates that your uploading process is complete and the job is pending to be picked up by the geocoding process.

Example

[Visual Basic]

'Create an instance of the customer data service proxy.
Dim custDataService As CustomerDataService = New CustomerDataService

'Set PreAuthenticate to True
custDataService.PreAuthenticate = True

'Assign your credentials.
custDataService.Credentials = _
    New NetworkCredential(myUserName, mySecurePassword, myDomainName)
'Get job state by calling the GetJobState method.
Dim myJobState As JobState = custDataService.GetJobState(myJobID)

Select Case (myJobState)
    Case JobState.Pending
        'Still Pending.
    Case JobState.Loading
        'Still Loading
    Case Else
        'None of the above two

End Select



[C#]

//Create an instance of the customer data service proxy.
   CustomerDataService cds = new CustomerDataService();
   //Assign your credentials.
   cds.Credentials = new System.Net.NetworkCredential(myUserName, 
           mySecurePassword, myDomainName);

   //Set PreAuthenticate to true
   cds.PreAuthenticate = true;

   try
   {
    //Get job state by calling the GetJobState method.
    JobState myJobStatus = cds.GetJobState(myJobID);
    switch(myJobStatus)
    {
     case JobState.Pending:
      //Still Pending.
      break;
     case JobState.Loading:
      //Still Loading
      break;
     default:
      //None of the above two
      break;
    }
   }
   catch(Exception ex)
   {
    string message = ex.Message;
    //Do your exception handling here.
   }


See Also

  GetJobState Method