import TraceJobInfo from "@arcgis/core/networks/support/TraceJobInfo.js";const TraceJobInfo = await $arcgis.import("@arcgis/core/networks/support/TraceJobInfo.js");- Inheritance:
- TraceJobInfo→
TraceResult→ Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.27
Represents information pertaining to the execution of an asynchronous request on the server.
- See also
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
aggregatedGeometry readonly inherited | ||
circuits readonly inherited | CircuitTraceResult[] | null | undefined | |
declaredClass readonly inherited | ||
elements readonly inherited | ||
globalFunctionResults readonly inherited | ||
kFeaturesForKNNFound readonly inherited | ||
| | ||
paths readonly inherited | CircuitPath[] | null | undefined | |
startingPointsIgnored readonly inherited | ||
| | ||
| | ||
| | ||
warnings readonly inherited |
aggregatedGeometry
- Type
- AggregatedGeometry | null | undefined
This property defines an aggregation of geometries returned by the trace. The aggregated geometries will only include geometries that belong to features with assetgroups/assettypes specified in the trace output.
This is returned only if the aggregated geometries results type is defined in the trace configuration.
circuits
- Type
- CircuitTraceResult[] | null | undefined
- Since
- ArcGIS Maps SDK for JavaScript 4.34
An array of circuits returned by the trace. Used in the telecom domain network. This is returned only if the "circuits" result type is defined in the trace configuration.
elements
- Type
- NetworkElement[]
An array of network elements returned by the trace. The network element is a representation of how the network topology defines its graph. This is returned only if the elements results type is defined in the trace configuration.
The elements property returning a TelecomNetworkElement is in beta and is reserved for future use in a telecom domain network.
globalFunctionResults
- Type
- FunctionResult[]
Returns an array of function aggregation results.
kFeaturesForKNNFound
- Type
- boolean
This parameter is specific to the K-Nearest Neighbors Algorithm, when the nearest filter is provided in the trace configuration. It returns true if any neighbors were found.
- Default value
- false
paths
- Type
- CircuitPath[] | null | undefined
- Since
- ArcGIS Maps SDK for JavaScript 4.34
The paths returned by a path trace.
startingPointsIgnored
- Type
- boolean
Returns true if the starting points in the network trace operation are ignored.
- Default value
- false
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.
warnings
Returns any warnings encountered by the trace operation.
Methods
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<TraceJobInfo>
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<TraceJobInfo>
When resolved, returns a TraceJobInfo.
Example
const traceLocation = TraceLocation.fromJSON({ traceLocationType: "startingPoint", globalId: "{BBF88249-6BAD-438F-9DBB-0E48DD89EECA}", percentAlong: 0.5805425412252266});
const traceParameters = TraceParameters.fromJSON({ traceConfigurationGlobalId: "{DF22DA8D-6EC0-408B-A8B2-E468EC7DC9BF}", resultTypes: [ { type: "elements", includeGeometry: false, includePropagatedValues: false, networkAttributeNames: [], diagramTemplateName: "", resultTypeFields: [] }, { type: "aggregatedGeometry", includeGeometry: false, includePropagatedValues: false, networkAttributeNames: [], diagramTemplateName: "", resultTypeFields: [] } ], traceType: "subnetwork"});traceParameters.traceLocations = [traceLocation];
const jobInfo = await network.submitTraceJob(traceParameters);await jobInfo.checkJobStatus(); destroy
- Signature
-
destroy (): void
Stop monitoring this job for status updates.
// Stop monitoring this job for status updates.jobInfo.destroy();- 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<TraceJobInfo>
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<TraceJobInfo>
When resolved, returns a TraceJobInfo.
Example
// Submit an asynchronous trace job.const traceLocation: TraceLocation = TraceLocation.fromJSON({ traceLocationType: "startingPoint", globalId: "{BBF88249-6BAD-438F-9DBB-0E48DD89EECA}", percentAlong: 0.5805425412252266});
const traceParameters: TraceParameters = TraceParameters.fromJSON({traceConfigurationGlobalId: "{DF22DA8D-6EC0-408B-A8B2-E468EC7DC9BF}", moment: 1554214441244, gdbVersion: "SDE.DEFAULT", resultTypes: [ { type: "elements", includeGeometry: false, includePropagatedValues: false, networkAttributeNames: [], diagramTemplateName: "", resultTypeFields: [] }, { type: "aggregatedGeometry", includeGeometry: false, includePropagatedValues: false, networkAttributeNames: [], diagramTemplateName: "", resultTypeFields: [] } ], traceType: "subnetwork"});traceParameters.traceLocations = [traceLocation];
const jobInfo = await network.submitTraceJob(traceParameters);
await jobInfo.waitForJobCompletion();Type definitions
WaitForValidateOptions
statusCallback
- Type
- (result: TraceJobInfo) => void | undefined
Callback function that is called at the specified interval. Use this method to monitor job status and messages.