auto-populated property

An auto-populated property is a Page mode or Page List mode property with a concrete Page Class that has as values entire objects from the PegaRULES database, or copies of pages developed by a Data Page rule.

When this optional feature is enabled, PRPC automatically retrieves the referenced instance whenever the key property has a value and a non-key property is accessed. (In advanced configurations, auto-population occurs at other times.)

An auto-populated property defines a relationship between instances of one class and instances of another class, analogous to the foreign key attribute in relational databases. By automatically and dynamically implementing the relationship — retrieving the object as soon as any property value of the object is needed and a key to the object is available — this feature provides a limited form of "backward chaining" for Page or Page List properties in certain common situations.

Example

For example, a securities application contains a class Data-BondMaster that defines individual corporate bonds. Each bond issue identified by a single key (CUSIPNumber property). Other properties in the Data-BondMaster class record the issuer, maturity, face value, and other characteristics of the bond.

A workflow for trade settlement involves a single bond issue, identified by CUSIPNumber, but the workflow requires several facts about the bond. To simplify the application, developers defined an auto-populated property by these steps:

  1. During development, defining a Page property (call it Bond) of class Data-BondMaster, and selecting Auto-populate Property option on the Advanced tab of the Property form.
  2. During work item creation, requiring the user to select a CUSIPNumber value.
  3. Setting the value of property Data-BondMaster.CUSIPNumber to the user's selection.
  4. Displaying a Data-BondMaster.pyLabel value.

Step 4 — not step 3 — triggers auto-population; the system locates the Bond-Master object in the PegaRULES database and loads it into the Bond Page on the clipboard. (Additionally, if the CUSIPNumber property appears on a flow action form with an associated Client Event behavior of OnChange, the additional property values are immediately visible.)

Later, the user may discover that she initially picked the wrong CUSIP. If she chooses a different CUSIPNumber, and the application sets that value to Data-BondMaster.CUSIPNumber, the next time that Data-BondMaster.pyLabel (or any Data-BondMaster property other than CUSIPNumber) is displayed or read, the auto-population occurs again.

Benefits

By auto-populating a property, application developers eliminate the need to create numerous short activities that typically consist of an Obj-Open method followed by a Property-Set and Page-Remove method.

By declaring relationships among classes, developers are recording data structure within properties instead of within activities, where they may be less easy to see and understand.

Configuration

To enable this feature for a Page mode or Page List property, complete the Auto-populate Property fields on the Advanced tab of the Property form.

Related Topics IconRelated terms