There's this GIS Stackexchange thread talking about how instead of implementing a trigger on the A&D tables, do it on the versioned view (ie. <TABLE_NAME_EVW>):
editing - ArcSDE 10.1 Insert/Update Trigger on Adds (A) Table (Oracle 11g) and Feature Services on A...
I have yet to try this, but I will verify it because I'm surprised they were able to write to a view (I thought it was read-only, per Oracle):
CREATE TRIGGER
INSTEAD OF Triggers
INSTEAD
OF
triggers are valid only for views. You cannot specify an INSTEAD
OF
trigger on a table.
You can read both the :OLD
and the :NEW
value, but you cannot write either the :OLD
or the :NEW
value.
In that article, they have lots of good points, including:
Invoking the trigger via the Feature Service query endpoint (https://<machine.domain.com>/webadaptor/rest/services/<folder>/<serviceName>/FeatureServer/0/query) via a web edit post API call.
They mention that if the Geodatabase Version Name parameter is not specified, edits are made to published map's version.
They also mention a cool way to use python to generate unique GUID's similar to Global IDs:
How To: Calculate unique identifier values similar to Global IDs
I believe I ran into your same question on GIS StackEchange as well:
enterprise geodatabase - How to Create 'Update Triggers' to Track Field Values Changes When Data is ...
I did find an Esri documentation saying its ok to grant privileges to a user both on the base table and directly on the versioned view of the table (ie. <TABLE_NAME_EVW>), but that is indeed different than writing to the view:
Privileges for geodatabases in Oracle—Help | ArcGIS Desktop
If the user will be editing versioned data through a versioned view, the user must also be granted SELECT, INSERT, UPDATE, and DELETE privileges on the versioned view.
When you use the Privileges dialog box in ArcGIS to grant the SELECT, INSERT, UPDATE, and DELETE privileges on a versioned feature class, those privileges are automatically granted on the associated versioned view.
Another Esri documentation explains editing versioned views, which I believe applies to update triggers which edit record columns as well:
An overview of editing versioned data using SQL—Help | ArcGIS Desktop
Edit versioned data in Oracle using SQL—Help | ArcGIS Desktop
To edit versioned data from a SQL client, you must edit a versioned view of the data, not the base (business) table itself.
Editing the base table directly could lead to orphaned records and data loss.