<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Downstream Trace Crossing into Another Subnetwork and Failing with ERROR 001890 in ArcGIS Utility Network Questions</title>
    <link>https://community.esri.com/t5/arcgis-utility-network-questions/re-downstream-trace-crossing-into-another/m-p/1700258#M6798</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/633735"&gt;@JohnGoat&lt;/a&gt;- Unless you need some python-only processing a better long term solution is to create a custom trace widget in ExB. While python approach is simpler to develop, if you want your users to use it you have to account for authentication, context and handling outputs. Python scripts work well in ArcGIS Pro but in the context of web maps they are slightly harder to implement.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;example -&amp;nbsp;Web map interaction isn't straight forward, you cannot send a selection directly as a starting point/barrier in the python script but you can with a custom ExB Widget.&lt;BR /&gt;&lt;BR /&gt;While I don't know the in's and out's of your scenario, I can't help but wonder if a named trace configuration would work?&lt;BR /&gt;&lt;BR /&gt;If your trace config is a downstream or upstream (or any subnetwork based trace) then it's going to be bound by the Subnetwork.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;PRE&gt;trace_config_name="{31407091-970B-4B14-BF68-F8C25B1349D6}"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;What I mean to say is that the Traversibility Filters for your trace should look the same as your Subnetwork.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Are you expecting to trace "downstream" or "upstream" into another subnetwork?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2026 23:31:02 GMT</pubDate>
    <dc:creator>gis_KIWI4</dc:creator>
    <dc:date>2026-05-05T23:31:02Z</dc:date>
    <item>
      <title>Re: Downstream Trace Crossing into Another Subnetwork and Failing with ERROR 001890</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/re-downstream-trace-crossing-into-another/m-p/1699253#M6783</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/138089"&gt;@RobertKrisher&lt;/a&gt;&amp;nbsp;Some time has passed, and I was able to solve the issue with a different approach. I developed a script that automatically places a &lt;STRONG&gt;barrier&lt;/STRONG&gt; whenever the trace reaches a &lt;STRONG&gt;Subnetwork Controller&lt;/STRONG&gt; point.&amp;nbsp;&lt;SPAN&gt;This script now works exactly as I wanted within the &lt;/SPAN&gt;&lt;STRONG&gt;ArcGIS Pro interface&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import re

# ------------------------------------------------------------
# URL 
# ------------------------------------------------------------
utility_network = "https://---/server/rest/services/Trace/FeatureServer/8"

# Starting Points  - FeatureServer/0
starting_points = "https://---/server/rest/services/Start_Points/FeatureServer/0"

# Barriers  - FeatureServer/1
barriers = "https://---/server/rest/services/Start_Points/FeatureServer/1"

# Electric Device (Subnetwork Controller) - FeatureServer/0
controller_fc = "https://---/server/rest/services/Trace/FeatureServer/0"

# ------------------------------------------------------------
# CLEAR BARRIER
# ------------------------------------------------------------
print("Clear Barrier")

with arcpy.da.UpdateCursor(barriers, ["OBJECTID"]) as cur:
    for row in cur:
        cur.deleteRow()

print("Barrier Cleared")

# ------------------------------------------------------------
# GET STARTING POINT GUID
# ------------------------------------------------------------
start_guid = None
with arcpy.da.SearchCursor(starting_points, ["FEATUREGLOBALID"]) as cur:
    for row in cur:
        start_guid = row[0]
        break

if not start_guid:
    raise Exception("No starting point found.")

print("Starting GUID :", start_guid)

# ------------------------------------------------------------
# TRACE
# ------------------------------------------------------------
def run_trace():
    arcpy.un.Trace(
        in_utility_network=utility_network,
        starting_points=starting_points,
        barriers=barriers,
        trace_config_name="{31407091-970B-4B14-BF68-F8C25B1349D6}",
        related_record_fields=None,
        result_fields=None   
    )

# ------------------------------------------------------------
# GUID -&amp;gt; OBJECTID 
# ------------------------------------------------------------
def get_objectid_from_guid(guid_value):
    guid_clean = guid_value.replace("{", "").replace("}", "")
    where = f"GLOBALID = '{{{guid_clean}}}'"

    with arcpy.da.SearchCursor(controller_fc, ["OBJECTID"], where) as cur:
        for row in cur:
            return row[0]
    return None

# ------------------------------------------------------------
# BARRIER INSERT
# ------------------------------------------------------------
def insert_barrier(target_guid):
    oid = get_objectid_from_guid(target_guid)

    if oid is None:
        raise Exception("OBJECTID bulunamadi.")

    fields = [
        "FEATUREOID",
        "FEATUREGLOBALID",
        "LAYERID",
        "SOURCEID",
        "ASSETGROUPCODE",
        "ASSETTYPE",
        "TERMINALID",
        "PERCENTALONG",
        "ISFILTERBARRIER"
    ]

    values = [
        oid,
        target_guid,
        200,
        9,
        85,
        363,
        4,
        -1,
        0
    ]

    with arcpy.da.InsertCursor(barriers, fields) as icur:
        icur.insertRow(values)

    print("Barrier added", target_guid)

# ------------------------------------------------------------
# 
# ------------------------------------------------------------
try:
    print("The first trace is being tested...")
    run_trace()
    print("Trace successful.")

except arcpy.ExecuteError:
    msg = arcpy.GetMessages(2)
    print(msg)

    if "multiple subnetwork controllers" in msg.lower():
        guids = re.findall(r'\{[0-9A-Fa-f\-]{36}\}', msg)

        if len(guids) &amp;lt; 2:
            raise Exception("GUID not found.")

        start_guid_clean = "{" + str(start_guid).replace("{", "").replace("}", "") + "}"

        other_guid = None
        for g in guids:
            if g.upper() != start_guid_clean.upper():
                other_guid = g
                break

        if not other_guid:
            raise Exception(" controller GUID not found.")

        print("Barrier adding:", other_guid)
        insert_barrier(other_guid)

        print("Trace is working again...")
        run_trace()
        print("Trace successful")

    else:
        raise Exception("Unexpected Trace error: " + str(msg))

print("\n=== TRANSACTION COMPLETE ===")&lt;/LI-CODE&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I would like to ask for guidance about a Utility Network trace automation workflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A user places a &lt;STRONG&gt;starting point&lt;/STRONG&gt; on the map.&lt;/LI&gt;&lt;LI&gt;The script runs a &lt;STRONG&gt;Trace&lt;/STRONG&gt; operation.&lt;/LI&gt;&lt;LI&gt;If the trace returns the following error:&lt;/LI&gt;&lt;/OL&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN&gt;ERROR 001890: Invalid subnetwork connectivity, multiple subnetwork controllers with different subnetwork names found.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;The script reads the error message and extracts the two GlobalIDs listed in the message.&lt;/LI&gt;&lt;LI&gt;It compares them with the starting point GlobalID.&lt;/LI&gt;&lt;LI&gt;It automatically creates a &lt;STRONG&gt;barrier point&lt;/STRONG&gt; on the &lt;EM&gt;other&lt;/EM&gt; GlobalID (not the starting point).&lt;/LI&gt;&lt;LI&gt;The same trace is executed again.&lt;/LI&gt;&lt;LI&gt;On the second run, the trace completes successfully without error.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;So overall, the script acts as an automatic workaround for controller conflicts and it runs correctly inside ArcGIS Pro.&lt;/P&gt;&lt;H2&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;My Problem&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H2&gt;&lt;P&gt;I now want to publish this script as a &lt;STRONG&gt;Geoprocessing Tool / Share as Web Tool&lt;/STRONG&gt; so I can use it inside &lt;STRONG&gt;Experience Builder&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;However, during publishing I receive this error:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN&gt;at the server version 11.5 the related record fields parameters position in the parameter set has changed&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;According to Esri documentation, &lt;STRONG&gt;related_record_fields&lt;/STRONG&gt; is not a required parameter. I still explicitly added that parameter in the script, but the publishing error remains.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;H2&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;My Goal&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H2&gt;&lt;P&gt;My final goal is to run this custom trace logic inside &lt;STRONG&gt;Experience Builder&lt;/STRONG&gt; through a Geoprocessing widget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT size="3"&gt;My Questions&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is publishing a Python script with arcpy.un.Trace() as a Web Tool the correct architecture for this scenario?&lt;/LI&gt;&lt;LI&gt;Is there a better approach for Experience Builder (for example calling the Utility Network REST trace endpoint directly)?&lt;/LI&gt;&lt;LI&gt;Has anyone seen this publishing error with ArcGIS Enterprise 11.5 and Utility Network trace tools?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any guidance would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnGoat_0-1777550709877.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151773i33B84F274B659C1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnGoat_0-1777550709877.png" alt="JohnGoat_0-1777550709877.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Apr 2026 12:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/re-downstream-trace-crossing-into-another/m-p/1699253#M6783</guid>
      <dc:creator>JohnGoat</dc:creator>
      <dc:date>2026-04-30T12:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Downstream Trace Crossing into Another Subnetwork and Failing with ERROR 001890</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/re-downstream-trace-crossing-into-another/m-p/1700258#M6798</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/633735"&gt;@JohnGoat&lt;/a&gt;- Unless you need some python-only processing a better long term solution is to create a custom trace widget in ExB. While python approach is simpler to develop, if you want your users to use it you have to account for authentication, context and handling outputs. Python scripts work well in ArcGIS Pro but in the context of web maps they are slightly harder to implement.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;example -&amp;nbsp;Web map interaction isn't straight forward, you cannot send a selection directly as a starting point/barrier in the python script but you can with a custom ExB Widget.&lt;BR /&gt;&lt;BR /&gt;While I don't know the in's and out's of your scenario, I can't help but wonder if a named trace configuration would work?&lt;BR /&gt;&lt;BR /&gt;If your trace config is a downstream or upstream (or any subnetwork based trace) then it's going to be bound by the Subnetwork.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;PRE&gt;trace_config_name="{31407091-970B-4B14-BF68-F8C25B1349D6}"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;What I mean to say is that the Traversibility Filters for your trace should look the same as your Subnetwork.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Are you expecting to trace "downstream" or "upstream" into another subnetwork?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 23:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/re-downstream-trace-crossing-into-another/m-p/1700258#M6798</guid>
      <dc:creator>gis_KIWI4</dc:creator>
      <dc:date>2026-05-05T23:31:02Z</dc:date>
    </item>
  </channel>
</rss>

