When rule support in offline mode

In offline mode, the use of when rules reduces the effort required for implementation of offline-enabled applications, automates case processing in offline mode, and helps to derive the logic directly from the model.

A when rule that conforms to the supported features is packaged on the Pega Platform server for use in offline-enabled applications. If a when rule that is packaged for offline use contains an unsupported feature, it is not processed in the offline-enabled application. Pega Platform adds an error message to the log files to indicate that the when rule was not processed.

Supported features

The following features are supported in offline-enabled applications:

  • Decision shape flow actions
  • Question shape flow actions
  • Field validation
  • Conditional starting and skipping of a process
  • Visibility and disable conditions for basic and advanced controls, with the exception of the navigation rule
Note: Multiple connectors with a when rule in a flow rule, connected to either a decision or question shape of a fork type, are also supported. However, if two or more connectors can simultaneously evaluate to true, they must have a different likelihood assigned.

The following when rule logic is supported in offline-enabled applications:

  • Conditions:
    • [first value] [relation] [second value]
    • [first string] equals [second string]
    • [first string] does not equal [second string]
    • [string to search on] contains [string to search for]
    • [first String] [relation] [Second String]
    • [first number] [relation] [second number]
    • [First DateTime] [relation] [Second DateTime]
    • [a datetime] is in the [past/future]
    • created within the last [num] days
    • the work object is Resolved
    • the work object's status is [given value]
    • the customer satisfaction status is [given value]
    • [Pagelist Name] contains a page where [Property Name] equals [Value]
    • length of [a pagelist property] is [comparison operator] value
    • [expression evaluates to true]
    • Rule [When record evaluates] to true
  • Calling nested when rules in [expression evalutates to true] using:
    • callWhen (limited - see the information in the next paragraph)
    • when
  • Single value properties on the following system pages:
    • Data-Admin-Operator-AccessGroup for AccessGroup
    • Data-Admin-Operator-ID for OperatorID
    • Data-Admin-Organization for Org
    • Data-Admin-OrgDivision for OrgDivision
    • Code-Pega-Process for pxProcess
    • Code-Pega-Thread for pxThread
    • Code-Pega-Requestor for pxRequestor
    • Rule-Application for Application
  • All Java utility functions and libraries that are supported in offline mode. For more information, see Function rule support in offline mode.

The when rule offline support of the callWhen function is limited:

  • The third parameter must be myStepPage or pyWorkPage. For example, the following code is supported in offline mode:
    @callWhen(@getPublicAPI(),"AtCallWhenInner",pyWorkPage)
    or
    @callWhen(@getPublicAPI(),"AtCallWhenInner", myStepPage)
  • Dynamically calling a when rule by using a text reference is not supported. For example, the following code will not work in offline mode:
    @callWhen(@getPublicAPI(), .MyTextProperty, myStepPage)

Unsupported features:

  • When rules referencing data pages
  • Conditional routing
  • Case-wide validation
  • When rules referencing section param page
  • Visibility conditions for layouts including DynamicLayouts and RepeatingDynamicLayouts
  • Required conditions