Skip to main content
Released

Update Geodatabase Reader to support Feature Classes with Attribute Rules

Related products:Integrations

langdonms
Contributor

Esri has new functionality called "Attribute Rules" which store trigger-like behavior in the XML of a feature class with customizable functions. For example, a new asset ID number can be assigned automatically while editing features. As it's stored in the database not at the project level, it is portable and the functionality also persists over published editable web services. Unfortunately, there is no backwards compatibility and the feature classes are no longer viewable in ArcMap or ArcCatalog when these rules are created. It also appears that the FME geodatabase reader is unable to consume these feature classes when the new functionality enabled.


Documentation:

https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-attribute-rules.htm

Esri Video on Attribute Rules

https://www.youtube.com/watch?v=-2W1H0xr90o


The rules seem to be stored in the sde.gdb_items table of the database and more specifically in the "definition" XML type field of the feature class row. I created an attribute rule and sequence following this tutorial that adds an asset ID based on an auto-incrementing sequence I named curbseq_agspro to new features. The following XML was appended to the feature class definition XML after using the esri geoprocessing tools:


<AttributeRules xsi:type='typens:ArrayOfAttributeRule'><AttributeRule xsi:type='typens:AttributeRule'><ID>3</ID><Name>AssetMgmtLinkID_Txt</Name><Type>esriARTCalculation</Type><EvaluationOrder>1</EvaluationOrder><FieldName>astmgmtlinkid</FieldName><SubtypeCode>-1</SubtypeCode><Description>Update the Asset Mgmt Link ID field with the next sequence value from curbseq_agspro.</Description><ErrorNumber>-1</ErrorNumber><ErrorMessage></ErrorMessage><UserEditable>true</UserEditable><IsEnabled>true</IsEnabled><ReferencesExternalService>false</ReferencesExternalService><ExcludeFromClientEvaluation>false</ExcludeFromClientEvaluation><ScriptExpression>var assetfield = $feature.astmgmtlinkid; IIF(IsEmpty(assetfield), Text(NextSequenceValue(&quot;curbseq_agspro&quot;)), assetfield);</ScriptExpression><TriggeringEvents xsi:type='typens:ArrayOfString'><String>esriARTEInsert</String><String>esriARTEUpdate</String></TriggeringEvents><CheckParameters xsi:type='typens:PropertySet'><PropertyArray xsi:type='typens:ArrayOfPropertySetProperty'></PropertyArray></CheckParameters><Category>-1</Category><Severity>-1</Severity><Tags>Asset ID</Tags><Batch>false</Batch><RequiredGeodatabaseClientVersion>12.3</RequiredGeodatabaseClientVersion><CreationTime>2020-01-06T21:34:00</CreationTime></AttributeRule></AttributeRules>


It would be great if FME could read / write features with this functionality as it's a highly useful ability now to create these rules in an Esri supported manner rather than customized database triggers and I foresee their use expanding among customers.


Here is a .gif animation showing the rule in action on ArcGIS Online. Notice the assetid_attrule field is automatically updated with a new value (after I pan/zoom to refresh the data).

8 replies

bruceharold
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 9, 2020

This begs the question about leveraging rules (i.e Arcade) during Workbench processing, or risk breaking some business rules. Not trivial.


langdonms
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • January 10, 2020

Thanks for reading and your contribution @bruceharold I see you are on the Interoperability Team at Esri. The most important first step would be for FME to successfully read these features and copy them, not necessarily leverage the rules during processing.

 

 

As of today, feature classes with Attribute Rules cannot be read by ArcCatalog or ArcMap or FME. Additionally Esri geodatabase replication tools are not available yet in ArcGIS Pro so these databases can only be copied successfully with ArcGIS Pro resulting in a pseudo quarantine of data access. I am working to get around this by publishing a REST service of the data and have FME read that service to copy.

 

Our use case for this FME feature is to support this structure: Edit database -->one-way-replication--> Published database --> Web Services / Read Users. The Copy Features GP tool in pro will copy successfully and it abandons attribute rules in the process (which is fine for our use case) - this is also documented in the Esri Dev summit video. Our published database does not need any attribute rules as it is read-only in function.


bruceharold
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 10, 2020

Hi, replication is back at Pro 2.5 due out shortly so you should be able to use core tools for publishing.

And yes, I'm on the DI 'team', which is a slight stretch for the term ;-).


Forum|alt.badge.img
  • February 15, 2022

Hello,

 

2 years later, any update on supporting reading/writing features from an SDE feature class with attribute rules configured ?

Is there any version available that support this request ? I can't see anything in changelog unfortunately :(

 

If not, any ETA ? It's preventing us from using these powerful attributes rules.

 

Thanks !


trentatsafe
Safer
Forum|alt.badge.img+6
  • Safer
  • February 15, 2022

Hello @biboba​ 

I think this should be supported now, we added support to be able to read from or write to an SDE Feature class with attribute rules configured. I believe this should be available as of 2020.1(can test with 2021 to confirm). The one caveat is you need to ensure you have ArcGIS Pro Installed on the machine with FME.

 

If you test this and are still experiencing issues, would you mind submitting a case here please: https://community.safe.com/s/submit-case


Forum|alt.badge.img
  • February 18, 2022

Hello @trentatsafe​ ,

 

Thanks for your reply ! Much appreciated.

Indeed, you are right !  Acutally, I had to switch "Esri ArcGIS Compatibility" to "Esri ArcGIS Pro" rather than "auto".

But I am still facing an issue: while I can add a feature class with attributes rules as reader, I cannot add the very same feature class as writer:

An error occurred while attempting to open the table, feature class or relationship class 'FOO.BAR'. The error number from ArcObjects is'-2147211773'. The error message from ArcObjects is: {The item does not have a definition.}
 
It could have failed to open because it contains ArcGIS Pro-only features, for example Arcade expressions. If this is the case, please install ArcGIS Pro or Pro-compatible ArcGIS Server and 64-bit FME

Was writing introduced as a second step ? 

I am running 2021.0.1.

 

I guess I will open a ticket as you suggest.

 

Thanks


trentatsafe
Safer
Forum|alt.badge.img+6
  • Safer
  • February 18, 2022

Hello @biboba​ 

This might be an issue tied to the esri library that loads when adding a reader/writer. If you have 64-bit Background Geoprocessing + ArcGIS Pro installed it may through a conflict when adding a writer. If you try uninstalling your 64-bit Background Geoprocessing, then re-launching FME and try adding the Writer for the Attribute Rule geodatabase. Does it still fail?

 

Probably best to file a case anyway just to be sure.


LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • April 5, 2025
OpenReleased

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings