Class & Data Model
Data Model
·
A property
is nothing but a variable which can be used to hold the data.
·
Every
property rule describes the property name type of data it is modelling.
·
The
property rule is an instance of Rule-object-property
·
The
property will be created and saved in a class.While creating the new property
we should specify the name of the class towhom the property belongs to.
·
How to
create the model:Go to technical : Model-> RC -> New
Property Modes:
·
The
property mode used to specify that the property is going to hold single/ mul
values.
·
The most
commonly used property modes are :
Single
value:It takes only
single value
Value List:Allows
multiple values with single data type & it is an ordered list, it will act
like array(1)
Value Group: Allows multiple values, It is unordered List
Page: Allows multiple properties of difference data
types& a page is reference of a class
Page List:Allows multiple values with multiple properties. It is ordered list.
Page group:Allowsmultiplevalues
with multiple data types. It is unordered list.
Property types:
This input field can be used to specify
the data the property can be used.
The property types are:
Text,integer,double, Date time
HTML property:
It is used to change the appearance of
property when displaying it.
Table type: It can be
used to specify the list of data or the list of values, can be selected for the
given property but the property can be hold only one value at a time
Creating
multiple properties:To create
multiple properties we need to use define property wizard.
Go to data model -> RC ->define
property
Model Rule:
·
Model rules
can be used to initialize the properties with values for the instances of a
class.
·
Model rules
works similar as constructers in java. Model rules are part of technical category.
·
If the
model name is given as “pyDefault” then the model will be called automatically
when creating instances for those classes.
·
While
creating the model rule,“if call super class model” check box is selected then
the system initializes the property given in super class model first.
·
The model
rules can be referred in activity, starter flow rules, service rules, connecter
rules.
·
When
creating the model rule we need to specify applist to parameters & the
model name.
How to create data table:Go to PEGA logo ->Data model ->Tables ->“click on Add new
Table”.
While creating the table we need to specify the
following parameters.
Ø Class name (specify the name of the class to
which the table has to be associated)
Ø Then derives from “Data-“ to make the given class
as Data class.
Property:Specify the list
of the property that you want to make them as a part of data tables
Ø While creating the data table PRPC creates 5
associated rules. They are:
pyDefault, list, edit list, validate, data table class editor.
Creating embeddedproperties:
·
Toembed the
properties of one class in other class select the class that you want embed and
include that class in another class as a page.
·
To include
it as a page we also need to specify the class name.
Check in
& Check Out:
·
Check in
& check out functionality can used to allow users to modify or not modify
the rules
·
If the rule
is checked in status than the user can do the check out and modify the rules.
·
The save
icon is disabled when rule is checked in status.
·
If the rule
is checked out by one user then the remaining users will not be allowed to the
modify rule until the user do the check in of the same rule.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.