Job QML Type

A base type for types representing a long running job on a server. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Inherited By:

DownloadPreplannedOfflineMapJob, EstimateTileCacheSizeJob, ExportTileCacheJob, ExportVectorTilesJob, GenerateGeodatabaseJob, GenerateOfflineMapJob, GeoprocessingJob, OfflineMapSyncJob, and SyncGeodatabaseJob

Properties

Signals

Methods

Detailed Description

Note: You cannot declare or create a component of this type in QML code.

A job is initiated when it is submitted to the server. When the server accepts the job, it assigns a unique ID to the job which is available in serverJobID. The client then periodically polls for the status of the job on the server. If the job completes successfully, the result of the job is downloaded, otherwise an error is provided when the job fails.

Job instances created by tasks and returned by task methods are returned in a JobStatus::NotStarted state and Job::resume must be called to start the associated operation.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

TypeDefault Property
Credentialcredential (since Esri.ArcGISRuntime 100.1)
RequestConfigurationrequestConfiguration (since Esri.ArcGISRuntime 100.1)

See also Cancelable, JsonSerializable, and RemoteResource.

Property Documentation

cancelAsyncTaskStatus : Enums.TaskStatus

The current status of the asynchronous cancelAsync operation (read-only).

This property was introduced in Esri.ArcGISRuntime 100.14.


checkStatusTaskStatus : Enums.TaskStatus

Returns the current status of the checkStatus method (read-only).

Note: The status indicates if the current job status was retrieved from the service.

This property was introduced in Esri.ArcGISRuntime 100.1.

See also Enums.TaskStatus.


[default] credential : Credential

The Credential for authenticating against a secured service.

This is only applicable if using a service that is secured.

This property was introduced in Esri.ArcGISRuntime 100.1.


error : Error

Returns the error encountered during job execution, if any (read-only).

The error is available when the job status is Enums.JobStatusFailed.


jobStatus : Enums.JobStatus

Returns the current status of this Job (read-only).

See also Enums.JobStatus.


jobType : Enums.JobType

Returns the JobType of this Job (read-only).

See also Enums.JobType.


json : jsobject

The JSON representation of this object.

This JSON can be used to instantiate the type instance.


messages : list<JobMessage>

The informational messages produced during execution of the job.


progress : int

Returns the current progress of the job as the percentage complete (read-only).

When the progress value changes, the Job::progressChanged signal is emitted.

This property was introduced in Esri.ArcGISRuntime 100.1.


[default] requestConfiguration : RequestConfiguration

The configuration parameters used for network requests sent by this job.

This property was introduced in Esri.ArcGISRuntime 100.1.


serverJobId : string

Returns the unique job ID of this Job on the server on which it is executing (read-only).


unknownJson : jsobject

Returns the unknown JSON from the source JSON.

See also JsonSerializable.


unsupportedJson : jsobject

Returns the unsupported data from the source JSON.

See also JsonSerializable.


url : url

The URL of the job.

This property was introduced in Esri.ArcGISRuntime 100.1.


Signal Documentation

cancelAsyncTaskStatusChanged()

Emitted when the cancelAsyncTaskStatus property changes.

Note: The corresponding handler is onCancelAsyncTaskStatusChanged.

This signal was introduced in Esri.ArcGISRuntime 100.14.


checkStatusTaskStatusChanged()

Emitted when the checkStatusTaskStatus property changes.

Note: The corresponding handler is onCheckStatusTaskStatusChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


credentialChanged()

Emitted when the credential property changes.

Note: The corresponding handler is onCredentialChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


jobErrorChanged()

Emitted when the error property of this Job changes.

Note: The corresponding handler is onJobErrorChanged.


messageAdded(JobMessage message)

Indicates that a new JobMessage was added to messages.

  • message - The new job message

Note: The corresponding handler is onMessageAdded.

This signal was introduced in Esri.ArcGISRuntime 100.14.


progressChanged()

Emitted when the progress property of this Job changes.

Note: The corresponding handler is onProgressChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


requestConfigurationChanged()

Emitted when the requestConfiguration property changes.

Note: The corresponding handler is onRequestConfigurationChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


statusChanged(JobStatus status)

When status changes, the jobStatus signal is emitted.

  • status - The new job status

Note: The corresponding handler is onStatusChanged.

This signal was introduced in Esri.ArcGISRuntime 100.14.


Method Documentation

bool cancel()

Cancel the job.

The job is canceled and goes into a failure status Enums.JobStatusFailed. For jobs running on a server, a cancel request will be sent for the associated serverJobId. You should always cancel unneeded jobs (for example when exiting your app) to avoid placing unnecessary load on the server. For example, server side jobs include:

In addition, the GenerateOfflineMapJob is composed of several server-side jobs, depending on the layers in your Map. Canceling this high-level job will also send a cancel request to the underlying server jobs.

Returns true if the job was canceled, false if the job is already succeeded or an error occurred.


string cancelAsync()

Cancels this Job and waits for any asynchronous, server-side operations to be canceled.

The job is canceled and will result in a Enums.JobStatusFailed status after all cancellation tasks have completed. For jobs running on a server, a cancel request is sent for the associated serverJobId. You should always cancel unneeded jobs (for example when exiting your app) to avoid placing unnecessary load on the server. Examples of server-side jobs include:

In addition, the GenerateOfflineMapJob is composed of several server-side jobs, depending on the types of layers in your Map. Canceling this high-level job will also send a cancel request to the underlying server jobs.

Upon calling this method, the jobStatus is immediately set to Enums.JobStatusCanceling.

Returns a string representing the task ID of the asynchronous task.

This method was introduced in Esri.ArcGISRuntime 100.14.


bool cancelTask(string taskId)

Cancels the job with the specified taskId.

The job is canceled and goes into a failure status Enums.JobStatusFailed For jobs running on a server, a cancel request will be sent for the associated Job::serverJobId. You should always cancel unneeded jobs (for example when exiting your app) to avoid placing unnecessary load on the server. For example, server-side jobs include:

In addition, the GenerateOfflineMapJob is composed of several server-side jobs, depending on the types of layers in your Map. Canceling this high-level job will also send a cancel request to the underlying server jobs. Returns true if the job was canceled, false if the job is already succeeded or an error occurred.

This method was introduced in Esri.ArcGISRuntime 100.1.

See also Cancelable.


string checkStatus()

Checks the current job status from the service.

The checkStatusTaskStatusChanged signal will emit once the operation is complete.

The task completes after the status has been checked. If the job is polling the server for status and is in a time gap, then calling this method will ensure a request is sent right away.

Note: It is possible the task can complete successfully and retrieve the same status. In that case, jobStatusChanged will not be emitted.

This method was introduced in Esri.ArcGISRuntime 100.1.

See also jobStatusChanged and checkStatusTaskStatusChanged.


bool pause()

Pauses the job.

Returns true if the job was successfully paused; false if it is already done, or if there is an error.


bool start()

Starts or resumes this job. Call this method to start the job initially and also to resume it after it is paused.

Returns true if the job was successfully started/resumed; false if it is already done, or if there is an error.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.