You are here: Mobile > Custom mobile app > Offline capability

Offline capability

For mobile applications (apps) that are built with offline capability, an online and offline rendered version of a user case portal is available. You can create a new case and complete any of the assignments listed in your worklist while working offline.

Note: Using offline capability requires a custom mobile app that is built from the Application rule form. The standard Pega 7 Platform app from the app store will not work in offline mode. See Mobile settings reference. You can also simulate offline capability in the app using the Pega Mobile Client system info settings.

When your mobile device is offline, and you attempt to open or submit an assignment or to create a new case, all steps are saved in the queue. A case that is created while offline is not reflected in the user interface until data synchronization has occurred. An indicator on the app screen keeps track of the number of items added to the queue. When the network connection state changes and the mobile device comes back online, data synchronization is triggered automatically for the app, and any saved data is updated to the server. An indicator displays whether you are online, offline or currently synchronizing with the server. The indicator in the application will not display SYNCING or SYNCED if synchronization takes less than 4 seconds or when the server is unavailable. The indicator will also not display the FAILED status when the network has been disconnected or the server becomes unavailable - it will only display it when another type of data synchronization issue has occurred.

When your mobile device is online, completing an assignment or creating of a new case means that any changes are immediately submitted to the server using the online version of the case portal. The store and forward capability is not leveraged in this situation. However, if a mobile device goes offline at any time, app information is saved in the queue.

The table below indicates under which conditions the data synchronization operation is triggered for an application.

Event

Data synchronization operation

device goes offline

not triggered

device goes online

only triggered when the queue is not empty and 5 minutes have passed since the last synchronization

harness-to-harness navigation when online

only triggered if the navigation included:

  • submitting an assignment
  • creating a case
harness-to-harness navigation when offline

not triggered

showing portal immediately after logging in

triggered

device is online and 5 minutes have passed since the last data synchronization operation

triggered

Understanding offline behavior

Only single-step assignment processing is supported for the offline capability in mobile applications. This means that after each completed assignment in the case when working offline, the app's end user (or a user on another device) must first go online to continue to the next step in the case. It is not possible to perform more than one assignment in the case when in offline mode.

To successfully use offline capability, a mobile app end user must successfully log in to the server and let the synchronization successfully finish, at least once. Only after the initial synchronization takes place, can offline capability be leveraged with the mobile app.

Each time a user logs in to the server after the user credentials have been changed, the offline user credentials are synchronized. In such a case, if there are any actions in the queue that are waiting for synchronization, the user will be asked to enter the old password on the device, only once. As an alternative, the user may decide not to provide the password and discard the pending actions.

Note: When a user clicks a case, pulse, calendar or a link that requires the application to be connected to the server (online), an alert displays on the screen stating that such feature is not available offline.

Configuration note

When building the application, enable offline capability and choose optimistic locking in the case type settings. All cases belonging to the mobile application must be enabled for offline capability. Additionally, when configuring an application to use offline capability, remember that a portal based on the Case Worker portal (such as pyCaseWorker) must be set as the default for every access group whose users will be accessing the application. Remember to also enable offline capability for the access groups. See Mobile settings reference.

Note: See PDN article How to configure a mobile application with offline capability for detailed usage instructions.