App status management

In map.apps SDI it is possible to save the state of an app, share it with other people and restore it again at a later time.

The parts of your app and your configuration you can save and share through a link and load again are

  • all map services,

  • the visibility of services and layers,

  • the transparency of services,

  • the order of services, groups and layers,

  • the background services,

  • object sketchings,

  • map.apps ETL uploads,

  • the spatial reference system (SRS) and

  • the map scale.

Other things, e.g. the selected Styled Layer Descriptors (SLDs) for a WMS service, are not saved.

If you store app states with geometries and data from map.apps ETL uploads, then the save state database size will grow faster than without data from map.apps ETL uploads.

Use map.apps ETL upload tool config parameters maxFeaturesPerLayer and maxUploadSize to limit uploads.

Usage

The Save State backend service is required to save app states on the server. To configure the URL to this service, edit the map.apps application.properties file and add the following property:

savestate.service.url=http://yourserver:port/savestate/resources/appstates

Always assign unique IDs (id property) to services and layers in your map configurations in the app.json so that all supported aspects can be saved properly. If you do not specify IDs, dynamic IDs will be generated. Since these dynamic IDs vary with every app start, they do not work properly in combination with app states.

The sdi_appstatemanagerintegration bundle can only be used for integration into map.apps Manager. It is not designated for use in an ordinary map.apps app.

This bundle is not compatible with the map.apps parametermanager bundle.

Please make sure that the parametermanager and the sdi_appstatemanagement bundles are not present in the same app at the same time. Note that some bundles, like the parameter-url bundle, depend on the parametermanager bundle and cause it to be started in the app without explicitly mentioning it in the app’s allowedBundles list.

Therefore, exclude all bundles that depend on the parametermanager bundle, too. You can figure out the bundles that require the parametermanager bundle by checking the dependencies property within those bundles' manifest.json files.

Access restrictions for app states

If you are not logged in, you are allowed to create only public app states. These automatically get the view and edit permissions assigned, so they can be updated and deleted by everyone. However, existing permissions on those app states can only be changed by admin users.

If you are logged in, you can grant for each app state a number access permissions to certain users, user roles or to every user. Each permission is bound to one of these actions: view or edit. Those permissions can only be changed by the owner of the state or admin users after creating the state.

Users having the view permission for an app state are allowed to load it. For changing and deleting an app state, the edit permission is required.

If a permission is assigned to multiple user roles it applies to all users having at least one of those roles.

An admin user can view, update, or delete every application state — independently of the app and configured access restrictions.

Without further configuration all roles of the current user are shown in the list of roles. This can be configured. To configure the visibility options and user roles to show in the dialog, see the documentation of the StateDetailsModelFactory component in the appstatemanagementshared bundle documentation.

To utilize this security feature, you have to configure map.apps and the savestate backend service for security. See configuration/securityuration.adoc for more details.

restrictions

Compatibility with legacy app states

The previous version of map.apps SDI had a simpler state access protection system. New states saved with the current version of map.apps SDI are not compatible with previous versions of map.apps SDI.

However, states saved with previous map.apps SDI versions are fully compatible with the current map.apps SDI version. They are automatically converted to the new format, once they are modified by a user.