Back Forward More about Collection rules
 

  1. About 
  2. New 
  3. Basic/Advanced 
  4. Preamble and Stop 
  5. Parameters 
  6. Pages & Classes 
  1. History 
  2. More... 

Collect instruction

Use the Collect instruction in an activity to execute a collection rule.

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.

Primary page

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.

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:

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

Debugging

Use the Tracer tool to debug Collect instructions. In the Event Types to Trace area of the Trace Options form, select the Collections checkbox. Ensure that the RuleSets containing the collection rules are also checked.

Related topics Collect instruction

UpAbout Collection rules