Realign Route appears to ignore Attribute Rules

1359
3
Jump to solution
11-01-2022 10:03 PM
GraemeBrowning_Aurizon
Occasional Contributor II

Before looking at the complex example in the spoiler below, I think you should review the simpler example at Extend Route not running Attribute Rules - Esri Community first because I think both will have the same underlying cause.

 

Spoiler

I am using ArcGIS Pro 3.0.2, ArcGIS Enterprise 11 (SQL Server) and ArcGIS Roads and Highways.

In the picture below I have a route named CC-TEST_0095KM which is labelled using its line name (CC-TEST).  I have digitized a centerline which I am going to use to realign CC-TEST_0095KM to be a straight line.

GraemeBrowning_Aurizon_0-1667364056947.png

To do that I use Realign Route:

GraemeBrowning_Aurizon_1-1667364257373.png

and I get this result which looks like it has the correct measures on both the abandoned and realigned routes:

GraemeBrowning_Aurizon_2-1667364331713.png

My LRS data has about 10 Attribute Rules set up with an Insert trigger to calculate among other things a Length field.  I do not use an Update trigger as well because when I have tried that I get various errors from editing which has led me to believe that Location Referencing does not like them.  When I looked at the rows for the above routes in the Attribute Table I noticed that Length was the same for both the abandoned and realigned routes:

GraemeBrowning_Aurizon_3-1667364584352.png

The SHAPE.STLength() field looks like the right values (which are in decimal degrees).

It's like the fields have been copied from the abandoned route to the realigned one, perhaps after the Attribute Rule triggers were run.

These are the Arcade expressions I use on my Attribute Rules for START_M, END_M and Length respectively:

 

return Geometry($feature).paths[0][0].m;
return Geometry($feature).paths[-1][-1].m;
return $feature.END_M - $feature.START_M;

 

 

 

 

 

Is there a way that I can get my Attribute Rules to run correctly when Realign Route is run on data like mine?

They seem to have run correctly in tests of all other Location Referencing tools so far.

A second Realign Routes test is illustrated below:

GraemeBrowning_Aurizon_0-1667367332465.png

For that I get this result.  

GraemeBrowning_Aurizon_1-1667367494537.png

The Length of the abandoned route is 900m which is what I would expect because I realigned from 100m to 1,000m.  However, the realigned route is 1,146m which is the same as the original route rather than its new Length.  Once again, the measures on the map look like they are being set correctly and it is the extra fields, that Attribute Rules are supposed to maintain, which appear not to be doing their job correctly.

A third Realign Routes test is illustrated below:

GraemeBrowning_Aurizon_0-1667450036130.png

The Length of the abandoned route is 494m which is what I would expect.  However, the realigned route is 1,094m which is the same as the original route rather than its expected new Length of 1,124m.  Once again, the measures on the map look like they are being set correctly and it is the extra fields, that Attribute Rules are supposed to maintain, which appear not to be doing their job correctly.

 

 

0 Kudos
1 Solution

Accepted Solutions
AyanPalit
Esri Regular Contributor

@GraemeBrowning_Aurizon Please confirm that the AR is triggered on INSERT and UPDATE parameters for triggering_events as in Add Attribute Rule

Ayan Palit | Principal Consultant Esri

View solution in original post

0 Kudos
3 Replies
AyanPalit
Esri Regular Contributor

@GraemeBrowning_Aurizon Please confirm that the AR is triggered on INSERT and UPDATE parameters for triggering_events as in Add Attribute Rule

Ayan Palit | Principal Consultant Esri
0 Kudos
GraemeBrowning_Aurizon
Occasional Contributor II

After ensuring that my Attribute Rule triggers were all set to INSERT+UPDATE in a new Enterprise Geodatabase I ran similar tests to those in my original post and the results are now what I was hoping for!

GraemeBrowning_Aurizon
Occasional Contributor II

@AyanPalit I initially had my Attribute Rules triggered on both INSERT and UPDATE but I kept getting errors (I'll need to set that again to obtain details) so I switched to just INSERT and when the error in this thread is seen it is only INSERT that will have been in place.

I've had had trouble modifying my Attribute Rules when my LRS is in the Enterprise Geodatabase so I have been setting them on the File Geodatabase that I migrate there using an ArcPy script.

I'll try changing them to INSERT and UPDATE first through the GUI, and then through my script to see if that resolves this error.  If I encounter others by doing that I'll report them separately.

0 Kudos