Geoprocessing service GetJobResult method

Gets the results of a geoprocessing job that has completed successfully.

GetJobResult(string JobID, string[] ParameterNames, GPResultOptions Options)




The unique id of the geoprocessing job from which to retrieve job results.


A string array of output parameter names. Only result value for parameter names specified are returned. If null or empty, all result values are returned. Input parameter names will be ignored and thus should not be specified.


Defines how the result values are returned. If specified (not null), results are modified using these options before being returned to the client.

Return Value

A GPResult object.


This method enables the caller to retrieve the results for jobs that have been successfully completed. The results are returned to the caller as a GPResult. The result contains the return values and the execution messages.

The client can limit the values returned by sending the parameter names to return specific output values. If no parameter names are sent, all values are returned.

Result Options are used to indicate various options for returning result values. If the options is null, the default options are used. Result Options reference a number of properties, including "DensifyFeatures", "TransportType", "SpatialReference", "Format", and "FormatProperties". See GPResultOptions for details.

Result options can be included, but you will get better performance if you include result Options in SubmitJob and send a null value for result options with this method.



//to get the job id see SubmitJob

//to determine the job status see GetJobStatus


if (jobStat == esriJobStatus.esriJobSucceeded)


      //setup result options

      GPResultOptions resultOptions = new GPResultOptions();

      resultOptions.TransportType = esriGDSTransportType.esriGDSTransportTypeUrl;

      resultOptions.TransportTypeSpecified = true;


      //get results from server based on job id

      GPResult results = gpserver.GetJobResult(jobID, null, resultOptions);

      GPFeatureRecordSetLayer parcelBuffer = (GPFeatureRecordSetLayer)results.Values[0];

      GPDataFile report = (GPDataFile)results.Values[1];