We are developing an add-in for ArcGIS Pro 2.6.4 to update Utility Network features. The add-in uses a Feature Service to update the Enterprise geodatabase (ArcGIS Enterprise 10.8.1, Utility Network Communications Data Management v1 geodatabse in SQL Server). The logic we are trying to implement in the add-in conflicts with the logic of features' creation that was implemented in the Attribute Rules. We would like to disable selected Attribute Rules for duration of the update transaction. Is it possible to disable an attribute rule temporarily (in a session) using a feature service API?
There are GP tools to enable/disable Attribute Rules in the Attribute Rules toolset. However, we have observed that disabling / altering an attribute rule using GP tools has the geodatabase scope and requires an exclusive lock on the dataset. Any active connections to the dataset should be closed and disabling requires stopping of the feature services. Hence we cannot use the provided GP tools for our use case.
PS: I do understand that Attribute Rules were invented to address consistency and integrity of the data concerns. The challenge is that attribute rules can also be used to automate editing of data in Pro thus enforcing only certain logic/ order of data editing steps. Hence it would be desirable to bypass / disable certain Attribute rules at runtime via API in add-ins that implement a different logic of editing features & relationships.