Data synchronization in offline mode
When an offline-enabled mobile app is not connected to a network, an action queue stores local user actions. When network connectivity is restored, the contents of the action queue are pushed to the server, and Pega Platform processes them. At the same time, all modified data pages and work objects are synchronized to the mobile device.When you design an application that users can access with an offline-enabled mobile app, consider the following information with regard to data synchronization.
- Full synchronization
- Sends all queued user actions to the server and synchronizes the application
model and all data items and work objects to the mobile device. Full
synchronization happens in the following situations:
- When the user starts the offline-enabled mobile app for the first time, and you do not prepackage the access group data in the mobile app executable files.
- When the user clears the local storage on a mobile device for debugging purposes.
- Delta synchronization
- Sends all queued user actions to the server and synchronizes only the
changed data items and work objects to the mobile device. Delta
synchronization can happen in the following situations:
- When the user starts the offline-enabled mobile app for the first time, and you prepackage the access group data in the mobile app executable files.
- Each next time the user logs in to the offline-enabled mobile app.
- After a single user's action appears in the action queue, for example, when the user completes a transaction by submitting an assignment.
- When the user taps the connection status indicator in the offline-enabled mobile app.
- During a periodic syncing operation: every 5 minutes, if the server was last accessible, or every 1 minute, if the server was not accessible.
- When the device goes from offline mode to online mode or a new hardware network interface is attached.
- Customizing synchronization indicators
Customize the background color and font of the synchronization indicators in your mobile app to better suit the overall look and feel. Synchronization indicators keep users informed about the synchronization status when an offline-enabled mobile app regains network connectivity and starts synchronizing data.
- Offline case packaging optimization during synchronization
When you design an application that users can access with an offline-enabled mobile app on a mobile device, you can improve the performance of an offline-enabled mobile app when the application contains a large number of case types. You do this by optimizing offline case packaging during synchronization.
- Propagating application model changes to offline-enabled mobile apps
Ensure that changes to the model of your application are reflected in your offline-enabled mobile app by clearing the cache of the app and forcing full synchronization.
Previous topic Offline data transform API Next topic Customizing synchronization indicators