Arcade Rule Fail in One EGDB but Work in Other EGDB

254
0
08-12-2020 07:36 PM
Billy
by
Occasional Contributor II

Hi,

Here are details of the different utility network environments I have set up:

  * Electric Asset Package 3.4, deployed in SQL Server 2017 with sample data. The ArcGis Enterprise was 10.8, ArcGis Pro 2.5.2 and utility network version 3. I WILL CALL THIS SAMPLE ENVIRONMENT.

 * Electric Asset Package 3.3, deployed in SQL Server 2017 as schema-only and spatial reference changed to our location. The ArcGis Enterprise was 10.8, ArcGis Pro 2.5.2 and utility network version 3. After the deployment additional configuration was done to the UN, like: adding field, domains, asset_types and 2 editing versions. I WILL CALL THIS THE DEVELOPMENT ENVIRONMENT.

 * Electric Asset Package 3.4, deployed in SQL Server 2017 as schema-only and spatial reference changed to our location. The ArcGis Enterprise was 10.8, ArcGis Pro 2.5.2 and utility network version 3. After the deployment additional configuration was done to the UN, like: adding field, domains, asset_types and 1 editing versions. I WILL CALL THIS THE PRODUCTION ENVIRONMENT.

When Pro 2.6 was pushed at the end of July, I updated my Pro client. Then with the Pro 2.6 client, I exported the Asset Package of the PRODUCTION ENVIRONMENT and deployed in a File Geodatabase (FGDB). When I check the Utility Network Properties the Utility Network version is 4. I WILL CALL THIS THE TEST ENVIRONMENT.

NOW THIS IS THE PROBLEM:

I created and successfully tested an Arcade rule in the TEST ENVIRONMENT. The rule is assigned to the StructureJunction/Electric Medium Voltage Pole. The rule returns a dictionary that updates some fields of the Electric Medium Voltage Pole feature, adds records to the related table JointUse and adds one or more feature to the ElectricDevice/Low Voltage Light. The pictures show the attribute rule window and the dictionary returned bye the rule.

Then I tried to the rule in the PRODUCTION ENVIRONMENT after changing the classNames with EGDB reference name. The rule failed with this error message:

The rule was also tested in the DEVELOPMENT ENVIRONMENT with the same result, but the error message was a little different, this is from the ArcGis Server Manager Log:

I tried returning only part of the dictionary and I found that the rule only failed when the returned dictionary has the section that adds the Street Light and Flood Light to the ElectricDevice class, as you can see above in the picture with the returned dictionary.

After identifying that the error is trigger when adding to the ElectricDevice class, I decided to test a simpler rule in the 3 EGDB environments (SAMPLE, DEVELOPMENT and PRODUCTION). The simpler rule failed, with the same error message as shown above, in all but the SAMPLE ENVIRONMENT. Here is the code of the tested rule, in every case the claseName was changed to match the database:

//low voltage pole geometry
var featureGeo = Geometry($feature)

//create the geometry for the street light
var slGeo1 = Point({'x': featureGeo.x + 8, 'y': featureGeo.y + 8, 'z': 0, 'spatialReference': featureGeo.spatialReference})


return {
'result': 'processed',
'edit':[{
'className': 'UN_PMLP_V34.UNPMLPV34.ElectricDevice',
'adds':[{
'attributes': {
'AssetGroup': 16,
'AssetType': 302,
},
'geometry': slGeo1,
'associationType': 'attached'
}]
}]
}

After calling Esri's Tech Support, I received the recommendation to upgrade all the clients to the correct version to comply with the requirement of this link: Utility network dataset administration—ArcGIS Pro | Documentation and this table:

After 2 days of upgrades and calls to tech support, ArcGis Enterprise was upgraded to 10.8.1, the geodatabases for the DEVELOPMENT and PRODUCTION ENVIRONMENT were upgraded, as well as the corresponding Utility Network Datasets, to version 4, in both environments. Additionally the utility networks in both environment were publish under new names, because the original services couldn't be re-started after they were stop to upgrade the Utility Network Dataset. At the end of all this, the rule error persist in both environment (DEVELOPMENT and PRODUCTION) and the rule works in the SAMPLE ENVIRONMENT, even when the Utility Network Dataset was not updated to version 4.

The log of the Arcgis Server Manager has this report. It makes a reference to line 11 of the Script, but the is no code on line 11 of the Script.

Esri's Tech Support has a copy of the exported Asset Package and SQL Database of the PRODUCTION ENVIRONMENT.

0 Kudos
0 Replies