PRPC 5 4 Enterprise Class Structure 0
PRPC 5 4 Enterprise Class Structure 0
Best Practices and Implementation Guidelines
© Copyright 2009
Pegasystems Inc., Cambridge, MA
All rights reserved.
This document describes products and services of Pegasystems Inc. It may contain trade secrets and
proprietary information. The document and product are protected by copyright and distributed under
licenses restricting their use, copying, distribution, or transmittal in any form without prior written
authorization of Pegasystems Inc.
This document is current as of the date of publication only. Changes in the document may be made from
time to time at the discretion of Pegasystems. This document remains the property of Pegasystems and
must be returned to it upon request. This document does not imply any commitment to offer or deliver the
products or services provided.
This document may include references to Pegasystems product features that have not been licensed by
your company. If you have questions about whether a particular capability is included in your installation,
please consult your Pegasystems service consultant.
Although Pegasystems Inc. strives for accuracy in its publications, any publication may contain
inaccuracies or typographical errors. This document or Help System could contain technical inaccuracies
or typographical errors. Changes are periodically added to the information herein. Pegasystems Inc. may
make improvements and/or changes in the information described herein at any time.
For Pegasystems trademarks and registered trademarks, all rights are reserved. Other brand or product
names are trademarks of their respective holders.
2 Changes and Enhancements in PRPC v5.4 that affect the ECS .......................................... 8
3.6.3 Deployment......................................................................................................... 13
1 Overview
The class hierarchy is an integral part of every application. Designing a scalable, extensible enterprise
class structures from the beginning of your project helps avoid costly re-factoring. The enterprise class
structure enables PRPC applications to co-exist with each other and with customer or Pega built
frameworks.
The enterprise class structure is also the foundation for enterprise reuse. Asset reuse is integral to the
long-term success of BPM within the organization and ultimately, the reusability requirements drive the
selection of your class hierarchy design.
Figure 1 below shows the Pegasystems recommended Enterprise Class Structure for applications built
on the PegaRULES Process Commander v5.4 platform.
Note: This class structure is automatically generated by the Enterprise Application Accelerator (EAA)
wizard available in PRPC v5.4 when you choose the ‘New Framework and Implementation’ option.
FW- (Work-)
Data- (Data-)
Int- (Data-)
Divisional Reuse
MyCo-Div1- (Work-) Layer
Data- (Data-)
@baseclass
Int- (Data-)
Work-
Work-
Cover-
Implementation Framework
Work-
Layer Layer Object-
MyCo-Div1-Implementation1- (Work-) MyCo-FW-FrameworkName1- (Work-)
Data-
(MyCo-FW-FrameworkName1-Work-
WorkType1 WorkType1 (Work-Cover-)
WorkType1)
(MyCo-FW-FrameworkName1-Work-
WorkType2 WorkType2 (Work-Object-)
WorkType2)
Do not attempt to override standard activities, harnesses, flow actions, etc. that may or may not be
marked as final rules. This will ensure a smoother migration to new releases of the PRPC platform.
The classes within the Divisional Reuse layer inherit from their counterparts in the Enterprise Reuse
layer; the classes of the Enterprise Reuse layer inherit directly from the Work- and Data- classes.
PRPC V5.4 Enterprise Class Structure Page |3
MyCo-FW- (Work-)
Namespace qualifier for Customer Built Frameworks (CBFs).
MyCo-Data- (Data-)
Namespace qualifier for enterprise wide data classes available to all applications and
frameworks.
MyCo-Int- (Data-)
Namespace qualifier for enterprise wide integration classes (generated data classes for
connector rules) available to all applications and frameworks.
Create one Divisional Reuse base class per division that implements one or more of the CBFs
from the Framework layer.
MyCo-Div1-Data- (Data-)
Parent class for division wide data classes available to all applications and frameworks.
MyCo-Div1-Int- (Data-)
Parent class for division wide integration classes (generated data classes for connector rules)
available to all applications and frameworks.
Table 1: The Classes of the Enterprise Reuse and Divisional Reuse Organizational Layers
4|Page PRPC V5.4 Enterprise Class Structure
A CBF must be able to stand on its own; therefore, this layer contains all rules necessary to implement
its functionality. While there will be a class group and its mapping to a database table for testing
purposes, the actual mapping of the application to production database table occurs on the
Implementation layer. Organization specific logic, processes and rules must be placed on the
Implementation layer as well; only default edits, values, and application structures have their home in
the CBF layer. The CBF and its implementation classes can be considered the equivalent of an “ASP”
model, where the CBF is the base application.
Pegasystems-built frameworks also reside in the Framework layer. A customer application that is built
on a Pegasystems solution framework may directly implement the solution framework classes, or they
may be a CBF themselves. In the former case, there are one or more specialization layers on the
Implementation level, and the Pega solution framework on the Framework level. In the latter case, there
are one or more specialization layers on the Implementation level and the CBF and the Pega solution
framework on the Framework level. The CBF has the Pega framework as its directed parent.
PRPC V5.4 Enterprise Class Structure Page |5
Figure 2: Pegasystems Solution Frameworks – implemented with (F1) and without (F2) a CBF
6|Page PRPC V5.4 Enterprise Class Structure
MyCo-FW- (Work-)
Namespace qualifier for all Customer Built Frameworks (CBFs).
MyCo-FW-FrameworkName1- (Work-)
Namespace qualifier for a specific CBF by the name of FrameworkName1.
MyCo-FW-FrameworkName1-Work (Work-)
Concrete class serving as the class group for the CBF, mapping instances of the CBF work
classes to a database table. (This mapping is for testing purposes only; the mapping of the
actual work objects happens on the Implementation layer – see below.)
MyCo-FW-FrameworkName1-Work-WorkType1 (Work-Cover-)
MyCo-FW-FrameworkName1-Work-WorkType2 (Work-Object-)
CBF work classes that implement cover, folders and/or work objects. These classes directly
inherit from the Work-Cover- and Work-Object- classes in the PRPC Base Product layer.
MyCo-FW-FrameworkName1-Data- (Data-)
Parent class for data classes specific to the framework.
MyCo-FW-FrameworkName1-Int- (Data-)
Parent class for generated data classes (for connector rules) specific to the framework.
Table 2: The Classes of the Framework Layer
MyCo-Div1-Implementation1- (Work-)
This abstract class serves as namespace qualifier and the organizational pattern inheritance path.
MyCo-Div1-Implementation1-Work (MyCo-FW-FrameworkName1-Work)
Concrete class serving as the class group for the application, mapping the instances of the
application work classes to the production database table.
MyCo-Div1-Implementation1-Work-WorkType1 (MyCo-FW-FrameworkName1-Work-WorkType1)
MyCo-Div1-Implementation1-Work-WorkType2 (MyCo-FW-FrameworkName1-Work-WorkType2)
Application specific implementation work classes of Work Covers, Folders or Objects. They directly
inherit from the respective CBF classes in the Framework layer.
MyCo-Div1-Implementation1-Data- (Data-)
Abstract parent class for application specific data classes.
MyCo-Div1-Implementation1-Int- (Data-)
Abstract parent class for generated data classes (for connector rules) specific to the application.
Table 3: The Classes of the Implementation Layer
8|Page PRPC V5.4 Enterprise Class Structure
Changes and enhancement in version PRPC v5.4 of the PRPC base product affecting enterprise reuse and
the recommended Enterprise Class Structure include:
1. The Work- class has been “opened” to application RuleSets, i.e. it is now possible to save rules
that apply to the Work- class or its named descendents to application RuleSets. However, it is
recommended that you do not save enterprise wide and division wide extensions to work
classes directly in the Work- class. The reason is that burgeoning numbers of rules in that class
would “pollute” it. Because the Class Explorer tool shows all inherited rules of application work
classes, navigation would become difficult as the number of rules in the Work- parent increases.
Instead, extensions to the work class should be saved in the Enterprise Reuse or Divisional Reuse
layers, based on their scope. Enterprise wide extensions to work classes should be saved in
MyCo-; extensions for reuse within a single division should be stored in MyCo-Div1-.
o The Details tab allows capturing business objectives, work types, actors and categories
of supporting use cases.
o The Use Case tab lists all Application Use Cases associated with the Application.
o The Manage tab allows enabling Project Management features in the PRPC Developer
portal for developer using this application.
4. Enterprise Application Accelerator (EAA). While this wizard has been around for a long time, it
now cleanly dovetails into the output of the Application Profiler wizard. The EAA can create a
complete Enterprise Class Structure consisting of a Customer-Built Framework (CBF) on the
Framework layer and organizational implementation classes on the Implementation layer.
These enhancements have prompted an evolution of the best practices around enterprise reuse. This is
the reason why some of the sections of this document break out best practices based on whether the
application is being developed on a PRPC v5.4 vs. a pre-5.4 platform.
PRPC V5.4 Enterprise Class Structure P a g e | 11
The following sections contain practical guidelines for implementing applications based on the
Enterprise Class Structure. The guidelines use the layer naming of the PRPC v5.4 Enterprise Class
Structure. However, they are applicable for the pre-5.4 Enterprise Class Structure as well.
Note: Toward that end, many customers initially create only the CBF class hierarchy and develop
and test the application in that class layer. Once the application is up and running, they create
the Implementation layer, which contains mostly “stub” flows and activities. They add
specialized rules as needed, by opening the generalized counterpart in the CBF and saving a copy
of the rule to the class & RuleSet in the Implementation layer.
When you are starting from a “green field”, you are not reusing an existing CBF but you are building the
CBF and the Implementation layer of the application as part of your development, the question arises
where to put a given rule: in the Framework layer or in the Implementation layer?
The answer is: either in the Framework layer, or in both in the Framework and Implementation layers.
A rule should never exist only in the Implementation layer because then the CBF cannot use it.
Whether the rule is just in the Framework layer or in both the Implementation and Framework layers
depends if you consider the rule as generic and reusable, or as specialized. If you can’t think of a
generalized version, that is probably an indication that the “specialized” rule is actually generic and
should be put into the Framework layer.
Again, your guiding principle should be to create a CBF that can stand (and run) on its own. This is a
prerequisite for the CBF to be reused by other organizational divisions.
12 | P a g e PRPC V5.4 Enterprise Class Structure
The list of flows that appear in the New gadget of the work portal, or the Run > Process dropdown of the
Developer portal is dynamically built from flow rules available in the organizational work classes.
Therefore, you will need to create a stub flows in the respective work class that calls the generic flow
rule in the Framework layer.
The stub flows must have a name different from the name of the corresponding generic flow. Choose a
name for the specialized flow that contains the name of the generic flow for easier reference, such as
CreateCaseStart [specialized] and CreateCase [generalized].
3.4 Activities
Activities that create work objects (such as agent activities or service activities) must be defined in the
Implementation layer. These activities should create a pyWorkPage of the Implementation layer work
class and then call the respective activity in the Framework layer.
The stub activities must have a name different from the name of the corresponding generic activity.
Choose a name for the specialized activity that contains the name of the generic activity for easier
reference, such as CreateCaseSvcStart [specialized] and CreateCaseSvc [generalized].
Using the syntax =MyDeclarativePage.pySOAPURL instead of a hard-coded URL string allows dynamic
settings of these environment properties in Global Resource Settings. The entire mechanism is explained
in PDN article http://pdn.pega.com/Devnet/PRPCv5/KB/24171.asp.
Some types of Connect rules (Connect SOAP, Connect dotNet, Connect HTTP) allow you to include
authentication credentials in HTTP headers. These credentials cannot be stored in Global Resource
settings. The respective username and password properties must be set in a wrapper activity in the
Implementation layer that calls the Connect activity in the Framework layer.
3.6 Services
The Service Package name must be a system-wide unique name; therefore, service packages with
unique names must be created for each Implementation layer. The Service Rules contain the Applies To
class name of the Service Activity. In most cases this class must be the Implementation work class.
Therefore, you need to create clones of Service Rules in the Implementation work class.
Because Service Rules have the package name as the database key, the implementation specific Service
Package must be created first.
3.6.3 Deployment
The Deployment files (WSDL for Service SOAP or dotNet, JAR for Service EJB or Service Java) contain the
endpoint URL and must therefore be generated on each implementation node the application is
deployed. Once all Service Rules have been created the developer should open the Service Package
again and click the Show Service Methods button in the Methods tab to list the services that have the
14 | P a g e PRPC V5.4 Enterprise Class Structure
package name as the first key part. To generate the deployment files the developer must press the
Generate Deployment Files button in the Deployment tab.
Exercise care to prevent name collisions with the Implementation layer. It is recommended that you
prefix the name of test data instances with the string ‘CBF’ followed by the framework name.
What about the proxy classes (Axis client stub classes) in PRPC prior to version 5.4 – can these classes be
unique, i.e. are they located in different directories / packages? Yes they are in a generated directory /
package.
We recommend eliminating the risk of backward incompatibility by using different service names for
different versions of services.
All rules that make up the application are located in the parent work class; the leaf classes provide mere
entry points that add the standard Work-Cover- and Work-Object- rules from the PRPC product layer.
The specialized work class in the organizational layer may inherit from either the work cover or work
object leaf class.
Work (Work-)
Work-
Work-
Cover (Work-Cover-)
Cover-
Work-
Object (Work-Object-) Object-
Int- (Data-)
Figure 4: Making a single work class available as Cover and as Work Object
3.11 RuleSets
The rules of an application, shared or specialized, are stored in several RuleSets. There exists at least one
RuleSet per layer of the Enterprise Class Structure. Since PRPC v5.4, the RuleSet rule form allows you to
categorize RuleSets into Standard, Component, Shared and Override RuleSets. The RuleSets that contain
the rules in the various layers must be categorized as shown in Table 4 below.
16 | P a g e PRPC V5.4 Enterprise Class Structure
Enterprise Class Structure Layer Enterprise Class Structure Layer RuleSet Type
(PRPC 5.4) (PRPC versions before 5.4) (PRPC 5.4)
Implementation Layer Specialized Organizational Layer Standard
(ORG)
Framework Layer Generalized Application Layer Standard (after all, a CBF is an
Customer-Built Framework (CBF) (GAL) application by itself)
Component (embedded property Component (embedded property Component
of a Work class; reuse through of a Work class)
composition rather than
inheritance)
Enterprise Reuse Layer Enterprise Shared Layer (ESL) Standard (these RuleSets
Divisional Reuse Layer typically contain classes and
their rules. Therefore, they do
not meet the requirements for
RuleSet type Shared)
Table 4: Enterprise Class Structure Layers and RuleSet Categories
3.12 Applications
The RuleSets and Use Cases of the specialized application (Implementation layer) should be defined in
Application rules. Specialized applications are built on the framework applications.
The RuleSets and Use Cases of customer built frameworks (Framework layer) should be defined in
separate Application rules. The framework applications are built on either another CBF, a Pega built
framework application, or the PRPC 5.4 application.
Extensions (enterprise reuse and divisional reuse layers) should not have their own Application rules as
they do not constitute complete applications. Nevertheless, their RuleSets must be designated as type
Standard in the Category tab of the RuleSet form because its rules don’t operate on a top-level class, but
rather contains a series of classes and their rules. Extension RuleSets should be referenced in the
Application RuleSets list of the Application rules of the frameworks and/or specialized applications that
depend on them.
We recommend creating application specific access roles by cloning and customizing the Pega OOTB
access roles using the Access Role Editor tool, available on the developer portal by selecting Tools >
PRPC V5.4 Enterprise Class Structure P a g e | 17
Security > Role Names. Create separate access roles for each user profile, for example:
ClaimsApp:ClaimsRep, ClaimsApp:ClaimsMgr, ClaimsApp:SysAdmin, etc.
When you need to override access security for an Implementation work class you may create an access
role just for that work class in an application RuleSet. This access role can be referenced in the user’s
access group in addition to the access role from the framework. The access settings that you define on
the Implementation work class will override the respective settings of its parent class as defined in the
framework access role.
You should define one Product rule for each Implementation layer; you should define one Product rule
for each framework; you may define Product rules for the extensions.
18 | P a g e PRPC V5.4 Enterprise Class Structure
This section documents considerations and caveats for applications currently in production that are built
on the recommended pre-5.4 Enterprise Class Structure.
4.1 Applications
Applications built on the pre-5.4 Enterprise Class Structure will continue to exhibit their reusability
aspects without changes to the class structure when they are migrated to PRPC 5.4.
In new versions of a CBF you may want to consider changing the directed parent of the CBF work and
data classes to Work- and Data-, respectively. (This requires that you first copy extension rules from the
Shared-Work- and Shared-Data- classes to the Work- and Data- classes, respectively.)
4.3 Extensions
To support applications built on the PRPC v5.4 enterprise class hierarchy, and new versions of CBFs (see
above) you need to copy all extension rules from the Shared-Work- and Shared-Data- classes to the
MyCo- [directed inheritance from Work-] and MyCo-Data- [directed inheritance from Data-] classes,
respectively.)
Newly created enterprise-wide or division-wide data and generated interface classes should follow the
new naming conventions. Their base classes should comply with the following recommendations:
PRPC V5.4 Enterprise Class Structure P a g e | 19
Enterprise-wide classes:
MyCo-Data- (Data-)
MyCo-Int- (Data-)