Validate rule support in offline mode
To improve the user experience, you can use validate rules in offline-enabled applications. For example, a validate rule can test properties and pages input values of the offline-enabled application against conditions that are defined as part of the validate rule. The validation is performed automatically if the rule is referenced by a flow action.
Packaging
A validate rule that conforms to the supported features is packaged on the Pega Platform server for use in an offline-enabled application. A subset of the validate rule model is packaged and interpreted in the client after validation processing has finished. The validation logic is directly derived from the model.
If a validate rule that is packaged for offline use contains an unsupported action, library, or feature, it is not processed in the offline-enabled application. The Pega Platform adds an error message to the log files that indicate that the validate rule was not processed.
Supported features
The following features are supported in offline-enabled applications:
- A validate rule that is referenced by a flow action only (and also validate rules that are explicitly added to a whitelist).
- One level of validation only - one column for each property is supported.
- Adding warning and error messages to properties and pages, if a supported validation fails.
-
Several validation conditions:
- Enable conditions
- Select a function
- Required check box with a default message: This field may not be blank
- Continue validation
- Message as a text or a reference to a message rule with parameters
- Validation condition with function rules
-
Only direct validation of a single-value property that is defined:
- Individually - for example: .CustomerType.
- In a Page property - for example: .ItemToAdd.Name.
- In a Page List property - for example: .Items(1).CategoryID.
- In a Page Group property - for example: .ShipmentsGroup(A).TrackingNumber.
- In a specific page of a Page List property in a Page property, for example: .ItemToAdd.Items(1).CategoryID.
- Localization of parameterized message rules for the validation conditions.
Unsupported features:
- References to a validate rule from any rule other than a flow action.
- Case level validation - Validation when a case is created and validation when a case is saved.
- Stage entry validation.
- Any validate rule configuration in the flow action rule.
- Validate rule in an assignment, when performing postprocessing while navigating away from a step.
- Additional validation - Specifying Edit Validate or another validate rule that is to run after evaluating the previous validation.
- Validate rule Input tab - Input property, proposed work status, flow action name, stages.
- No direct validation of a single-value property - Validate Each, Call for Each, Call.