import TopologyValidationJobInfo from "@arcgis/core/networks/support/TopologyValidationJobInfo.js";const TopologyValidationJobInfo = await $arcgis.import("@arcgis/core/networks/support/TopologyValidationJobInfo.js");- Inheritance:
- TopologyValidationJobInfo→
ValidateNetworkTopologyResult→ Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.26
Represents information pertaining to the execution of an asynchronous Network.submitTopologyValidationJob() request on the server.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
discoveredSubnetworks inherited | Subnetwork[] | null | undefined | |
exceededTransferLimit inherited | ||
fullUpdate inherited | ||
| | ||
moment inherited | ||
serviceEdits inherited | ||
| | ||
| | ||
| | ||
validateErrorsCreated inherited |
discoveredSubnetworks
- Type
- Subnetwork[] | null | undefined
Contains information about the subnetworks that are marked as dirty during the validation process, along with the domain network and tier containing the subnetwork.
exceededTransferLimit
If maxRecordCount is configured for a layer, exceededTransferLimit will be true if a query matches more than the maxRecordCount features. It will be false otherwise.
fullUpdate
- Type
- boolean
If the current feature service contains no dirty areas, full update will return true.
- Default value
- false
moment
The date/timestamp (in UTC) when the validate process was executed.
serviceEdits
- Type
- ValidateServiceEdits[] | null | undefined
The serviceEdits returns full features including the original features prior to delete, the original and current features for updates, and the current rows for inserts, which may contain implicit changes.
statusUrl
- Type
- string
ArcGIS Server Rest API endpoint to the resource that receives the validate network topology request.
submissionTime
The date and time in which Network.submitTopologyValidationJob() is first called.
validateErrorsCreated
- Type
- boolean
If error features are created during the validation process validateErrorsCreated will be true.
- Default value
- false
Methods
| Method | Signature | Class |
|---|---|---|
fromJSON inherited static | fromJSON(json: any): any | |
checkJobStatus(requestOptions?: RequestOptions | null): Promise<TopologyValidationJobInfo> | | |
destroy(): void | | |
toJSON inherited | toJSON(): any | |
waitForJobCompletion(options?: WaitForValidateOptions): Promise<TopologyValidationJobInfo> | |
fromJSON
- Signature
-
fromJSON (json: any): any
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.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | A 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
- any
Returns a new instance of this class.
checkJobStatus
- Signature
-
checkJobStatus (requestOptions?: RequestOptions | null): Promise<TopologyValidationJobInfo>
Sends a request for the current state of this job.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| requestOptions | Additional options to be used for the data request (will override requestOptions defined during construction). | |
- Returns
- Promise<TopologyValidationJobInfo>
When resolved, returns a TopologyValidationJobInfo.
Example
const extent = new Extent({ xmin: 470789.0888, ymin: 3597733.2051, xmax: 531454.2759999996, ymax: 3639864.802100001, spatialReference: { wkid: 26911, latestWkid: 26911 }});
const result = await network.submitTopologyValidationJob( new ValidateNetworkTopologyParameters({ validateArea: extent, gdbVersion: "version.test" }));
const jobInfo = await result.checkJobStatus();console.log("jobInfo.status", jobInfo.status); destroy
- Signature
-
destroy (): void
Stop monitoring this job for status updates.
// Stop monitoring this job for status updates.jobInfo.destroy();- See also
- Returns
- void
toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.
waitForJobCompletion
- Signature
-
waitForJobCompletion (options?: WaitForValidateOptions): Promise<TopologyValidationJobInfo>
Resolves when an asynchronous job has completed. Optionally job progress can be monitored.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | Options. See properties below for object specifications. | |
- Returns
- Promise<TopologyValidationJobInfo>
When resolved, returns a TopologyValidationJobInfo.
Example
// Submit an asynchronous validate network topology job. Display the remote job status every 1.5 seconds.const extent = new Extent({ xmin: 470789.0888, ymin: 3597733.2051, xmax: 531454.2759999996, ymax: 3639864.802100001, spatialReference: { wkid: 26911, latestWkid: 26911 }});
const result = await network.submitTopologyValidationJob( new ValidateNetworkTopologyParameters({ validateArea: extent, gdbVersion: "version.test" }));
const options = { interval: 1500, statusCallback: (j) => { console.log("Job Status: ", j.jobStatus); }};
await jobInfo.waitForJobCompletion(options);Type definitions
WaitForValidateOptions
statusCallback
- Type
- (result: TopologyValidationJobInfo) => void | undefined
Callback function that is called at the specified interval. Use this method to monitor job status and messages.