You are here: Offline capability > Data transform support in offline mode

Data transform support in offline mode

You can use data transforms in offline-enabled applications. This improves the developer experience working with Pega 7 Platform data in offline mode by reducing the need for writing your own custom JavaScript functions.

A data transform rule XML is packaged on the Pega 7 Platform server for user in an offline-enabled application. The logic in the data transform XML is then converted to an equivalent JavaScript code on the client, the application itself.

Packaging

Data transforms in offline-enabled applications are packaged, by default, when they are configured on:

The structure of the packaged data transform rules resembles the original XML model of the data transform rule and only contains the relevant parts for offline use. If a data transform rule packaged for offline use contains an unsupported action, library, function, or feature, it will not be processed in the offline-enabled application. The system logs an error message, indicating that the data transform was not processed.

If a data transform is run in an offline-enabled application using a Run script action or a custom JavaScript function, it is not packaged, by default. Instead, you must use the Offline Data Transform JavaScript API. To package a data transform rule in either scenario, you must explicitly add the data transform definition to the pyDataTransformWhitelistForOffline rule, as either the pxInsName of the data transform, or a list of pxInsName strings, if multiple data transforms are whitelisted.

Note: So that performance is not adversely affected, whether a data transform is marked as valid for offline use is determined at design time. This means that all data transform rules saved or created in this release of the Pega 7 Platform or later are marked as valid for offline use. However, to mark any existing data transforms from previous releases as valid for offline use, you need to explicitly re-validate and save them.

Supported actions

The following actions are supported for data transforms in offline-enabled applications:

The following table lists invalid configurations for supported actions:

Invalid configuration

Description

A source field contains '@' outside of the quotation marks (" ").

Library functions are not supported in offline mode. Configure the source field to contain expressions such as '+' or spaces, as an alternative solution.

A condition contains '@'.

Library functions are not supported in offline mode. Use client-side expressions, as an alternative solution.

A condition does not contain a dot (.).

Server-side When conditions are not supported. Use client-side expressions, as an alternative solution.