configure


Purpose

Configures Client Store synchronization. Calling this method during the first application start is required for all other methods to work.

At the JavaScript level, the options object is validated to verify the value of the version parameter. Based on this value, either of the two versions of native code is triggered to pass various parameters. See the "Parameters" section below for details.

Signature

configure( options )

Returns

This method does not return anything.

Parameters

The options object contains the following configuration parameter.

Name Description Type Use
version

A protocol that Pega Mobile Client must use:

  • 2 - the client uses a version of the protocol to support connections with the Pega Platform in versions 7.1.10, 7.2.0, and 7.2.1

  • 3 - the client uses a version of the protocol to support connections with the Pega Platform in version 7.2.2 and 7.3.0

  • 4 - the client uses a version of the protocol to support connections with the Pega Platform in version 7.3.0 with HFix-35617, 7.3.1, and up

integer required

Regardless of the version parameter's setting, the following configuration parameters must be provided as part of the options object.

Name Description Type Use
url

Absolute location of the REST service for triggering the Synchronization process:

<server_URL>/PRRestService/offlinehttp/DataSync/pzSynchronizationService

Where <server_URL> stands for the URL address of an instance of your Pega Platform.

string required
binaryServiceUrl

Absolute location of the REST Service that supports binary upload:

<server_URL>/PRRestService/offlinehttp/DataSync/pzBinaryUploadService

Where <server_URL> stands for the URL address of an instance of your Pega Platform.

Note

This parameter is required, when the version parameter is set to 4. Otherwise it is not used.

string required
logoutServiceUrl

Absolute location of the service that supports logging out of the offline requestor.

string optional
reportChangesForTypes An array of synchronization item types for which changes will be reported after every Client Store synchronization. Item types are freely defined data item categories, presented as string values. They are used in correlation with data handles to identify individual data items. For example: "harness", "splitdatapage", "datapage", "image". array required
sessionTimeout A session timeout value in seconds. When it passes, the user should be logged out. integer optional
continueOldSession Decides whether an existing client store session should be used for future synchronization requests. By default, the parameter is set to false. boolean optional
compressRequest Decides whether the synchronization requests from the Pega Mobile Client to Pega Platform should be compressed. By default, the parameter is set to false. boolean optional

Related topics

Client Store
Legal notice | Copyright © 2019 and Confidential to Pegasystems Inc. All rights reserved
Pega Community | Feedback
Advanced...