The External Mapping tab is used primarily for external classes. External classes are created by the Connecotr and Metadata wizard or the Database Class Mappings gadget and are linked by a Database Table data instance to a table in a database other than the PegaRULES database.
Typically, the data on this tab is from one of these two tools, and no manual changes are required.
|External Table Column Mapping|| Optional. Leave blank unless this class is an external class that represents a
table in an external database (generated by the Connector and Metadata wizard or the Database Class Mappings wizard), or you are replicating scalar embedded
properties as described below. |
Fields in this section map the properties generated for the class rule to the columns in the external table.
|Column Name||For generated class rules, the name of a column in the external table.|
|Property Name||For generated class rules, the name of the property that represents the table column in the Column Name field.|
Exposing an embedded Single Value property value into a column
For a concrete internal class, you can use this tab to expose match an embedded
Single Value property in a database column.
For example, the embedded property .pyPreferences.pyNavigationPrefs.pyShowTabs manages whether a user wants to use tabs in his or her developer environment.
If it were important to use this embedded property as report selection criteria, the property must correspond to a column. Use these steps to make a (scalar) embedded property available as a database column.
- Ask a database administrator to create a new column of the appropriate data type in the
PegaRULES database table that corresponds to the Data-Admin-Operator-ID
table. In this example, the table is
pr_operators. The database administrator created a text column named TABDISPLAY. (You cannot use the Modify Schema wizard to add this column, because there is no property named TABDISPLAY.)
- Update the Class rule for the class Data-Admin-Operator-ID. Add a row to the Column Mapping array on this tab. Enter the new column name TABDISPLAY the Column Name field and the embedded property reference in the Property Name field.
- Thereafter, the system updates the new column TABDISPLAY from the embedded property .pyPreferences.pyNavigationPrefs.pyShowTabs.pyTabs whenever an Operator ID data instance is saved. The property reference .pyPreferences.pyNavigationPrefs.pyShowTabs.pyTabs can be used as criteria in reports.
This feature provides a direct but limited alternative to creating an Index- class and maintaining the index through a Declare Index rule, or to replicating the value to a second (top-level) property using a Declare Expression rule or Declare Trigger rule.
- In contrast to a Declare Index approach, the embedded property must be a scalar reference, not an aggregate.
- You can use this approach to expose one fixed scalar value within an aggregate property, such as pyWorkparty(“Originator”).pyLastName for the last name of the Originator work party in a work item. In most situations, however, you want to expose all values, not a single value; the technique described here does not suffice.
- Like other schema changes, the database administrator must add the column in every system that contains the report rules (such as development, test, and production systems).
- You can update Class rules that belong to foundation rulesets (for example, the Data-Admin-Operator-ID class).