Deprecated collection functionality

This topic describes features and functionality that are only supported by deprecated collection instances.

Run time behavior

A collection runs in two phases.

In the first phase, the system creates a list of candidate steps to be executed, resolving any rows of the Collection tab with Another Collection or List View as the Execute field. Rules of these types can cause additional rules to be appended to the bottom of the list of candidate rules.

Steps execute from top to bottom to assemble this list. For steps with Another Collection in the Execute field, preconditions are evaluated. Rules for the called collection are included in the list only for steps with no precondition, or steps with preconditions that evaluate to true. Preconditions for other steps are ignored during this phase.

At the end of this phase, no candidate step contains Another Collection or List View in the Execute field; all such rows are expanded.

In the second phase, steps assembled in the first phase are evaluated in sequence, subject to preconditions and stop conditions. Preconditions are tested, and rules are executed only for rows that contain no precondition or a precondition that evaluates to true. Stop conditions (on the Preamble and Stop tab) are re-executed again for each row; any stop condition that evaluates to true causes the Collect instruction to end.

When all candidate steps are evaluated, the Collect instruction ends.

During execution of a collection rule, the page on which the collection rule operates becomes the primary page. The page keyword PRIMARY and the results of the tools.getPrimaryPage() PublicAPI method reflect this change. When the collection rule completes, the primary page of the calling activity resumes as primary.

Circumstances

Typically, the Circumstance Property and Circumstance Date Property field, if not blank, identify a property with no page name, starting with a period. When executing a collection rule, such references cause rule resolution to search the current primary page for the property and value. Other pages are not searched.

Logging

When the Save Execution Information? box on the Preamble and Stop tab is selected, execution of the Collect instruction causes execution details to be saved in a clipboard page named pxTraceCollection, an instance of the Log-Collection class. This page is saved, but not immediately committed to the PegaRULES database. Normal workflow processing typically provides the Commit operation later.

The key to a Log-Collection instance is formed from three properties:

  • Date and time of execution (property pxCreateDateTime ).
  • Purpose — second key part — of the collection rule ( pyPurpose ).
  • Handle of the rule on which the collection was applied ( pzInsKey ).

The pyTop property on this page identifies the top-level collection rule that executed. Embedded pages (of property pyAction ) identify the steps for rules that executed, in sequence. This page helps you identify steps not executed or executed more often than intended.

To present the page as a tree structure, run the standard activity Log-Collection.ShowCollectionSteps. The resulting chart identifies the elements of the collection.

Collection