Show TOC

Application Configuration FileLocate this document in the navigation structure

Use the application configuration file to configure OData endpoints and defining requests that determine the data that populates the application database when it is created. Use the cockpit to import the application configuration file.

An application configuration file consists of one or more OData endpoints, each of which can be optionally followed by one or more defining requests.

Each application configuration file represents a single application.All settings have default values, so an application configuration file is only required for non-default behavior.

Endpoints are defined as follows:

[endpoint]
name=YourConnectionName
prepopulate_offline_db=Y|N|SHARED-ONLY
prepopulate_offline_db_interval=NNN
indexed_type=<namespace>.<entity type name1>: Property1A [ASC|DESC][, Property1B [ASC|DESC], …]
indexed_type=<namespace>.<entity type name2>: Property2A [ASC|DESC][, Property2B [ASC|DESC], …]
request_format=application/json;q=1,application/atom+xml;q=0.5
delta_request_format=application/atom+xml
Parameter Value Notes
name Name (Required) The name of the endpoint, defined as a Connection Name in the cockpit.
prepopulate_offline_db Y|N|SHARED-ONLY Specifies the type of data that is included in the initial database.
  • Y Shared and unshared data is included in the client database when it is created on the server. The fully populated database, as defined by the defining requests, is deployed to the client. This is the default value.
  • N Creates an empty database with only a schema. To obtain data, the database is refreshed automatically after it is deployed to the client.
  • Shared-only The database includes only shared data and no user-specific data. To obtain client-specific data, the database is refreshed automatically after it is deployed to the client.
prepopulate_offline_db_interval NNN If a refresh requires a new database, the shared data is refreshed based on the interval specified, in minutes. The default is 1440 minutes (one day).

This option applies only when prepopulate_offline_db is set to Y or SHARED-ONLY and there is at least one defining request with is_shared_data=Y.

indexed_type <namespace>.<entity type name>: PropertyName [ASC|DESC][, AnotherPropertyName [ASC|DESC], …] Each indexed_type defined causes the client database to have an index for that type. Defining indexes can improve client query performance. However, defining too many indexes can slow the performance of refreshes and updates.

Specify multiple indexed_type entries by listing one entry per line. Specify either the primitive property name, or a complex type path expression that ends with a primitive property.

request_format atom|json|any valid value Specifies the format to use when communicating with the OData producer. This property applies only when the offline OData service is making initial requests or non-delta request to the OData producer.
  • atom Short for application/atom+xml.
  • json Short for application/json.
  • Any valid value Specify any valid value for an Accept header.
The default is:
application/json;q=1,application/atom+xml;q=0.5
delta_request_format atom|json|any valid value Specifies the format to use when communicating with the OData producer. This property applies only when the offline OData service is making delta requests to the OData producer.
  • atom Short for application/atom+xml.
  • json Short for application/json.
  • Any valid value Specify any valid value for an Accept header.
The default is:
application/atom+xml

Create defining requests as follows:

[defining_request]
name=DefiningRequestName
is_shared_data=N|Y
refresh_interval=NNN
track_deltas=AUTO|ALWAYS|NEVER
delta_token_lifetime=NNN

Currently, only defining requests where the resource path identifies an entity set or entity type instance are supported.

Parameter Value Notes
name DefiningRequestName (Required) The name of the defining request. A defining request is an OData read request that targets the OData endpoint associated with the offline store, and retrieves a subset of the OData endpoint data.

Defining requests are defined in the ODataOfflineStoreOptions object of the OData Offline API. The application populates the “definingRequests” parameter.

is_shared_data N|Y Specifies whether the data is shared among different clients or users.
  • N At least some data is not shared amongst multiple client databases. This is the default value.
  • Y All data in the request is shared among multiple client databases.
refresh_interval NNN The interval time, in minutes, between refreshes of the shared data. The default is 15 minutes.
track_deltas AUTO|ALWAYS|NEVER Specifies how to track OData deltas.
  • Auto If the OData producer supports delta change tracking on the defining request, the delta links returned are used when refreshing the data. If the OData producer does not support delta change tracking on the defining request, the server tracks the changes so that only changed data is exchanged between the client and the server. This is the default value.
  • Never Sets the server to never track delta changes. If the OData producer supports delta change tracking, the delta links returned by the OData producer are used when refreshing data, even if this option is specified.
  • Always Sets the server to always track delta changes. This option is equivalent to Auto if the OData producer does not support delta change tracking on the defining request.
delta_token_lifetime NNN

The time, in minutes, until the OData delta token expires. The default is 72000 minutes (50 days).

While a token is valid, only changed data is refreshed on the client database. When the delta token expires, the entire client database is replaced.

Example
[endpoint]
Name=OrderExample
prepopulate_offline_db=SHARED-ONLY
prepopulate_offline_db_interval=1440
indexed_type=SAPODataExample.CustomerType: Surname, GivenName
indexed_type=SAPODataExample.CustomerType: Address/Province, Address/City

[defining_request]
name=Customers
is_shared_data=N

[defining_request]
name=Orders
is_shared_data=N

[defining_request]
name=OrderItems
is_shared_data=N

[defining_request]
name=Products
is_shared_data=Y
refresh_interval=1440