This sample demonstrates how to use the utility network tracing capabilities to get the list of customers serviced by a single medium-voltage transformer. The UNTracing REST SOE has two operations called getMVTransformerAssetIds and getCustomers. The first operation queries the Electric Device layer to return a list of medium-voltage transformer asset IDs that can then be used in the second operation to retrieve the list of service points and customers connected to that transformer. Also, the root resource of this SOE returns information about the utility network.
The administrator that deploys this SOE must enable it on the map service that also has the Utility Network capability enabled.
Deploying the SOE from the .soe file (..\untracingrestsoe\target\JavaUNTracingRESTSOE.soe
) does not require you to open a Java IDE. However, you can open the project (..\untracingrestsoe
) in a Java IDE, such as Eclipse or IntelliJ, to debug, modify, and recompile the SOE code. Constants' values may need to change.
The Utility Network owner must make sure that the network topology has been enabled.
Features
- Opening a Utility Network dataset (
IFeatureDataset
,IDataset
) - Getting network properties (
IBaseNetworkProxy
,IDEBaseNetworkProxy
,IBaseNetworkTopologyProxy
) - Creating and initializing a network tracer (
IBaseNetworkProxy
,IUtilityNetworkQuery
,ITracer
,IDEDataset
) - Configuring and executing a network trace (
ITracer
,UNTraceConfiguration
,UNCondition
,UNOutputFilter
) - Processing network trace results (
IUNTraceResults
)
Sample data
This sample requires the Electric Utility Network Foundation Naperville demo data to be loaded in an Enterprise Geodatabase and published as a service on ArcGIS Enterprise. Please follow the instructions provided in the above link to download, configure and publish the data.
Instructions
Deploy the SOE
- Log in to ArcGIS Server Manager and click the Site tab.
- Click Extensions.
- Click Add Extension.
- Click Choose File and choose the JavaUNTracingRESTSOE.soe file (
..\untracingrestsoe\target\JavaUNTracingRESTSOE.soe
). - Click Add.
Enable the SOE on a map service
- Make sure you have published the Naperville electric utility network service whose data source is from an Enterprise Geodatabase using ArcGIS Pro. If not, refer to Electric Utility Network Foundation.
- Log in to ArcGIS Server Manager and click the Services tab. Select the Naperville map service and select Capabilities.
- In the list of available capabilities, find Java UN Tracing REST SOE and check the box to enable it.
- Click the Save and Restart button to restart the service.
Test the SOE in the ArcGIS Server Services Directory
-
Open a browser and navigate to the REST services endpoint of the Naperville service (URL:
http://<serverdomain>/<webadaptorname>/rest/services/<Naperville>/MapServer
). -
Scroll to the bottom of the above page and click JavaUNTracingRESTSOE in Supported Extensions.
This leads to the SOE's root page, at the following URL:
http://<serverdomain>/<webadaptorname>/rest/services/<servicename>/MapServer/exts/JavaUNTracingRESTSOE
Make sure that the hasValidNetworkTopology property returns 'true'. This indicates that the network topology is enabled. Otherwise, the Utility Network owner will need to enable the network topology before using this SOE.
-
Click getMVTransformerAssetIds in Supported Operations.
Optionally, type a valid WHERE clause for querying transformer devices in the where input box.
Click the getMVTransformerAssetIds button. You will receive a response returning the asset IDs of all medium-voltage transformers satisfying the specified where clause:
One of these transformer asset IDs can then be used to get the list of serviced customers.
-
Click getCustomers in Supported Operations on the SOE's root page.
Type a valid transformer asset ID in the transformerAssetId input box.
Click the getCustomers button. You will receive a response returning more information about the transformer, along with the list of service points containing mocked customer information: