Thursday 6 September 2018

Data Elements in Pega Applications

Data Elements in Pega Applications
Pega 7 applications collect data that is important to the case. Based on the data collected, decisions to best process and resolve the case are made. The element that stores the data is called a property.

Data in Pega Applications
A case type's data model defines the data structure for the case.
A data model is built from single value elements or collections of related single value elements.
A collection of related elements is called a data object.


Composition Example
Properties
  1. Data elements are called properties or fields.
  2. Properties can be either single value with no intended correlation with any other value, or a collection of related values.
  3. This distinction is explained by the mode of a property.
    • Value modes describe a single piece of information such as a total. 
    • Page modes describe a data object such as a customer. 




Value Mode Properties
  1. Use value mode for properties with no correlation to other properties. 
  2. There are three value mode properties: single value, value list, and value group. 
Single value (single value property) contains a single text string. Text, numbers, dates, Boolean values, and amounts a  re stored in single value properties.
A value list acts as a container for an ordered list of text values. The discount codes property is an example of a value l  ist. Each code is a single piece of information, but a clear relationship exists between the codes. 
A value group acts as a container for an unordered list of text values. The customer's phone numbers are defined as a   value group identifying the contextual meaning of each number: home, work, or mobile.

Property Types
 
Page Mode Properties
Page mode properties are organized similar to value mode properties. If a contextual relationship between single value properties is needed, you can use one of the defined page-mode properties:
A page is a single entity.
A page list is a numerically ordered list.
A page group is a semantically ordered list.
You must specify the definition, or a data type, that defines the property structure. 

How to Manage Properties
Pega provides several tools that help manage properties. They include the following:
Data Explorer
Data Model tab
Property rule form
The tools provide easy-to-use interfaces that add, update, and remove classes and properties.

The Data Explorer
Use the Data Explorer to add or remove data types.

Check if a suitable data type is available before creating a new one.
You can extend an existing data type if it only partly meets your needs. 


The Data Model Tab
Select a new data type and specify the data type you want to extend as the parent in the advanced settings. 
You can use the Data model tab in the Case Designer to add or remove fields from your case type.

Select Show reusable fields to display all fields inherited and available in the case type.

Selecting the Property type
When creating a new property, you must specify a type. There are three type options:
Simple types are similar to the property types defined on the property itself. Use a picklist if you need to display a static list of options to the user.

Fancy types allow you to provide the capability to upload an attachment, show a location on a map, or reference a user on the system.

Complex types define page and page list properties. A field group is a page and a field group (list) is a page list.

The Property Type Rule Form
The property rule form contains the property definition.
The property type cannot be changed after the property has been saved.
Data Access section: configure automatic data access and persistence settings.
Display and validation section: define how the property should appear on the screen by specifying a UI control.
 
Standard Property Rule Prefixes
Pega comes with a set of standard property rules.
The prefix identifies how you can use a standard property. 

How to Reference a Property
Refer to a property in Pega 7 by prefixing the property name with a “.” (period or dot).
.OrderDate — A single value property named OrderDate
.Phone(Mobile) — An entry in a value group property, such as the mobile phone number where Mobile is the group subscript
.DiscountCode(1) — The first entry in a value list property, such as one of the discount codes
.Customer — A page that contains customer information
.Address(Work) — An entry in a page group property, such as the work address, type

How to Reference a Property on a Specific Page
To refer to a specific property on a page, use the name of the page as a prefix for the property name.
This establishes an important piece of information about that property — its context.
The context of a  page — by itself or as part of a page list or page group — acts as a container for the properties it contains.


How to Reference a Specific Property on a Page
To refer to a specific property on a page, use the name of the page as a prefix for the property name.
Establish an important piece of information about that property — its context.
The context of a  page — by itself or as part of a page list or page group — acts as a container for the properties it contains.
If you want the city in the work address, specify .Address(Work).City.
Load disqus comments

0 comments