Edit offline data on branch versioned feature service

184
6
2 weeks ago
ViktorSafar
Occasional Contributor II

For a project about management of nautical navigational elements, we are considering the following (branch) version structure

- operational elements 

- - project 1

- - project 2

- - project 3

.. - project N

Each project is its own version. The version will be created from the "operational elements" version when the project is started and posted when the project is complete. The project can be ongoing for months. (At this point we are unsure if the "operational elements" version will be the default version or inherit from it.)

One of the phases of the project is working offline (the data will be exposed on an offline-enabled Feature service.). We want to sync the version for the given project, make edits, and sync it back up to the given project version.

I went through a few documents and could not figure out if this will be possible. 

Eg. here it says
When workers synchronize, they download changes from the default version.

I don't want that - I want to download from a specific version.


GeodatabaseSyncTask CreateAsync(Uri) takes only a URL param

Here I learned that gdbVersion param can be set on the feature server URL - will this be honored by the sync task?

0 Kudos
6 Replies
JoeHershman
MVP Regular Contributor

First thing is that in branch version it is only a single level tree, unlike traditional versioning which could have multiple levels.  So in your description 'operational elements' would have to be default.

I have never done what you describe, usually when you define the service you indicate that it will either create versions when a offline replica is created, or it will not.  We generally use a model that we do not create versions when maps go offline and then sync back to default.  Looking at your link I am interested myself to know that if I use that parameter in the Url if I could take a branch that is not default offline.  That would be an interesting thing to be able to do in some of our workflows

Thanks,
-Joe
0 Kudos
TonyWakim
Esri Contributor

You can only create branch versions of the Default version, and not as children of branch versions other than Default.  The other thing is that when you create a replica version, that will be based on default version, and you can't base that on existing child versions.

When taking data offline, and if you have the "Create a version for each downloaded map" setting set on your service (see Work with offline maps and branch versioned data—ArcGIS Server | Documentation for ArcGIS Enterprise)  then that will create a replica version for each offline geodatabase created.

You won't be able to create an offline geodatabase based on an existing replica version other than Default. That said, there is nothing stopping you from creating one based on default, and then use it for an extended period of time to do offline editing and sync.  In the case of "Create a version for each downloaded map", this will sync edits to the replica version.  You can repeat the editing/sync steps as many times as you need, until you decide you are ready to reconcile/post with Default or discard your replica completely.

0 Kudos
ViktorSafar
Occasional Contributor II

Sorry, but just to make sure I understand:

What we wanted was that a project version would be created and edited online by one group of workers. This phase can takes months. Then we wanted to take this version offline for another set of workers, make edits, and sync back to the version. Then more online work follows. And then the version would be posted. Are you saying that will not be possible? 

0 Kudos
HaraldLund
New Contributor III

With the traditional versoning, we were able to create subversions, but we where stuck with the problem and nature of the Geodatabase service only could be set up pointing to a given version. Therefor we ended up with:

  1. Default - Protected
    1. PlanRoot - (GeodatabaseService pointing to this) 
      1. Project 1
      2. Project 2
      3. Project 3
      4. Project N

 

Each project had to be posted to Planroot, and the fieldworkers worked on their replica from Planroot.

My understanding of Branchversioning was that we now were able to work offline from a given version. I though you could checkout from a given version, but it this is not possible, this would be a draw back.


Edited:
But Change Version owner described here:
https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/branch-version-scenarios.ht...
will probably solve it, or have I misunderstood the documentation?

0 Kudos
JoeHershman
MVP Regular Contributor

To reiterate, in branch versioning there is only one level.  Default can have many children, but no grandchildren.  So your projects are created directly off Default, it is not possible to have the PlanRoot.

You are not describing how you take work offline (Field Maps, in-house app, etc.).

For what you describe, this should be possible.  But I have never tried, so this is theory.  If you create a branch version for a project you would then generate services that point to that version.  Your in-house or web editors would then use those services for editing.  You could then go offline with replicas created from that service.  The field changes would sync back to the version of the service.

For this process you would need a service (or set of services) for each version.  Every time you create a new project you will have to generate a set of services for that project.  If there are half a dozen projects this seems doable, if you have 100s of ongoing projects, it seems to me it would be difficult to manage.

Thanks,
-Joe
0 Kudos
TonyWakim
Esri Contributor

Branch versioning workflows (Branch version scenarios—ArcGIS Pro | Documentation) are not the same as traditional versioning workflows.  To edit a service that is based on branch versioned data you will first need to publish the service based on that data (https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/publish-branch-versioned-da... and make sure to enable the version management capability (Share branch versioned data—ArcGIS Pro | Documentation), which when editing in a connected environment, would give you the option to change the version you are connected to, and edit the service through that version.  In Native SDKs this capability is provided through the SwitchVersionAsync() method (Method SwitchVersionAsync (arcgis.com))

Viktor, going back to your questions: 

You should be able to create a branch version (child of default Default), and have users connect to it and edit it.  What you cannot do is take that specific branch version offline for editing.

Replica's created based on branch versioning are always based on default version.  From the doc (Work with offline maps and branch versioned data—ArcGIS Server | Documentation for ArcGIS Enterprise), "When the replica version is created, it references the current state of the default version."

One possible workaround would be to take you data offline (with service setting "Create a version for each downloaded map") as mentioned above; that will base your offline data from the Default version and create a branch version associated with it.  After this initial stage you can edit that branch version (that was automatically created for the offline data) in a connected environment, and if you choose you can edit the offline data when disconnected.  To get the offline data to see edits done to the branch version you can sync your offline data; that will sync edits to the replica version.  What you don't have control of here is the branch version name that is automatically created.

0 Kudos