In an offline workflow we have a requirement that if a row was updated both on the server and on the client side, the server's representation should prevail (server wins scenario). However, when I start a sync job with SyncDirection set to Bidirectional, the local changes will be uploaded first and overwrite the updates on the server row. On the other hand, when I set SyncDirection to Download (to get updated rows from the server first), the locally modified row will not be updated with the server's modified data. Instead, a SyncLayerResult is returned for the affected table with an error entry for the conflicting row:
Service error code 3070: Update failure. There are pending edits on the feature. This feature will not be synchronized.
This error seems to indicate a conflict (not a lock e.g. by a pending edit session). What would be the best approach to integrate the server's updates and overwrite any local updates in case of conflicts? I haven't found any conflict resolution settings in the Esri.ArcGISRuntime.Tasks.Offline namespace, such as a FavorClient/FavorServer switch. I thought about keeping the downloaded delta geodatabase, in case of errors retrieving the affected features from there and applying the updates to the local geodatabase one by one. But I was wondering if there is a more convenient way or better support for such scenarios in the SDK.
By the way, I am presently working with Runtime 100.15 but will soon upgrade to 200.x. Our data is not registered as versioned but with geodatabase archiving enabled.