EnableNetworkTopology fails with "Domain does not exist"

602
6
04-29-2020 07:50 PM
NeilEtheridge
New Contributor III

I am working on a UN implementation project and we recently made the move to Pro 2.5 and UNTools 2.5.  After deploying an asset package, we are now hitting an issue with EnableNetworkTopology where is fails with the message "Domain does not exist" ... 

It took quite a bit of working out what this meant but I finally tracked it back where one of the asset groups in "StructureJunction" does not have its asset type domain assigned.

The domain is present in geodatabase and can be manually assigned.  Although trying to save after assigning gives a 999999 error.  Saving a second time usually does the trick and makes it stick.  After this the EnableNetworkTopology is able to be rerun and completes successfully.

Saving error:

I have checked the source asset package (shown below) and the Domain is correctly assigned.

The issue appears to be with the deployment of the asset package using the tool arcpy.pt.AssetPackageToUtilityNetwork.  No errors are reported to the log however.  This was not an issue with UNTools 2.4

Has anyone come across something similar?

I have attached the UNTools log for anyone wanting a deeper look.

Many thanks,

Neil

0 Kudos
6 Replies
PaulLeBlanc1
Esri Contributor

That's the only domain that was not assigned? There could be something conflicting with the field definition and default values. If apply asset package always fails to assign this domain, then I'd like to take a closer look at the schema.

At Pro 2.6, we've fixed the error message on enable and you'll now get something like:
 ERROR 003077: All network feature classes must have attribute domains assigned on the Asset type field for each subtype (Asset group). [ElectricDistributionDevice - test]
 Failed to execute (EnableNetworkTopology).

0 Kudos
KoyaBrown2
New Contributor II

Is there any documentation on resolving this issue? Or setting up the subtypes and domains specifically for the Utility Network? EnableNetworkTopology seems to only work when using default unknown or an asset package that hasn't been modified. 

0 Kudos
PaulLeBlanc1
Esri Contributor
0 Kudos
NeilEtheridge
New Contributor III

Thanks for the response Paul.  Our last project sprint this was the only domain not assigned, this sprint the same domain is still not assigned and there is now a second domain not assigned - this one on StructureBoundary which was ok last time but this time round it has data in it (which it did not in the previous sprint).  I've looked for any issues with the field type and default values but everything seems to check out - I would expect it should though given the asset package has the domains assigned correctly.  I've also taken a look at the data in these tables in case there is a conflict but again I couldn't see anything that misaligned with the domains.  

0 Kudos
NeilEtheridge
New Contributor III

I have been trying to narrow down at what stage the domains get assigned so I was monitoring the StructureJunction XML definition in the database throughout the AssetPackageToUtilityNetwork execution and found something I wasn't expecting to ... the domain does get assigned and then later on it is removed.  In reference to the attached log ... at 18:45 the definition of the ElectricWaterCrossing subtype looked like this (note at line 7 the domain is assigned):

<Subtype xsi:type="typens:Subtype">
      <SubtypeName>Electric Water Crossing</SubtypeName>
      <SubtypeCode>271</SubtypeCode>
      <FieldInfos xsi:type="typens:ArrayOfSubtypeFieldInfo">
        <SubtypeFieldInfo xsi:type="typens:SubtypeFieldInfo">
          <FieldName>ASSETTYPE</FieldName>
          <DomainName>6_AssetType_StructureJunction_ElectricWaterCrossing</DomainName>
          <DefaultValue xsi:nil="true" />
        </SubtypeFieldInfo>
        <SubtypeFieldInfo xsi:type="typens:SubtypeFieldInfo">
          <FieldName>ASSOCIATIONSTATUS</FieldName>
          <DomainName>EQL_6_AssociationStatus</DomainName>
          <DefaultValue xsi:type="xs:short">0</DefaultValue>
        </SubtypeFieldInfo>
        <SubtypeFieldInfo xsi:type="typens:SubtypeFieldInfo">
          <FieldName>SUBNETWORKNAME</FieldName>
          <DomainName />
          <DefaultValue xsi:type="xs:string">Unknown</DefaultValue>
        </SubtypeFieldInfo>
      </FieldInfos>
    </Subtype>
  </Subtypes>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

At 18:56 it is still assigned.  However by 18:58 the domain has been removed:

<Subtype xsi:type="typens:Subtype">
      <SubtypeName>Electric Water Crossing</SubtypeName>
      <SubtypeCode>271</SubtypeCode>
      <FieldInfos xsi:type="typens:ArrayOfSubtypeFieldInfo">
        <SubtypeFieldInfo xsi:type="typens:SubtypeFieldInfo">
          <FieldName>ASSETTYPE</FieldName>
          <DomainName />
          <DefaultValue xsi:nil="true" />
        </SubtypeFieldInfo>
        <SubtypeFieldInfo xsi:type="typens:SubtypeFieldInfo">
          <FieldName>ASSOCIATIONSTATUS</FieldName>
          <DomainName>EQL_6_AssociationStatus</DomainName>
          <DefaultValue xsi:type="xs:short">0</DefaultValue>
        </SubtypeFieldInfo>
        <SubtypeFieldInfo xsi:type="typens:SubtypeFieldInfo">
          <FieldName>SUBNETWORKNAME</FieldName>
          <DomainName />
          <DefaultValue xsi:type="xs:string">Unknown</DefaultValue>
        </SubtypeFieldInfo>
      </FieldInfos>
    </Subtype>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Here is an excerpt from the log:

2020-05-06 18:57:17     ...SetSubnetworkDefinition (48/121)
2020-05-06 18:57:28     Start Time: Wednesday, 6 May 2020 6:57:19 PM
Succeeded at Wednesday, 6 May 2020 6:57:24 PM (Elapsed Time: 4.52 seconds)
2020-05-06 18:57:28     ...SetSubnetworkDefinition (49/121)
2020-05-06 18:57:40     Start Time: Wednesday, 6 May 2020 6:57:31 PM
Succeeded at Wednesday, 6 May 2020 6:57:36 PM (Elapsed Time: 4.49 seconds)
2020-05-06 18:57:40     ...SetSubnetworkDefinition (50/121)
2020-05-06 18:57:51     Start Time: Wednesday, 6 May 2020 6:57:43 PM
Succeeded at Wednesday, 6 May 2020 6:57:47 PM (Elapsed Time: 4.62 seconds)
2020-05-06 18:57:51     ImportRules (14/24)
2020-05-06 18:57:51     ...ImportRules (51/121)
2020-05-06 18:58:07     Start Time: Wednesday, 6 May 2020 6:57:53 PM
Succeeded at Wednesday, 6 May 2020 6:58:03 PM (Elapsed Time: 9.65 seconds)
2020-05-06 18:58:07     DisableEditorTracking (15/24)
2020-05-06 18:58:07     ...DisableEditorTracking (52/121)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Could ImportRules be causing this?  Seems like an unlikely candidate.

0 Kudos
NeilEtheridge
New Contributor III

I tested using untools v2.5.1 but the result was the same.  While doing this test though with a different asset package, which has the same UN definition but different data - this one had no data in one of the problem Asset Groups - the domain successfully applied to that Asset Group.  Based on this I tried loading with the SCHEMA_ONLY option and all domains successfully loaded.

0 Kudos