Package com.pega.pegarules.pub.clipboard

Clipboard, Page, and Property interfaces.

See: Description

Package com.pega.pegarules.pub.clipboard Description

Clipboard, Page, and Property interfaces.

Package Specification

General Concepts

In a PegaRULES system, pieces of data and configuration are represented by pages. Pages contain the data that is operated on by activities, the configuration that defines HTML screens, and the definitions of the activities themselves. All data and configuration is ultimately stored as a page.

Pages consist of a set of named properties each of which may contain a value. The kind of data that a property may contain is defined by its mode. The most basic values a property can contain are strings and pages. Properties can also contain aggregates: lists and groups. Lists are ordered collections of a specific kind of value. Thus, a list property can be of mode string list or page list. The other aggregate is the group. A group is a set of named properties that all have the same mode. A string group can contain only string properties, while a page group can contain only page properties.

There is a third kind of basic value a property may have: java object. Java object values can consist of any kind of Java object. Unlike String or Page, properties cannot be defined by the dictionary to be of mode Java Object. It is a mode used only internally. Java Object lists and groups may also be created. Java object values cannot be serialized to XML or storage stream forms; they are internal to the engine and only present in memory.

A property that contains a page is the page's parent. A property that is contained in a page is the page's child.

The clipboard is a repository for pages. A page on the clipboard always has a name and is not contained by a property. Such pages are sometimes referred to as User Named Pages. Other pages don't themselves have names-they are referred to by their parent property.

The clipboard is segmented into three levels of visibility. At the node level, all users in the same system node have visibility to the pages. At the requestor level, all threads in a the requestor (one user's session) have visibility to the pages. At the thread level, only the owning thread has visibility to the pages. The vast majority of pages are at the thread level.

Property and page names (identifiers) have some basic rules and guidelines. Identifiers created and used by the system may have prefixes. Identifiers that are prefixed with pz are created and maintained by the system and cannot be modified by users. The prefix px indicates a reserved page or property that should not be modified except by the system. Finally, py indicates a property that may be modified by anyone. A prefix is not required for public pages or properties.

Every page is an instance of an object. Most objects have a class defined by a Rule-Obj-Class instance. All classed pages have a property named pxObjClass which contains the name of the class (a key to Rule-Obj-Class).

Pages and properties may have messages attached to them. A message typically gives details on a problem with the page or property, such as the reason why it is invalid.

Property Modes

All properties have a Property Mode. The mode is determined by its Rule-Obj-Property definition. Property Modes determine the content and structure of the property's data. For instance, a String mode property contains a single string value while a Page mode property contains a collection of named properties. The following modes are defined in PegaRULES:

Property Types

All properties have a Property Type. The type is determined by its Rule-Obj-Property definition. Property Types describe the kind of data stored by the property. For instance, a String property might have a type such as Date or Number. The following types are defined in PegaRULES:

Property References

Practically any expression found in PegaRULES may contain a property reference. A property reference is used to specify a particular property from the clipboard or relative to a page.

Each element of a reference is separated from the rest with periods. If a reference does not start with a period, it is an absolute reference. The first element of the reference is the name of a page on the clipboard. If the first element is empty (the reference starts with a period), then the reference is relative to a provided page.

Elements after the first are all property names. Property names may have a subscript enclosed in parentheses. A numeric subscript indicates that the property is a list. Otherwise it is a group.

All properties in a reference must contain a page value. This means that any lists or groups in the reference must be Page Lists or Page Groups. The only exception is the final property, which may have any mode.

Some examples:

  1. CustomerPage.pyAddresses(Home).pyCity
  2. InvoicePage.ItemList(3).Cost
  3. .ColorList(6)
In example 1), CustomerPage must be the name of a page on the clipboard. pyAddresses must be a Page Group property on CustomerPage with a Home member. The page contained in pyAddress(Home) must contain a property named pyCity. pyCity can be of any mode (string, page, string list, java object, etc).

Example 2) shows the use of a Page List property named ItemList.

Example 3) shows a relative reference. ColorList is a list property. Since it is the final property, we can't tell just what kind of list from the reference. In addition, since this is a relative reference, the user must specify a page when resolving it.

Copyright © 2014 Pegasystems Inc. All Rights Reserved.