Validate rules in offline mode

Offline-enabled mobile apps support validate rules in specific scenarios. Validate rules help you verify the correctness of the input values in your app. For example, a validate rule can test if the property values that users enter in a form are valid against conditions that you define in the rule.

The validation is automatic if a flow action references the validate rule.

Packaging

Pega Platform packages validate rules that match the supported scenarios on the server for use in an offline-enabled app. A validate rule can also call any number of function rules, and the system automatically packages the function rules that are referenced by the validation rule.

Pega Platform packages the following rules:
  • Validate rules that are referenced in flow actions
  • Validate rules that you add to the list of offline-supported validate rules

If a packaged validate rule matches an unsupported configuration, the offline-enabled app might not process the rule. The mobile client adds an error message in the client log files to indicate that the validate rule was not processed.

Supported configuration of validate rules

Offline-enabled apps support validate rules to the following extent:

  • Validation on only one level; support of one column for each property
  • Addition of warning and error messages for 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
  • Direct validation of a single-value property that you define in the following ways:
    • Individually

      Example: .CustomerType

    • In a Page property

      Example: .ItemToAdd.Name

    • In a Page List property

      Example: .Items(1).CategoryID

    • In a Page Group property

      Example: .ShipmentsGroup(A).TrackingNumber

    • In a specific page of a Page List property in a Page property

      Example: .ItemToAdd.Items(1).CategoryID

  • Localization of parameterized message rules for the validation conditions

Unsupported scenarios

Offline-enabled apps do not support validate rules in the following scenarios:

  • References to a validate rule from any rule other than a flow action
  • Case-level validation during case creation and saving
  • Stage-entry validation
  • Any validate rule configuration in the flow action rule
  • Validate rules in an assignment, during postprocessing when users navigate away from a step
  • Queuing additional validation, such as Edit Validate or another validate rule, that runs after the evaluation of the preceding validation
  • Input tab settings on a validate rule: input property, proposed work status, flow action name, stages
  • Direct validation of the following single-value properties: Validate Each, Call for Each, Call