Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Offline mobility guidelines in Pega 7.2.2

Updated on September 3, 2019

When you develop Pega 7 Platform applications such as mobile apps, you must follow certain guidelines and be aware of some special considerations to enable the offline capability in applications. For more information, see the following sections:

For background information about offline capability in applications, see Offline capability.

Enable offline capability in your access groups and case types

Consider the following information when enabling offline capability for your access groups and case types:

  • You enable offline capability for an access group by selecting the Enable offline support check box on the Advanced tab of the Edit Access Group form.
  • A single offline-ready application can support both online-only and offline-ready case types. The online-only case types are still available in the mobile app, but a user can create assignments or edit them only while online.
  • The following restrictions apply while working offline:
    • Case stage transitions are not supported.
    • Subcases are not supported.
    • Circumstance application rules are not supported.
  • You must enable offline capability for each case type that you want to support in offline mode. Select the Enable offline support check box on the Advanced tab of the Edit Case Type form.
  • After you have logged in to a custom mobile app on a device and you enable or disable the offline capability in Designer Studio (for example, for the application's case types and access groups), for the settings to take effect, you need to reinstall the mobile app or clear its data.
  • After offline capability is enabled, you can create individual assignments within that case type while working offline. Screen flows that are a part of the case type can also be run while offline. For more information, see Flow processing considerations.
  • If you create a new case type, it uses dynamic views by default, which will not work in offline mode. However, you can disable dynamic views in the Views tab of the case type so that it uses regular harnesses and sections.
  • The login rule for all offline-enabled applications must be based on the Web-Login rule in the Pega-EndUserUI ruleset. This rule contains all the required user interface items and references to scripts used by the offline-enabled applications.

You can create your own portal for offline capability, as long as it uses some of the key principles and design of the pyCaseWorker portal. For more information, see Composite portal and Creating a composite portal. A portal that is based on the Case Worker portal (such as pyCaseWorker) has the following requirements:

  • It is not available by default in the Pega 7 Platform, so you have to add the UI-Kit-7 ruleset to the application stack. For more information, see The UI Kit ruleset.
  • It must be set as the default portal for every access group whose users access the offline-enabled application.
  • It must use an iframe-less dynamic container.
  • The harness in the portal must be defined in the Data-Portal class.
  • The cases must use stages and use pyStartCase as the starting flow on a case.
  • It must adhere to the following guidelines.

Use supported controls

When developing a mobile app for offline capability, you must build every screen by using modern layouts and lists. For a complete list of supported controls that you can use while creating the user interface, see Supported controls when working offline.

Use supported actions

Buttons, links, icons, and menu items must use only the supported set of actions. For a complete list of actions that are supported while working offline, see Supported actions when working offline.

Flow processing considerations

You must use flows in case types. For more information, see Flow processing in offline mode.

Other considerations

The following information is important to know while developing Pega 7 Platform applications with the offline capability:

  • You configure and build an Android or iOS offline-enabled custom mobile app from the Mobile Apps form. For more information, see Configuring a custom mobile app.
  • Case objects are available in offline mode:
    • All cases are available from the worklist.
    • When a case is marked for offline use, a field for adding a data page lists the case objects to send to the client for offline use. Any case in this list that is synced will be available offline.
      However, if this data page misses a case that a user needs, when the user goes to online mode and attempts to open a case that is marked for offline and that case is not available locally on the device, the client retrieves the case from the server. The case then remains available on the client even after the user goes offline.
  • A landing page lists various configurations that must be performed for the offline mobile app. To access this landing page, click Designer Studio > Mobile > Offline.
  • To force a full synchronization of your offline-enabled application, click Force full sync for all users on the Advanced tab of the Edit Access Group form or the Offline Configuration landing page. Doing this is necessary if any rules change - such rules are then only synchronized when full synchronization takes place.
  • To display a worklist for an offline-enabled application:
    • Use the D_pyUserWorkList data page in the UI-Kit-7 rule, as an example for how to configure your data page.
    • The data page must be of Code-Pega-List type and an obj class of Assign-Worklist or Assign-Workbasket type.
    • Make sure that the following properties are in the data page to be able to open an assignment:
      • pxRefObjectClass
      • pxRefObjectKey
    • Make sure that pyCompletedOffline is set to true when the synchronization process has completed, allowing you to remove the work object from the worklist by using a client-side when rule.
  • If the worklist is displayed on the home section, for example, the section that is initialized in the dynamic container, this section is automatically refreshed after data synchronization.
  • To prevent data synchronization issues, review the settings on the Context tab of the offlinehttp service package rule, and make sure that Use service session cookie (REST/HTTP only) is selected.
  • To improve performance, large data pages are supported for storing reference data for offline use. For a large data page, only the changed records are synchronized when the application goes online. For more information, see Tutorial: How to use large data pages to store large reference data in offline mobile apps.
  • For regular data pages, the following data sync limitation applies:
    • The data page size cannot be larger than 10 million characters.
    • Because the string is UTF-8 encoded, this size represents approximately 7.6 MB if all the character codes are between 1 and 128 (for languages such as English, German, or French).
  • You can extend the app by using a CallActivity extension point during each synchronization process to handle use cases that are not supported. For example, you can perform additional tasks such as updating the details of a work object. For more information, see callActivity action as an extension.
  • If the Pega 7 Platform was installed on an Oracle WebLogic application web server, make sure to manually enable preemptive authentication, because it is disabled by default. Set the following Oracle SOA 11g partnerlink binding property to 'true':
  • If you want your custom JavaScript scripts to be available offline, you must include the scripts in one of the following ways:
    • Add a custom script by saving the pypega_ui_userscripts_offline script bundle to the application ruleset, and then add your script files to this bundle.
    • Save the script as a JavaScript file named pypega_ui_userscript_offline to the application ruleset, and then add custom JavaScript functions to it.
  • When adding custom JavaScript scripts, you can configure data synchronization by calling the following JavaScript methods that are available:
    • pega.offline.DataSync.setIntervalBetweenSynchronizationsWhenServerAccessible – Sets the interval (in milliseconds) between subsequent synchronization sessions when the server is available. By default it is set to 5 minutes.
    • pega.offline.DataSync.setIntervalBetweenSynchronizationsWhenServerInaccessible – Sets the interval (in milliseconds) between subsequent synchronization sessions when the server is not available. By default it is set to 1 minute.
    • pega.offline.Indicator.setDeferDurationTime – Sets the time (in milliseconds) that must pass from the start of the synchronization session before the Syncing/Synced label is displayed on the screen. By default, it is set to 4 seconds.
    • pega.offline.Indicator.setHideSyncedAfterTime – Sets the time (in milliseconds) that must pass from the end of the synchronization session before the Synced label disappears from the screen. By default, it is set to 5 seconds.
    All values must be greater than 0.
  • When using defer load support:
    • The defer load sections or layouts are loaded on the initial load, and the defer load preactivity is always ignored. This will affect the performance of loading screens.
    • Defer load is not supported in tabs. You must use a layout group instead.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us