Represents information pertaining to the execution of an asynchronous Geoprocessor task on the server.
- See also:
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | more details The name of the class. | more details | Accessor | |
String | more details The unique job ID assigned by ArcGIS Server. | more details | JobInfo | |
String | more details The job status. | more details | JobInfo | |
GPMessage[] | more details An array of messages that include the message type and a description. | more details | JobInfo | |
Object | more details The options to be used for data requests. | more details | JobInfo | |
String | more details ArcGIS Server Rest API endpoint to the resource that receives the geoprocessing request. | more details | JobInfo |
Property Details
-
Since: ArcGIS API for JavaScript 4.7
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
jobId String
-
The unique job ID assigned by ArcGIS Server.
-
jobStatus String
-
The job status.
Possible Values:"job-cancelled"|"job-cancelling"|"job-deleted"|"job-deleting"|"job-timed-out"|"job-executing"|"job-failed"|"job-new"|"job-submitted"|"job-succeeded"|"job-waiting"
-
An array of messages that include the message type and a description.
-
requestOptions Object
-
The options to be used for data requests. These options can also be controlled through the
requestOptions
method parameter.
-
sourceUrl String
-
ArcGIS Server Rest API endpoint to the resource that receives the geoprocessing request.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
Promise<JobInfo> | more details Cancels an asynchronous geoprocessing job. | more details | JobInfo | |
Promise<ParameterValue> | more details Sends a request to the GP Task to get the task result identified by | more details | JobInfo | |
Promise<ParameterValue> | more details Sends a request to the GP Task to get the task result identified by | more details | JobInfo | |
Promise<MapImageLayer> | more details Get the task result identified by | more details | JobInfo | |
* | more details Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. | more details | JobInfo | |
Object | more details Converts an instance of this class to its ArcGIS portal JSON representation. | more details | JobInfo |
Method Details
-
Cancels an asynchronous geoprocessing job. Requires an ArcGIS Server 10.1 service or greater.
Parameters:jobId StringA string that uniquely identifies a job on the server. It is created when a job is submitted for execution and later used to check its status and retrieve the results.
requestOptions ObjectoptionalAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise<JobInfo> When resolved, returns a JobInfo.
-
fetchResultData(jobId, resultName, requestOptions){Promise<ParameterValue>}
-
Sends a request to the GP Task to get the task result identified by
jobId
andresultName
.Parameters:jobId StringThe jobId returned from JobInfo.
resultName StringThe name of the result parameter as defined in Services Directory.
requestOptions ObjectoptionalAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise<ParameterValue> When resolved, returns an object with a property named result
of type ParameterValue, which contains the result parameters and the task execution messages.
-
fetchResultImage(jobId, resultName, imageParams, requestOptions){Promise<ParameterValue>}
-
Sends a request to the GP Task to get the task result identified by
jobId
andresultName
as an image.Parameters:jobId StringThe jobId returned from JobInfo.
resultName StringThe name of the result parameter as defined in the Services Directory.
imageParams ImageParametersSpecifies the properties of the result image.
requestOptions ObjectoptionalAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise<ParameterValue> When resolved, returns an Object with a mapImage
property of type MapImage
-
fetchResultMapImageLayer(jobId){Promise<MapImageLayer>}Since: ArcGIS API for JavaScript 4.1
-
Get the task result identified by
jobId
as an MapImageLayer.Parameter:jobId StringThe jobId returned from JobInfo.
Returns:Type Description Promise<MapImageLayer> A promise resolving to an instance of MapImageLayer. Example:// Get the resulting map image layer from a completed geoprocessing job. geoprocessor.getResultMapImageLayer(jobInfo.jobId)).then(function(layer){ view.map.add(layer); });
-
fromJSON(json){*}static
-
Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input
json
parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.Parameter:json ObjectA JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
Returns:Type Description * Returns a new instance of this class.
-
toJSON(){Object}
-
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
Returns:Type Description Object The ArcGIS portal JSON representation of an instance of this class.