Prepare data for use in offline feature services

To take data from an enterprise geodatabase offline for editing, publish a sync-enabled, editable ArcGIS Server feature layer (feature service). You can then add the feature service to a web map that is configured for offline use, and clients can download the web map and its contents to work with it when they are not connected to your network.

The data you use in a sync-enabled feature service can be either nonversioned with archiving enabled or, if your organization's data or workflows require it, the data can be registered as versioned.

All the data in the map from which you publish must be configured the same; you cannot have a combination of versioned and nonversioned data or a combination of traditional and branch versioned data in the map.

Data preparation requirements vary depending on whether the data is versioned and what type of offline editing workflows you will use. These data and offline workflow requirements also affect the settings you configure on the feature service when you publish it. The following sections discuss these requirements.

Note:

You do not have to enable editing to take a feature service offline—you can enable query and sync on the feature service to take it offline for reference only. However, the most common scenario for using feature services offline is to allow mobile workers to edit in the field. For that reason, the following sections describe offline editing workflows.

Also note that, for all these scenarios, a feature service replica is created when the feature layer is taken offline.

Scenario 1: Versioning is not required

If your workflows don't require versioned data, enable archiving on the data and publish a sync-enabled, editable ArcGIS Server feature service to take it offline for editing.

In this scenario, the data is not versioned. When clients connect to the feature service to obtain the latest changes once they have connectivity, they receive the current representation of the data from the geodatabase.

Tip:

If you use this scenario, save your edits frequently when editing the sync-enabled feature service.

If the primary reason that you enabled archiving on the data is to support offline sync workflows, it is a good practice to run the Trim Archive History geoprocessing tool on the data periodically. This keeps the archive compact and efficient.

To use nonversioned data in a sync-enabled feature service, the following data and publishing settings are required:

Data requirements for this scenario

Configure the following before you publish:

  • All the data in the map must be from the same enterprise geodatabase, and the data must be registered with the geodatabase.
  • All the feature classes to be published must have archiving enabled.
  • Each feature class to be published must contain a global ID field.

    The global IDs you add to the datasets you take offline cannot be based on a custom field; they must explicitly use the global ID field created by ArcGIS. To add global IDs to your data, use the Add Global IDs geoprocessing tool or the Add Global ID command on the feature class, feature dataset, and table context menus in the Catalog tree.

  • If the datasets to be published participate in a relationship class or have attachments, those relationships must use a global ID primary key.

    If the object ID column is the primary key, an error is returned when you download data for offline use. You can use the Migrate Relationship Class geoprocessing tool to convert object ID-based relationship classes and attachments to use global ID fields as the primary key.

  • The following fields must be included in the feature service; you cannot hide these columns in any of the feature classes to be published: fields that have subtypes, the primary and foreign key fields for the relationship class or attachments, editor tracking fields (if editor tracking is enabled on the dataset).
  • The login account specified in the database connection used to access the data must be granted the privileges on the data in the geodatabase that allows them to perform the editing operations configured for the feature service.

Feature service configuration

When you publish the feature layer, you must set the following on the Configure Web Layer Properties dialog box, accessed from the Configuration tab of the Share As Web Layer pane:

  • Enable editing and choose the level of editing allowed.

    Note:

    These settings apply only to nonadministrator users who do not own the feature service. ArcGIS Server administrators and the service owner have full access to the service with all operations allowed.

    As a result, data that is taken offline by an administrator or the service owner is always editable. If you require read-only offline feature layers, they must be taken offline by a nonadministrative user other than the feature service owner.

  • Enable sync.
  • Set the sync option to None.

    The None option for Sync Version Creation is selected.

Scenario 2: Branch versioning is used to manage multiuser edits

If you use branch versioning to manage multiuser editing scenarios or you use geodatabase functionality that requires branch versioning (such as utility networks or parcel fabrics), you can use either of the workflows described in the next two sections.

Each workflow requires specific settings on the data as well as specific settings when you publish the data.

For examples of using these workflows, see Work with offline maps and branch versioned data.

Synchronize with the default version

This workflow is most useful if you don't need to review edits or run attribute rules on the data before making it available to others. Because you cannot review and resolve conflicts for changes made by different editors, the last edit applied to the default version is the one that is saved to the default version.

This workflow has less lag time before edits are available, but you cannot review the edits before others can see them.

Tip:

If, instead, you need to review offline edits before making them available to others who access the data, you must use a replica version, as described in the Synchronize with a replica version section.

You can publish data from the default branch version from ArcGIS AllSource 2.1 or later to ArcGIS Enterprise 10.7 or later.

Data requirements for this scenario

Configure the following before you publish:

  • All the data in the map must be from the same enterprise geodatabase, and the data must be registered with the geodatabase.
  • All the feature classes to be published must be registered for branch versioning, which requires each feature class to have a global ID field.
  • The following fields must be included in the feature service; you cannot hide these columns in any of the feature classes to be published: fields that have subtypes, the primary and foreign key fields for the relationship class or attachments, editor tracking fields (if editor tracking is enabled on the dataset).
  • The login account specified in the database connection used to access the data must be granted the privileges on the data in the geodatabase that allows them to perform the editing operations configured for the feature service.

Feature service configuration

When you publish the feature layer, you must set the following on the Configure Web Layer Properties dialog box, accessed from the Configuration tab of the Share As Web Layer pane:

  • Enable editing and choose the level of editing allowed.

    Note:

    These settings apply only to nonadministrator users who do not own the feature service. ArcGIS Server administrators and the service owner have full access to the service with all operations allowed.

    As a result, data that is taken offline by an administrator or the service owner is always editable. If you require read-only offline feature layers, they must be taken offline by a nonadministrative user other than the feature service owner.

  • Enable sync.
  • Set the sync option to None.

    The None option for Sync Version Creation is selected.

Synchronize with a replica version

This workflow is useful if you need to review edits manually or using scripts that run attribute rules on the data before making it available to others. You can also review any conflicts that arise when mobile editors and editors in the office edit the same data.

A named version is created from the current state of the default version in the enterprise geodatabase whenever a mobile editor takes data offline. In offline and geodatabase replication workflows, this named version is referred to as a replica version. When mobile editors synchronize field edits, the edits are applied to the replica version. Mobile workers can repeatedly sync edits to the replica version.

Note:

Replica version names are limited to 30 characters. The feature service portion of the name will be truncated to meet this limit.

As with all named versions, you must reconcile and post edits from all the replica versions generated in this scenario with the default version. See Replica versions in offline workflows for more information.

This workflow is supported with ArcGIS AllSource 2.6 and later and ArcGIS Enterprise 10.8.1 and later.

Data requirements for this scenario

Configure the following before you publish:

  • All the data in the map must be from the same enterprise geodatabase, and the data must be registered with the geodatabase.
  • All the feature classes to be published must be registered for branch versioning, which requires each feature class to have a global ID field.
  • All the feature classes to be published must have replica tracking enabled.

    If you publish from ArcGIS AllSource 2.7 or later and you enable sync when you publish to ArcGIS Enterprise 10.9 and later, the data will have replica tracking enabled automatically. For all other cases, enable replica tracking on the data before you publish. Use the Enable Replica Tracking geoprocessing tool or right-click the dataset in the Catalog pane in ArcGIS AllSource, click Manage, and click Replica Tracking.

  • The following fields must be included in the feature service; you cannot hide these columns in any of the feature classes to be published: fields that have subtypes, the primary and foreign key fields for the relationship class or attachments, editor tracking fields (if editor tracking is enabled on the dataset).
  • The login account specified in the database connection used to access the data must be granted the privileges on the data in the geodatabase that allows them to perform the editing operations configured for the feature service.

Feature service configuration

When you publish the feature layer, you must set the following on the Configure Web Layer Properties dialog box, accessed from the Configuration tab of the Share As Web Layer pane:

  • Enable editing and choose the level of editing allowed.

    Note:

    These settings apply only to nonadministrator users who do not own the feature service. ArcGIS Server administrators and the service owner have full access to the service with all operations allowed.

    As a result, data that is taken offline by an administrator or the service owner is always editable. If you require read-only offline feature layers, they must be taken offline by a nonadministrative user other than the feature service owner.

  • Enable sync.
  • Set the sync option to Create a version for each downloaded map.

    The Create a version for each downloaded map option is selected.

Scenario 3: Traditional versions are used to manage multiuser edits

If your organization requires the use of traditional versions because you use a quality assurance version of the data, you can use the following offline workflows. Each workflow has specific data and publishing sections. Each workflow creates a replica version.

As with all named versions, you must reconcile and post edits from all the replica versions generated in this scenario with their parent version. See Replica versions in offline workflows for more information.

For examples of these workflows, see Offline maps and versioned data.

Note:

Replica version names are limited to 30 characters. The feature service portion of the name will be truncated to meet this limit.

Download maps for data maintenance

Use this workflow if mobile workers require the map that they download to have the latest data from the default version in the geodatabase. Once back in the office, they synchronize edits made in the field, remove the map, and reconcile and post the map's replica version with the default geodatabase version. The process may be repeated several times a day. As each process completes, mobile workers delete the offline map's replica version.

Data requirements for this scenario

Configure the following before you publish:

  • All the data in the map must be from the same enterprise geodatabase, and the data must be registered with the geodatabase.
  • All the feature classes to be published must be registered for full traditional versioning; the registration option to move edits to base is not supported.
  • Each feature class to be published must contain a global ID field.

    The global IDs you add to the datasets you take offline cannot be based on a custom field; they must explicitly use the global ID field created by ArcGIS. To add global IDs to your data, use the Add Global IDs geoprocessing tool or the Add Global ID command on the feature class, feature dataset, and table context menus in the Catalog tree.

  • If the datasets to be published participate in a relationship class or have attachments, those relationships must use a global ID primary key.

    If the object ID column is the primary key, an error is returned when you download data for offline use. You can use the Migrate Relationship Class geoprocessing tool to convert object ID-based relationship classes and attachments to use global ID fields as the primary key.

  • The following fields must be included in the feature service; you cannot hide these columns in any of the feature classes to be published: fields that have subtypes, the primary and foreign key fields for the relationship class or attachments, editor tracking fields (if editor tracking is enabled on the dataset).
  • The login account specified in the database connection used to access the data must be granted the privileges on the data in the geodatabase that allows them to perform the editing operations configured for the feature service.

Feature service configuration

When you publish the feature layer, you must set the following on the Configure Web Layer Properties dialog box, accessed from the Configuration tab of the Share As Web Layer pane:

  • Enable editing and choose the level of editing allowed.

    Note:

    These settings apply only to nonadministrator users who do not own the feature service. ArcGIS Server administrators and the service owner have full access to the service with all operations allowed.

    As a result, data that is taken offline by an administrator or the service owner is always editable. If you require read-only offline feature layers, they must be taken offline by a nonadministrative user other than the feature service owner.

  • Enable sync.
  • Set the sync option to Create a version for each downloaded map.

    The Create a version for each downloaded map option is selected.

Download maps for a short-duration project

Use this workflow for short term offline projects in which mobile workers make frequent edits and synchronizations.

In this workflow, mobile workers synchronize the edits from their replica versions in the morning and at the end of the day to a project version. The project version is a child of the default geodatabase version.

You can run a nightly reconcile and post process to keep the mobile workers' replica versions up to date with edits made by other mobile workers. When each mobile worker synchronizes the next morning, each sees the edits made by other mobile workers.

When the project is complete, all edits from the field have been synchronized and applied to the project version. The project version is then reviewed and reconciled and posted with the default geodatabase version. Upon project completion, the person responsible for project management deletes the feature service, the project version, and the mobile worker's replica versions.

In this workflow, the latency of the mobile workers' data is no more than one week.

Data requirements for this scenario

Configure the following before you publish:

  • All the data in the map must be from the same enterprise geodatabase, and the data must be registered with the geodatabase.
  • All the feature classes to be published must be registered for full traditional versioning; the registration option to move edits to base is not supported.
  • Each feature class to be published must contain a global ID field.

    The global IDs you add to the datasets you take offline cannot be based on a custom field; they must explicitly use the global ID field created by ArcGIS. To add global IDs to your data, use the Add Global IDs geoprocessing tool or the Add Global ID command on the feature class, feature dataset, and table context menus in the Catalog tree.

  • If the datasets to be published participate in a relationship class or have attachments, those relationships must use a global ID primary key.

    If the object ID column is the primary key, an error is returned when you download data for offline use. You can use the Migrate Relationship Class geoprocessing tool to convert object ID-based relationship classes and attachments to use global ID fields as the primary key.

  • The following fields must be included in the feature service; you cannot hide these columns in any of the feature classes to be published: fields that have subtypes, the primary and foreign key fields for the relationship class or attachments, editor tracking fields (if editor tracking is enabled on the dataset).
  • The login account specified in the database connection used to access the data must be granted the privileges on the data in the geodatabase that allows them to perform the editing operations configured for the feature service.

Feature service configuration

When you publish the feature layer, you must set the following on the Configure Web Layer Properties dialog box, accessed from the Configuration tab of the Share As Web Layer pane:

  • Enable editing and choose the level of editing allowed.

    Note:

    These settings apply only to nonadministrator users who do not own the feature service. ArcGIS Server administrators and the service owner have full access to the service with all operations allowed.

    As a result, data that is taken offline by an administrator or the service owner is always editable. If you require read-only offline feature layers, they must be taken offline by a nonadministrative user other than the feature service owner.

  • Enable sync.
  • Set the sync option to Create a version for each user.

Download maps for an ongoing project

Use this workflow for offline projects that run for multiple weeks or longer.

In this workflow, mobile workers synchronize edits they make while offline. They connect to the network and synchronize in the morning and at the end of the day with a quality assurance version. Because this project is ongoing, the feature service is published from a quality assurance version that is not deleted rather than directly from the default version. That means additional review, reconcile, and post processes are required.

Data requirements for this scenario

Configure the following before you publish:

  • All the data in the map must be from the same enterprise geodatabase, and the data must be registered with the geodatabase.
  • All the feature classes to be published must be registered for full traditional versioning; the registration option to move edits to base is not supported.
  • Each feature class to be published must contain a global ID field.

    The global IDs you add to the datasets you take offline cannot be based on a custom field; they must explicitly use the global ID field created by ArcGIS. To add global IDs to your data, use the Add Global IDs geoprocessing tool or the Add Global ID command on the feature class, feature dataset, and table context menus in the Catalog tree.

  • If the datasets to be published participate in a relationship class or have attachments, those relationships must use a global ID primary key.

    If the object ID column is the primary key, an error is returned when you download data for offline use. You can use the Migrate Relationship Class geoprocessing tool to convert object ID-based relationship classes and attachments to use global ID fields as the primary key.

  • The following fields must be included in the feature service; you cannot hide these columns in any of the feature classes to be published: fields that have subtypes, the primary and foreign key fields for the relationship class or attachments, editor tracking fields (if editor tracking is enabled on the dataset).
  • The login account specified in the database connection used to access the data must be granted the privileges on the data in the geodatabase that allows them to perform the editing operations configured for the feature service.

Feature service configuration

When you publish the feature layer, you must set the following on the Configure Web Layer Properties dialog box, accessed from the Configuration tab of the Share As Web Layer pane:

  • Enable editing and choose the level of editing allowed.

    Note:

    These settings apply only to nonadministrator users who do not own the feature service. ArcGIS Server administrators and the service owner have full access to the service with all operations allowed.

    As a result, data that is taken offline by an administrator or the service owner is always editable. If you require read-only offline feature layers, they must be taken offline by a nonadministrative user other than the feature service owner.

  • Enable sync.
  • Set the sync option to Create a version for each user.

Other settings and how they affect offline data

The data you need to take offline may also be configured to use other geodatabase functionality, such as attribute rules or editor tracking. Be aware of how that functionality affects the data when editors synchronize their offline edits with the geodatabase.

Attribute rules

Feature layers you publish from ArcGIS AllSource that reference your registered data can include attribute rules. When you edit the feature layer, ArcGIS applies the attribute calculation and constraint rules you defined in the geodatabase. Any time an edit violates one of these rules, the editor receives an error. However, if you edit the data while offline, the attribute rule information is not included in the offline data. When you synchronize the data with the feature layer, the rules are applied at that time. How the violations are treated depends on how the data is registered.

  • If you use data that is registered as versioned, attribute rule violations prevent the synchronization process from occurring. Synchronization returns an error when an edit violates an attribute rule. You must correct the violation in the offline version of the data and synchronize again.
  • If you use archive-enabled, nonversioned data, synchronization completes but edits that violate attribute rules are not applied. Information is written to the ArcGIS Server log for the edits that did not synchronize. If you use nonversioned data and attribute rules, check the ArcGIS Server log after synchronizing to see which (if any) edits were not synchronized. Correct the violation in the offline version of the data and synchronize again.

If you include attribute rule error layers in the sync-enabled feature service, do not edit the error layers in the offline map. If you do, the edits will not be applied to the error layers when you synchronize.

Editor tracking

You can use editor tracking with data that is edited while offline. When you download data to the client for offline use, the existing values in the editor tracking fields are copied to the client along with the rest of the data. When working with the data offline, the date and time that features are created or edited are recorded in the appropriate date fields. These values are preserved when the data is synchronized with the service.

Note:

If the date fields store values in a time zone other than coordinated universal time (UTC), specify that time zone when you publish the service. If you do not, UTC is assumed. ArcGIS will apply the time zone you specify to all editor tracking date fields.

Offline data includes the name of the user who took the map offline. This is used with editor tracking as follows:

  • For features that were created while offline, the creator name value is set to the user who took the map offline.
  • For existing features that were edited while offline, the editor name value is set to the user who took the map offline. The creator name value for these features is not changed.

Ownership-based access control

When editor tracking is enabled on the data, you can limit access to features based on who created them by configuring ownership-based access control on the feature service. Any edits the offline client makes that violate the ownership-based access control rules will not be synchronized with the service. The login used to synchronize the edits is considered the editor in this case.

However, if the ArcGIS Server administrator synchronizes the edits that were made by an offline editor, ownership-based access control is based on the named user who took the map offline, not the administrator.

Privileges to synchronize

When you use the sync capability on an ArcGIS Server feature service, the synchronization process creates a temporary table in the enterprise geodatabase to move the data between the app and the database. This means that the database user who connects to perform the synchronization must be able to create temporary tables in the database. In some database management systems, creating a temporary table requires specific privileges or other configuration. Consult your database management system documentation to verify what privileges and space requirements are needed to use temporary tables in your database, and check with your database administrator to ensure you have those privileges or access to the required tablespaces.

If edits made offline are synchronized with the feature service, the database user who connects to synchronize must have insert, update, and delete privileges on the source data in the enterprise geodatabase.

Map layers that reference the same feature class

Map authors sometimes add the same feature class to a map more than once. These appear as separate layers in the map, but they are the same feature class in the geodatabase. If you publish an ArcGIS Server feature service from a map that contains two or more layers based on the same feature class source, you cannot use that feature service in offline workflows.

For example, if you add the roads feature class from a geodatabase to the map to display all roads, add the same roads feature class and set a definition query on it to display roads that are under construction, and publish a feature service from the map, you cannot take the feature service offline for editing and synchronize your changes when you are online.