CLASS
Ø Class:
à Class is a blueprint (of types Abstract & Concrete) whereas Object (Instance)
is an instance of it (i.e. Concrete class)
à Used to organize
& re-use the code (rules) in
it
à Pega
Class represents the applicability (or scope)
of the rule & used to organize
& reuse the rules and is also a rule
of type Rule-Obj-class
F Applicability (Apply to field on ‘Class Create form’) = how reusability is defined
Ø Inheritance types: Reusing the rules from parent
classes
Inheritance
is the process of reusing the code (rules) from Parent to child but not vice-versa
It
has 2 types:
1) Directed (mandatory):
Regardless of the names relationships, the inheritance is known as directed
Inheritance
Represented by SOLID line
2) Pattern (Optional):
Relation
between the classes in which the prefix of child class must match with Parent
class
Note:
If any class has both the
inheritances (parents), the relation is called Dual inheritance
Represented by DOTTED line
Ø Class
Types:
1. Abstract Class: (only definition)
à It is a generalized
class which can't be instantiated (only definition)
à Only definition
(of code), no implementation, so no table is mapped to it
2. Concrete Class: (Both definition & Implementation)
à It is a specialized
class which can be instantiated
à Both definition
(of code) & implementation, so table must be mapped to it
à Concrete Class types:
1) is
a class group class is an
instance of Data-Admin-DB-Class Group,
used to store its related work objects into a
single table & is identified by pyID
ð Work
pool is a
collection of work types, which grants access to users to create work objects
that are part of that application
2) belongs
to a class group class (Work
class or Work type or Case type) is a concrete class derived from work-
base class & it must have Class Group as pattern parent and
it defines the type of work being
performed (through Starter Flow rule)
3) does
not belong to a class group
class is a concrete class derived from the class other than work- class(mostly from Data- layer) and it should not have Class Group as pattern parent and even not
work- as directed parent and it has mostly data objects to define reference
data (application data)
Ø Implementation class (Implementation
layer): Is a class that belongs to your Application Rule Sets
Ø Framework class (re-used FW layer): Is a class that belongs to a RuleSet that is not
one of your Application Rule Sets
Ø Internal Class: Is a Class that corresponding to instances saved in
the PegaRULES database
Ø External Class: Is a Class that corresponding to instances saved
in the database other than PegaRULES
Ø To reuse FW functionality into Implementation layer:
a) Provide FW as built on
Application
b) Class compatibility (Work
Class > FW Class as Directed parent)
Ø PRPC standard (OOTB – Predefined) Class hierarchy:
@baseclass Work- Data- Assign- History- Index- Code- Embed- Rule- ... 25+ base classes |
·
@baseclass is the ultimate base (top-level
abstract) class in Pega whereas OBJECT is in JAVA
à We
need to create our top-level abstract class on our Organization name, say IBM-called Enterprise
level class (ECS–Organizational layer) which is usually derived from Work-Cover-
à @baseclass again contains 22+ base classes as its immediate
layer
·
Work– : Regularly
used for transactions
(Work objects are derived from it)
à Work- base class is the immediate abstract class to
@baseclass.
à This Work
layer is used to define Work (transactional) data
à Our Implementation & Framework layers must
be indirectly inherited from this Work-
à Work-Cover-: Cases (Cover objects) are generated from it (Case Management)
à Work-Folder-: Folder objects are generated from it
à Work-Object-: Normal Work objects are generated from it
·
Data– : Regularly
used for multi-purpose
(Data objects are derived from it)
à Data- base class is the immediate abstract class to
@baseclass
à This Data
layer is used to define Reference data i.e. application data (stored in Data Table); Repeating data i.e. embedded data(stored in Index Table); Maintenance data (like Data- instances as OperatorID...); global level
Common info (like Section created here with Properties)
F Global level
Common info: Moreover, the functionality (rules) defined here can be
re-used globally across applications by accessing through different page references,
without creating the same rules repeatedly
à The
rules created in (applied to) this Data
layer can be accessed into other
classes like Work layer by using pages
·
Assign–: Regularly used, but very important (Assignment
objects are derived from it)
à Assign- base class is the immediate abstract class to
@baseclass
à This Assign
layer is used to define assignments (pending cases) routed to assignees
à Assign-Worklist concrete class: Worklist
assignments are stored in pc_assign_worklist
à Assign-Workbasket concrete class: Workbasket
assignments are stored in pc_assign_workbasket
à Its Foreign key is: pxRefObjectKey
·
Index–: Rarely
used, used for indexing of
embedded data
à Index- base class is the immediate abstract class to
@baseclass
à Indexing supports easy reporting & rapid
data access, so this Index layer is used to define indexing
between Work & Index tables using KCP in the order i.e. pxInsIndexedKey
(pk), pxIndexCount (row number) & pxIndexPurpose (Declare Index name)
·
History–: Not regularly used (Automatic process for
Work, Rule and most Data objects)
à History - base class is the immediate abstract class to
@baseclass
à This History
layer is used to define history objects for Work, Data, Rule to its
respective history tables i.e. pc_history_work, pr_data, pr4_history_rule
à These instances are automatically created for each
Work, Data, Rule instances. We also can create audit trail as needed using Add
History activity, History-Add
method
à You also can control Work history records not
to write into its History table
using both the System Settings
rule Pega-ProCom.FilterHistory (set 2 = WRITE_NONE according to your production level) and run the Activity
resetFilterHistory
(History-Work-) or restart the server respectively. So that you
can improve system performance by reducing the number of unnecessary history
writes to the pc_history_work table.
F Use Decision Tree rule FilterHistory (Work-) to restrict
the history records to be written
·
Code- : Mostly used in embedded data context, but reserved (Read-only records)
à Code- base class is the immediate abstract class to
@baseclass & Reserved for Pega 7 Platform's own implementation
à Code- classes directly reference server
program code.
à You cannot
define classes that are derived from Code- classes
à Pages of Code- classes exist only on the
clipboard, so we can work these Properties & Pages; these pages can’t be saved to PegaRULES db because these exist only temporarily in memory
à Log-in screen is loaded by Code-.Web-Start activity
à Code-Pega-List is similar to Result set in JAVA
·
Embed-: Not
used (used to hold embedded data, but Data layer is used as an alternate to it
regularly)
à These are never
to be used as top-level structures.
No saved instances of concrete Embed- classes ever exist and used only for embedded pages
·
Rule-: Regularly used by Developers (coding part)
à Rule- base class is the immediate abstract class to
@baseclass
à This Rule
layer is used to define Rule instances to build the project by developers
à Rule
Resolution is applied only
on these Rule- instances
Comments
Post a Comment