Properties in Pega
Properties
Ø Data model refers to a set of rules
that work together to populate the data in your application
Ø
Property Definition:
Is
just like a variable that stores the data and gives a label
to it (you will
experience it when drag & drop) is an instance of Rule-Obj-Property
Is created as an instance of Rule-Obj-Property & stored in rules.pr4_rule_property
table in PegaRULES db
Attributes of Property (like Variable):
Regularly
used attributes (characteristics):
à
ID: Name of the Property
(Case sensitive) – nothing but the Column name in db tables
à
Property modes (11): defines the structure of Property
The
property Modes are broadly categorized into 3, these in turn categorized into 11
·
Main
modes are 3:
1. Value (Single
value, Value list & Value group)
2. Page (Single
page, Page list & Page
group)
3. Java (not used, but rarely)
·
Very important out of 11 are:
Single value, Single
Page & Page List
à
Property type (11): Type of data it holds
like Text, Integer, DateTime, Decimal …
F
Decimals (better
prefer it – financial applications) are used to store exact values
while Doubles to store approximations.
F
Decimals uses
the most space than Doubles
F
The default format of DateTime (on Clipboard):
20210713T032301.331
GMT [i.e. “dd/MMM/yyyy
hh:mm:ss” “IST”]
à
UI Control: It gives the presentation style (like Checkbox, Dropdown…) of
the Property whenever added on ‘Section layout'
F
Better use the
Control in Layout, don’t
use this UI Control which is overridden
by that Layout Control
à
Table values (depends on
Table type LOVs): These are the list of values (LOVs
- static) for Dropdowns, Radio buttons …
à
Use validate: To validate single Property using
Edit Validate rule (Java source code)
à
Do not save property data: It doesn’t
allow you to persist data into table
à
Column inclusion (expensive job): To expose data from
the BLOB
Ø
Properties are like back-end whereas Controls are like front-end. Combinations of both works
at run time. Be cautious about these
combination
Ø
Its run time values are stored & even accessed through Clipboard pages, later
we can persist into table by using Activity rule at your need
Ø
Optimized
Property (Exposed): Structured
Is a single
value Property that is visible as column in the db table is said to be
exposed
Better optimize it through ALTER command
Ø Property Mode and Property Type are mandatory attributes to create any Property.
There are 11 Property modes and 11 Property types
·
Property Modes:
Single
Value:
à Single
value in a single cell, stores on the page (Run-time)
Value
List (Array):
à Ordered
list of single values with integer index
Value Group:
à Un-ordered
group of single values with string index
Single
Page:
à Just
single page (data structure) where it
stores Property-value pairs of
specific Class (Run-time)
Page List:
à
Ordered list
of embedded pages (data structure)
with integer index
à
Stores ordered list of pages of specific Class
(Run-time)
Page
Group:
à
Un-ordered list
(group) of embedded pages (data
structure) with string index
à
Stores un-ordered list of pages of specific Class
(Run-time)
Note: Java modes - For rare cases
Ø Property Types (11): like Text (default), Integer, Double, Decimal,
True False, Date Time, Date, Password, Currency...
Ø All the OOTB
Properties that comes with installation are identified by prefixes px (Read-only), py (Read and
writeable)
& pz (Can’t read or write - Reserved)
Ø
Very imp OOTB (Predefined / Standard) Properties:
F Remember, we reuse these standard properties very frequently.
F Some of very important are:
pxCreateOperator / pxUpdateOperator / pxCreateDateTime / pyLabel / pxObjClass /
pyClassName /
pxFlow / pyUserIdentifier
/ pyUserName / pzPVStream / pzInsKey
/ pyID / pxUrgencyWorkClass /
pyStatusWork / pySLAName
/ pySLAGoal / pySLADeadline / pxUrgencyWorkClass …
F Mainly Properties are 2 kinds:
Predefined & Custom
Ø
Auto populate Property:
Provides transparent access to tables through
Data Page (by
Refer to ... & Copy ... options) but without having to
reference of Data Page directly
(as in dropdown)
à
Data Access Patterns: To improve the speed
(implementation time) and quality (reliability of application) of development with PRPC. These are extremely powerful when used properly
Ø
Don’t forget at all ‘Properties are always
case-sensitive’ not like other rules
Ø
Bulk
Properties can be created in at a time using ‘Create Properties’ wizard (better
use it only at ‘non Work-’ class)
Path: App Explorer > Class (r.c) > ‘Create
Properties’
Ø
Be cautious before delete it & check whether these Properties are
referenced (Actions menu > View
References) before delete it
Ø
Always group common
reusable Properties into FW data layer (class)
{{ then - call it into data structures like Page, Page
List defined Work classes}}
Ø
Properties in Pega represent columns
in the table. Both must be identical i.e. same data type & may be different names but must be mapped in
External Mappings tab
Ø
Data access types:
Manual:
It takes
value directly from UI
Refer to a
data page:
It takes
latest value from DB table via Data Page
Copy data
from a data page:
It takes
value only from Data Page as a snapshot
Ø
Table
types:
Local list / Prompt
list / Remote list / Field Value / Class key
Ø
Flag
Property: Is a value that tells you the state
of program execution (i.e. signal
the program execution)
Ø
Pega creates a column only when you optimize Property, until then it is
stored in BLOB after submitting from Clipboard
Ø Core
steps to optimize
Properties:
à 3 types of Variables
in Pega:
Properties (Class scope) |
Parameters (Global scope) |
Local
variables (Within Activity scope) |
To pass values (has memory) |
To pass values (less memory) |
To pass values (very less memory) |
To store data in Clipboard page, later saved into db
(as both exposed &
BLOB) if needed |
To reuse the program globally by just
passing the values (i.e. just to carry, not to store) |
To pass
values within Activity |
Of course these are mandatory
to store values |
These are optional, but use it very extensively in all
programs you configure Can be defined in
Parameters tab & also in Steps
itself – but a little difference |
These are optional, rarely
used |
Scope: Parent-child scope |
Scope: Global |
Scope: within Activity |
It has name, class & page |
It just holds
data in parameter
page which has
nameless, classless & page less - so Never
saved, But possible to store, by mapping it into Properties. |
It holds
data in local page
(StringBuffer in Java), which also has nameless, classless &
page less - Never
saved, But possible to store, by mapping it into Properties. |
Referred as: Page1.EmpID |
Param.EmpID |
Local.EmpID |
Viewed on both clipboard,
Tracer |
Viewed only in Tracer (> Parameter page name) |
Viewed only in Tracer (> Local variables checkbox
> View local variables) |
Memory occupies (permanent) Note: Property rule is
stored in table pr4_rule_property, but run-time values are
stored on clipboard |
Less
Memory
(temporary) |
Very less Memory (very temporary) |
Defined as: An instance of Rule-Obj-Property in RS & Class
combination |
Defined in Parameters tab of many rules Note: Parameters defined in this tab can be passed from outside, whereas
defined in Steps tab of Activity can be passed from within itself |
Defined in Parameters tab of only Activity,
so called within Activity itself |
Every rule has Properties, in general |
Not every rule has parameters |
Only Activity
rule has it |
It has ‘Type of data’ like Text, Integer... |
It also has ‘Type of data’ |
It has only ‘Type of data’ |
Required, Input & Output |
Required, Input & Output |
No Required & No Input & No Output options |
------- |
Rules can also be parameterized i.e. only certain rules
like Section, Flow, Data Transform, Activity, Function, Messages, and
Collection. |
------- |
Comments
Post a Comment