AnsweredAssumed Answered

How to register a runtime geodatabase with a feature service?

Question asked by paul.haakma on Jul 13, 2016
Latest reply on Jul 19, 2016 by NManocha-esristaff

Hi - am hoping someone can shed some light on how this workflow can be made to work...

 

Ideally, I want to be able to generate an offline runtime geodatabase (either through arcmap or via an app), then take that file and distribute across many different users, allowing them to then continue editing and synchonizing two way. The documentation says ‘You must unregister the geodatabase to share it.’

 

I generated a geodatabase with an app, then tested the geodatabasesynctask.unregisterGeodatabase method and I can see via the rest services that it has removed the corresponding replica in that feature service. The documentation suggests that you can call registerGeodatabase to register it and sync it again.

 

I try that, and get an error message:  Unable to complete operation. Code= 404 Replica with GUID ({08A584D7-A88D-468B-ADA6-045B7809D7A8}) does not exists on the server.

 

I think I’m missing something in the workflow here?

 

 

https://developers.arcgis.com/qt/qml/api-reference/class_geodatabase_sync_task.html

 

 

GeodatabaseSyncTask::unregisterGeodatabase

(

Geodatabase

geodatabase

)

Unregisters the local geodatabase from the service.

You must unregister the geodatabase to share it. Re-register the unregistered geodatabase before using it again by calling registerGeodatabase().

When the geodatabase is unregistered from the service, any local edits are lost and no further syncs can be made until the geodatabase is registered.

 

GeodatabaseSyncTask::registerGeodatabase

(

Geodatabase

geodatabase

)

Registers the local geodatabase with the service.

This method registers a geodatabase so that it can be used to sync edits with an ArcGIS service. The property Geodatabase.isSyncEnabled must be true for successful registration.

This method emits the geodatabaseStatusChanged() signal. Use the GeodatabaseSyncStatusInfo with GeodatabaseSyncStatusInfo.status property to determine when the geodatabase registration completes.

Outcomes