we are developing an app that supports editing on offline maps. We are using *.geodatabase FeatureLayers and *.tpks.
However , in offline mode, i found no possibility to enable a "transaction mode" with a rollback to multiple edit operations. After adding, deleting or editing the features, the "commit" has to be done for each operation separately. That means if Add and Delete is done well, and Update fails, a correct rollback is not possible.
this.ArcFeatureTable.DeleteFeaturesAsync( List<Feature> flist );
this.ArcFeatureTable.UpdateFeaturesAsync( List<Feature> flist );
Further more, how do i know that all features have been added/deleted/updated correctly at all? What is the ResultObject / callback?
I tried (in ArcGISRuntime 10.2.5 ) to delete a list with three features in ftable.DeleteAsync(oids) (with oids is a List<long> containing three objectIds , two of them exist in the database). Two objects were deleted without telling me that the third one does not exist.
In ArcgisRuntime SDK for WPF there exists:
What are the corresponding methods in ArcGIS Runtime .NET 10.2.5 - 10.2.7 and further more in ArcGISRuntime .NET 100.0.0 ?
In current released version v100, you can use GeodatabaseSyncTask.SyncGeodatabase to push your geodatabase edits back to the server, and for its parameters, specify RollbackOnFailure.
If there were any failure on server, you will get this value in the EditResults
var task = await GeodatabaseSyncTask.CreateAsync(new Uri(featureServerUrl));
var parameters = await task.CreateDefaultSyncGeodatabaseParametersAsync(geodatabase);
var job = task.SyncGeodatabase(parameters, geodatabase);
var syncLayerResults = await job.GetResultAsync();
foreach (var result in syncLayerResults)
foreach (var editResult in result.EditResults)
Offline map task and Offline map sync task are coming in Update 1.
The new offline functionality isn't going to help with this issue. I think that this is very important workflow but unfortunately we don't have a proper support for this in current API. Could you provide more details on the use case so I can take that forward to the product group. The more details you can share of your workflow and use case you can provide, would help me to argue to get the proper support in easier for me. If you cannot or want to share this publicly you can send it to me to firstname.lastname@example.org.
I'll have a look if there is a good way to implement this with the current API but I think that is going to involve quite a bit of code.