Вы находитесь на странице: 1из 167

BPM (Business Processes Management)

BPM is a Management Philosophy. It focuses on Business Processes and Sub-Processes of an


Industry with the behavior of Systems and Individuals within it. It models the processes and subprocesses visually and uses advanced Information Technologies to solve the business problems. It
strives for better performance, easy to change and quality software.
Built for Change
Time to Market
BPM is about people and the way they work together (their business process) and their
performance objectives.

Benefits of BPM

Best suited for Workflows kind of software.


Increase ROI.
Robust and Quality Software
Agility and Facilitates quick change
Highly Iterative
Speed To Market
End To End Process and Performance Monitoring.

Important Blocks in BPM (Pega)


BRE, BAM, Integration Engine, Interfaces for Development and Maintenance.
1) Difference between Pega BPM Suite and other BPM Suites is Business Rules Engine and
Business Activity Monitoring (BAM)
2) Many Process Commander applications provide business process management and
automation through six functional capabilities, informally known as the Six R's:

Receiving Accepting and capturing the essential data describing work from multiple sources
in multiple media and formats, from keyboards, scanners, and external systems.

Routing using characteristics of the work and knowledge about the workforce to make
intelligent matches and assignments.

Reporting providing real-time visibility of work in progress, work completed productivity,


bottlenecks, and quality.

Responding Communicating status, requests for information, and progress to the work
originator and to other people involved in the work, by email, fax, written mail, and other
means.

Researching Accessing external systems and databases through connectors to support


analysis and decision making.

Resolving through automated processing and automated support of users, completing the
work and updating downstream systems promptly.
1

Business Rules
Business rules whether stated implicitly or explicitly contains all your organization business
knowledge. A collection of your organization business policies, constraints, Computations, reasoning
capabilities etc.

Business Rules Engine


A business rules engine is a software component that allows business rules to be recorded in a
non-procedural, non-programming form, and uses advanced software techniques to compute the
consequences and results of rules.
The PegaRULES component of PegaRULES
Process
Commander provides a powerful
rules engine supporting business process
management, and other applications through
services.
Developed in Java, highly scalable and reliable,
PegaRULES
supports
declarative
rules,
multithreaded execution and a large number of
industry interfacing and standards.
The business rules engine can be embedded or
called from another system using Service JSR94
rules.

PegaRULES database
The rules, transactions, and other data supporting a Process Commander system are stored in
one or more Oracle, IBM DB2 or Microsoft SQL Server databases. (Consult the Platform Support
Guide for an exact current list of supported vendors and products.)
The database that contains the rules all the instances of concrete classes derived from the Rulebase class is known as the PegaRULES database. This database is also sometimes identified as
the rulebase, but it contains more than rules.
Classes that are mapped to the PegaRULES database are known as internal classes. Concrete
classes that correspond to rows of an external database are known as external classes.
Application Lists Rule-Sets and Access Group lists Application. We can have more than one Access
Group for a particular Operator ID. These Access Group can have different Applications/WorkPools
with them. Therefore with one Operator, we can switch workpools as well as Applications.

RULESET:
A RuleSet name is an instance of the Rule-RuleSet-Name rule type. Each RuleSet defines a
major subset of rules in the PegaRULES database, because every instance of every rule type
references or "belongs to" a RuleSet. A RuleSet name is a major aspect in:
2

Access control

Grouping interrelated rules

Managing the rules

Rule resolution and versioning

Moving applications sets of rules from one Process Commander system to another.

On rule forms, the RuleSet name appears at the upper right.


The term RuleSet sometimes refers to the name instance and sometimes informally refers to the
contents of that RuleSet all the instances of Rule- classes associated with that RuleSet.
The Rule-.pyRuleSet property, present in every rule instance, records the RuleSet name to which the
instance belongs.
Process Commander itself consists of several standard RuleSets
RuleSet Name rules are part of the SysAdmin category. A RuleSet rule is an instance of the RuleRuleSet-Name class.

Creating Rule-Set, Organization and Division.


-

Go to PegaSample -> New -> Organization -> Organization. Give name and save

PegaSample -> New -> Organization -> Division, Organizational unit. Give name and save

Rule-set : PegaSample -> New -> SysAdmin -> RuleSet. Give name, version and save.
We can give pre-requisite ruleset there (PegaProcom)

Creating Application, Access group, OperatorID.


Application: PegaSample -> Application Design -> Application. Give first version as 01.01.01
Built-in application = PEGARules. Application RuleSets = <Rule-set>:01-01 (major
and minor version)

Access group: PegaSample -> New -> Security -> Access Group. Access group name =
<application
Name>: Developer or <application name>: manager
Define roles, Default portal layout, work pool (default workpool is PegaSample)
(PegaRULES: SysArch4 in roles for developer)

Operator ID:

PegaSample -> New -> Organization -> Operator ID. Operator ID can be

developer@purchase.com
Provide the access group to it. Also under tab Work settings, change the Organizational unit.
Under advanced tab, you can change password.

Base classes.
Organization -> DataDivision -> DataUnit -> DataRuleset -> (Rule-)
Advantage of ruleset
1. Access control
2. Migration
3. Rule resolution
4. rule version
Ruleset is derived from Pega Procom derived from PegaRules
Access Group - Data-Admin-Operator-AccessGroup
Operator Id - Data-Admin-OperatorID

Pattern Inheritance
Process Commander provides two kinds of class inheritance, known as directed inheritance
and pattern inheritance. During rule resolution, pattern inheritance causes a class to inherit rules first
from classes that match a prefix of the class name.

About Classes
-

Instances of concrete classes derived from the Assign- base class and the Work- base class

When any object is held in memory, it has an XML (extensible Markup Language) format
visible on your clipboard as pages and property name-value pairs. When stored into the
PegaRULES database, the persistent object instance becomes a row in a SQL-based
relational database table.

Always the class group has direct inheritance with work- class
Class group and work classes (class type) are always concrete.
Class type or work class had direct inheritance with work-objectThe Class group becomes the workpool (in Access group)
Every class has to be with direct inheritance with some class. Pattern inheritance is optional. If
a class is not given a direct inheritance, then it will have the direct inheritance with the pattern
inheritance class.

Access Group --- has Application name in it.


Application Name -> RuleSet in it.
Operator ID - has access groups and Organizational unit in them.
4

Each sub-class of class group is associated with its parent class via a key, which is stored in property
inside the classes.
The primary key for the work object is defined in class group (work-pool). Eg: pyID

Class Group:
This is the first concrete class in the class structure. It supports the creation of work objects.
The work classes are concrete classes inherit from it. It normally groups the classes to be stored in a
single Database table, with a unique ID which is normally pyID. It also serves as the role of workpool.

Creating Class
PegaSample -> New -> SysAdmin -> Class. Give the class name. Rule-set and save. Give info
in History.
Version, rule-set etc. save it.
- If Class is class group, select it and give its parent class as Work- If Class is class type, select it and give its parent class as Work-ObjectNow, select the workpool in access group as the class group

Mapping pc_work table with class group (Work pool)


The class group created is default mapped with pr_other table in database (where PegaRules are
present).
We manually map the class group with pc_work table.
e.g : More-retail-purchase-work (class group) -> new -> sysAdmin -> Database Table.
Give class name as: More-Retail-Purchase-Work and save.
In the form:

Defining work pool in Access Group


Define the work pool in Access group -> the class group

Creating Data classes:


Data-

(Direct inheritance with @baseclass)

More-Data- (Pattern inheritance with More- class)

More-Data-Items (Concrete class and doesnt belong to class group)


Click right on More- -> new -> sysAdmin classes.
First create abstract class More-Data-, give parent class as DataSave it.
Then create class More-Data-Items
Similar as above. See the below pic.

Creating Properties:
For common properties, like here in more departmental store, we have customer name, contact and
email-id as common for all departments and hence we will create these properties at MoreRight click more-> new -> Data model -> Property.

Then save it

Example of CITI Bank Cards dispute dept


@baseclass
Properties

DATA-

CITI-

(Org)

- Name

Work-

- AcNo
CITI- DATA-

CITI - Finance-

(Divisn)

CITI-DATA- Items

CITI - Finance-Cards -

(Unit)

Work-Object-

Properties

- TransactionID

CITI - Finance Cards-Work (Class group)

CITI - Finance- Cards Work-CardDispute (Class type)

Parent Classes for different classes


Organization

---

Data-Admin-Organization

Division

---

Data-Admin-OrgDivision

Organizational Unit

---

Data-Admin-OrgUnit

AccessGroup

---

Data-Admin-Operator-AccessGroup

OperatorID

---

Data-Admin-Operator-ID

Class Group

---

Data-Admin-DB-ClassGroup

Database table

---

Data-Admin-DB-Table

RuleSet

---

Rule-Ruleset-Name
8

Application

---

Rule-Application

Class

---

Rule-Obj-Class

Harness

---

Rule-HTML-Harness

Section

---

Rule-HTML-Section

Flow

---

Rule-Obj-Flow

Property

---

Rule-Obj-Property

When

---

Rule-Obj-When

Map

---

Rule-Obj-MapValue

Decision Tree

---

Rule-Declare-Decision Tree

Decision Table

---

Rule-Declare-Decision Table

WorkpyStatusWork -> Property To Track Work Object Status.


New -> The Activity that creates a new Work Object.
NewDefaults/NewInternalDefaults -> The Placeholder Activities that is called when a new work
object is created.
They are blank activities.

Default -> Default SLA in WorkObject. It defines 2 days and 5 days as goal and deadline time. No
escalation Activity.

pyDefault -> Models


.pyWorkParty : the property in W.O that stores the WorkParty for the W.O. It.s a page group type.

Show-Harness: Activity that shows harness for display w.o forms.


.pyRuleSet: Property inside each rule describing which rule-set it belongs.
.pySLAName: Property to define a W.O SLA. Set through model

GenerateID: Activity that generates work id prefix for W.O

Concrete Classes mapped with pegaRules database are internal classes.

Concrete Classes mapped with external database are external classes.

A decision table/tree can be referenced in flows/activities/declare expressions. In declare expressions


we can call D.trees/D.table/Map.
A worklist appears in My Work in Progress Area.
9

Inheritance in Pega
Class Inheritance.
Ruleset inheritance
RuleSet Version Inheritance.

Creating Flow, Harness etc.


1) Flow
Select class explorer. From it select Work-. Click on Work-, then select Flow sample.
Click save as with Applies to as : <Class type>. And Flow Type: <name of flow>

2) Harness
Select class explorer. From it select Work-. Click on Work-, and then select Harness. Click New
(in the grid)

Click as save as ->


Applies to -> <workpool>

10

3) Section
Two sections will be made.
1) The common customer info. This will come under a section which will be made under
workpool.
Right-Click on work-pool -> new User Interface Section.
The fields from More-

Should be dragged and dropped in the lebels.

2) Now for repeating data. We need to create a pageList (Which holds the other property) in
Class type.
Right Click on work type -> new -> User interface -> property.
Give property name in the form.
Before saving.
Property mode Page list
Page class The name of class from where it will take the properties. Here we have More-DataItems

11

Now create a section to hold multiple data.


In the class type -> new user interface -> Section.
Click on Layout and drag it to the page.

Select repeating.
Add columns as required. Change the property of the grid.

Change:
12

Format Standard
List/Group Itll be same as the PageList we created. i.e Items
Then as usual, drag and drop the properties in the columns.

4) Adding Sections in Harness


Open the harness by clicking it.

Now click on the symbol

and select new container.

A new container will be selected inside harness.


Now drag and drop your section in the container.

13

5) Adding Harness in Flow:

Click on the flow (here purchase Flow).


Click on process tab.
Under this change:
Create new work object:

tick it.

Harness :

New (The name of harness)

Now run from the above symbol.

6) Creating drop down for set of values.


Select to create a new property. Under this modify the following.
HTML Property = PromptSelect
Table type = Local List
Put values inside the table type.

14

7) Creating decision table.


We create a decision table on ItemName present in pageList Items under More-Data-.
Right click on Items -> new -> Decision -> Decision table.

Then provide the details.

15

Click under Conditions and ->

7.1) Creating PromptList

16

8) Creating expressions

9) Creating Calculated Value:

10) Steps to be followed for calculated value.


1) Harness: Tick Enable Expression Calculation

17

2) Create HTML Properties as Calculated value.

3) Section: in the properties of each of the calculated columns. Do -> Display as: Calculated Value.

Creating Flow Action, Flow, Sub-Flow, Decision Tree and Assignment


Properties
1) Creating Flow Action
Here there are 3 sections. CustomerInfo, PurchaseInfo and Confirmation. Confirmation is same as
PurchaseInfo but read only. We use button
dynamically.

to disable it from adding/deleting a new row

Hence for 3 sections, we create 3 flow actions.


1) Create a new Flow action -> CutomerInfo. Drag and drop the section customerInfo there.
Under HTML Tab, enable Expression calculation

18

2) Similarly create flow action for PurchaseInfo and Confirmation.

2) Creating Flow and Sub-Flow


For creating sub-flow, select Flow from the drag and drop in the main flow.
Select the diagram and in the properties box, give name and flow rule. (Flow rule will b the name of sub-flow)

Note here Flow rule = CollectInfo. Now press the edit button next to it.
It will open the new sub-flow dialog. Provide the details in the dialog.

Note: Give Template Name as: ScreenFlowStandardTabbed.


Now edit the sub-flow
We have created the sub-flow as below.

19

Select each of Assignment diagrams like Customer Info, Purchase Info and Confirmation and edit
the properties.
E.g The Customer Info. See diagram in next page.

Give the name and Flow Name = Flow action created before.
Do similar to all cases.
Save it.
Now in the main flow the control will go to manager for approval.
We have created a rule here that,
if Grand Total >= 10000 then approval will go to manager else operator.
Note: we have 2 operator IDs here. manager@purchase.com and operator@purchase.com

So we need to create a Decision tree for that.

20

3) Creating Decision tree


Click on class group -> new decision -> decision tree.
Give the expression like below.

4)

Creating Routing

Here we are introducing a routing assignment (named as Manager). The routing is based on
DecisionTree that we have created above. So select the routing assignment -> Manager and edit the
parameters as in screen-shot.
Router -> ToDecisionTree
Now click on the play symbol and edit other fields.
DecisionTree -> Name of Decision tree (Routing here)
INPUT -> It tells on which property Decision will be taken. Here its .GrandTotal
Service -> Blank

Now we provide two utility in the flow -> Approved and Rejected. Select each utility and edit the
properties.
Rule -> UpdatedStatus
Staus -> Resolved-Completed
21

Application -> Application name


Similarly for Rejected, do the same and in status give -> Resolved-Rejected

Now select the connector from manager assignment to utility and edit the properties.
Application name,
Flow -> Here out-of box flow will be given. Like Approve and reject respectively.
WorkType -> name of workType (Class type)
Likelihood -> anything between 0-100
Apply and save.

In the Application -> Details tab. Edit


Work Types .
22

Name as Purchase,
Implementation class as worktype
Work ID Prefix as p-

9.5) Creating User who can create work object


Create a new access group for user.
Role : PegaRULE:User1 and
Default portal : User.
Similarly create a operator ID for user.

10)

Creating ONCLICK event.

Here we have a check-box -> isShipping Details. If we click on check-box, a new section will
come to collect the address.

While in draft open the properties of check-box isShippingDetails. And edit


Display as -> CheckBox
Behaviour -> ONCLICK. Click its properties. A new window will open
23

Then edit.
Active Input -> check
Event -> On Click
Action -> Refresh this section.

The complete Shipping Details section appears on mouse click on is shipping details. Hence select
the whole section/container of Shipping Details .
Edit the properties as
Format = Standard.
Visible when -> .isShippingDone==true

24

11)

Main Flow

Sub flow:

Overriding Default rule -> Approve


In the main flow, in the Approve, 60% connector, we have mentioned an Action flow =
Approve, which is out of box rule in Pega. So this rule provides a basic UI for approval by manager.
We can override it to add few information like
25

The list of things purchased (here we have a section called confirmation for that).
Hence Click on Work- and select flow action.
Select Approve rule and do a Save as. Give the details like Applies to -> Workpool/worktype name.
And save it. We can drag and drop the section -> confirmation under it.
So in manager portal, while approving the workobject, this additional info will be shown.

12)

SCREEN-SHOT of Sample Application More.

Screen-1

Screen -2

26

Screen -3

Screen -4

WORK OBJECT:
A work object is the primary unit of work completion in an application, and the primary
collection of data that a flow operates on.
As an application is used, work objects are created, updated, and eventually closed (resolved).
Every work object has a unique ID (property pyID), an urgency value, and a status (property
pyStatusWork).
In some organizations, a work object is known by the older term work item.

RuleSet
RuleSet is the major sub-set of rules in PegaRules Database. It is the instance of Rule-RuleSet-Name.
It has a name and can have multiple versions associated with it. The purpose of RuleSet is mainly for.
-

Rule Resolution
Rules Versioning
Migration
Access Control
27

Operator Id:
Its a combination of username/password, a access group associated with it and its a part of
an organization/div/unit. It mainly used for authentication purpose for a requestor. There is a role and
portal associated with the Operator ID trough the access group. Instance of Rule Data-AdminOperator-ID

Access Group:
Instance of Data-Admin-Operator-AccessGroup. This is mainly to control access. It makes a set of
RuleSet Versions available to requestors. The Operators in PRPC are associated with an access
group. It affects the accessibility of users in following way.
-

Contains the work pool.

Contains the Application, indirectly the RuleSets available to users.

Defines the role of the particular user

Defines the portal for the user

Work group
A work group defines a supervisor (manager), with set of workers and workbasket that report to him.

Class
A class is instance of Rule-Obj-Class. It defines capabilities such as other rules (UI Forms, properties,
decisions, declarations, flows etc).

Abstract Class
They end with a -. The dont have any instances or are not stored in DB. They cannot create a W.O.
-

The out of box rules present in Work- wont be available to them.


They dont belong to workpool. Hence cannot run the flow.

Internal Classes
The concrete classes whose instances are stored in PegaRules Data base are Internal classes.

External classes
The concrete classes whose instances are stored in External Databases are external classes.

Basic Activities in Flow (OutOfBox and Interactive)


1) Assignments Activities

Work-.WorkList Causes the assignment to be placed on the worklist of the current operator
(or of another operator identified by a Router shape). Creates an instance of the AssignWorklist class.
28

Work-.WorkBasket Causes the assignment to be placed in a workbasket, determined by an


associated Router shape. Creates an instance of the Assign-Workbasket class.

Work-.External Starts the directed Web access feature, sending a temporary assignment
by e-mail to a party identified in the work object who is not an interactive Process Commander
user. Creates an instance of the Assign-External class.

Work-.Agent Sends the assignment to a background process rather than to a person (rarely
used, similar to WorkBasket ).

2) Router Activities

3) NOTIFY Activities

4) Utility Activity
CorrNew or CorrCreate
UpdateStatus (Itll ask the parameter Status Work).
ConvertAttachmentToPDF.

5) Connector Flow Action


cancelAssignment
Notify
sendCorrespondence
resolve
reject
ConvertAttachmentToPDF.
29

6) Local Flow Action


addAttachment
addFlow
addCovered
addToCover
addParty
AttachAfile/URL/Note

7) SLA Standard Escalation Activity


AdvanceFlow
Default
NotifyAssignee
NotifyManager
TransferToManager
NotifyAndTransferToManager
TransferToWorkBasket

ScreenFlow have standard Harnessess like Work-.PerformScreenFlow, Work.TabbedScreenFlow etc.


-

Operators Work Settings Tab.

Collections
Create a collection rule to identify other rules in your application that can execute in sequence, under
a set of conditions evaluated for each rule in the sequence. You can include both procedural rules and
Declare Expression rules in the sequence. By referencing a list view rule, you can retrieve at runtime
a dynamic list of qualifying rules to be executed. Typically, all rules in the collection update a common
page.

Where referenced
Collection rules are referenced by the Collect instruction in an activity. In addition, one collection rule
can reference another collection rule.

30

Collection Tab

PreCondition Type: Decision Tree/Table, Map, When, None.


This Collection rule is called in Activity method: Collect <Collection name>

Rule Delegation
A delegated rule is one that appears for a specific group of users so that they may manage
these rules outside the development environment. Delegated rules appear on the My Rules gadget for
a single user or for all the users who are associated with a specific access group.
We normally delegate the few rules to Business Managers, so that they can modify the rules as
changing business needs, without going to developer portal. We normally put those rule for delegation
which change frequently, have less impact on business etc.

Delegating a rule
To mark a rule as delegated, click the Favorites toolbar button (
Rules dialog box.
31

) and complete the Delegated

Opening a delegated rule:


To open a rule delegated to you:

From the WorkManager portal, open the Dashboard workspace, locate the My Business Rules
area, and click the link that labels the delegated rule.

From the Developer portal, select View > My Rules > label.

1. What design considerations should be done while using Commit method in an activity.
Ans

We should use the Commit method judiciously. Flow processing performs commits
automatically when the flow ends and when an assignment is created or completed. To avoid
interference with this approach, do not use Commit in the flow-related activities in your
application.

When you include the Commit method in an activity, design the processing so that the Commit
method occurs only after errors are intercepted, checked, and corrected. If a Commit method
fails, it is unlikely that processing can continue in any reasonable way, so it is important to
include a transition in the Commit step that checks the status.

Even when processing can continue after Commit failure, design your activity (after debugging
and fixing the cause of the failure) to collect any required user input that corrects the problems,
and re-perform any Obj-Save methods that preceded the Commit call.

Smart Layout
Introduced in V5.5, a Smart Layout is a grid (corresponding to an HTML <TABLE> element) of
paired cells on a harness, section, or flow action form that has columns of uniform width, uniform
styles, and uniform characteristics. Each pair of cells holds one label and one property value or other
form control.

32

Using Smart Layouts rather than "freeform" table layouts produces attractive work object forms with
less developer effort. Smart Layouts are recommended for new applications. .
A primary benefit of Smart Layouts it to force vertical alignment even when layouts are nested. When
a section using Smart Layouts is nested within another section, all labels and fields are given
consistent widths. Process Commander adjusts padding and cell widths to seek attractive spacing
and presentation.
Select Template with row and column count, from layout. Dont select free form.

Basic UI
Flow Actions
A flow action is a choice available to users as an interim or final disposition of an assignment they
process. Each flow action is defined by an instance of the Rule-Obj-FlowAction rule type.
Flow actions are of two types:

Connector flow actions appear as lines on Visio presentation in the Diagram tab of a flow
rule. A line exits from an assignment shape and ends at the next task in the flow. At runtime,
users choose a connector flow action, complete the assignment, and advances the work
object along the connector to the next task.

A local flow action, when selected at runtime, causes the assignment to remain open and on
the current user's worklist. Local flow actions are recorded in the Assignment Properties panel
and are not visible on the Visio flow diagram. At runtime, users can select local flow actions to
update assignment or work object properties, change the assignee, and so on but do not
complete the assignment.
We can provide our own local flow action, but there are few pre-defined flow actions.

AddFlow, AttachAFile, AttachANote, AttachAScreenShot, AttachAURL etc.

In the Action tab of a Flow Action, we provide INDICATOR : Used as -> Local Flow Action,
Connector Flow Action, Local and Connector.
While running the flow, both Local and Connector flow actions are visible under Take Action
panel.

Action Tab in Flow Action


The Action tab under Flow Action contains few important things like.
33

1.) Run an Activity before this Flow Action is called.


2.) Run an Activity after this Flow Action is called.
3.) Validate rule.
4.) INDICATOR that this is : Local Flow Action/Connector Flow Action/Both Local and Connector.

HTML Tab

HTML GENERATION :->

It can refer a HTML Fragment (Rule-Obj-HTML), a section or can define its own form.

34

Enable Client Side Validation.

-> Select to cause your application to immediately validate the


format of user input to dates, integers, and other fields within the browser window when focus leaves
the form field, before a user submits the form. For example, you can't enter a letter into a numeric
field. You can't enter 02/31/2007 into a date field. Error notification occurs immediately when you tab
out of the input field or change focus to another field.

Enable Expression Calcualtion. ->

Causes to evaluate the expressions by forward chaining.

SECTIONS
A section rule defines the appearance and contents of one horizontal portion of a form.
A section is a portion or area of a standard work object form that is incorporated on a harness
form. Sections may contain other sections, informally called subsections.
The appearance, behavior, and contents of a section are defined by a section rule (Rule-HTMLSection rule type). Section rules are referenced in:

Harness rules

Other section rules

Flow action rules

Paragraph rules with SmartInfo pop-ups

Process Commander contains dozens of standard harness and section rules. You can copy
and tailor these standard forms to meet your application needs.
Controls
Layout

Accordian

Column
Repeat
Tabbed
Repeat

Row
Repeat
SECTIONS.

Basic

Advanced

AutoComplete

Dynamic Selct

Charts
Paragraph

List View

HTML Tab.

Auto Generate HTML Only. We uncheck this box and can provide our own HTML/JSP in the
below space.
35

HARNESS
A harness rule an instance of the Rule-HTML-Harness rule type defines a runtime form.
Use harness rules to define the appearance and processing of work object forms used in your
application to create work objects and process assignments.
Like section rules, HTML rules, property rules, and others, harness rules define the structure,
appearance, and behavior of the forms used in applications to create and update work objects and
assignments.
Process Commander includes more than a dozen standard harness forms for entering,
reviewing, updating, and processing work objects and assignments. Your application can override the
standard rules to extend and tailor them to specific needs.
Each harness rule defines the appearance and behavior of a form. Harness rules produce three types
of forms:

Work object forms For reviewing, entering, and updating work objects in a Process
Commander application

Composite portals User portals that support application users with Firefox browsers as well
as

Rule forms Forms that appear in the Developer portal that developers and administrators
use to review, enter, or update rules or selected data objects. (This capability is reserved.)

There are various types of Harnesses. New, Perform, Confirm, Review.


When we start a flow, the new Harness is created. In the Process Tab of the flow, we can check:
-

Create New Work Object - then only the process button appears on the screen.

Skip creates new Harness - This will skip the new harness screen while we run the flow.

1) Perform Harness:
This harness will appear when any flow action is called within an
assignment. Any flow action will have the GUI, is painted on Perform Harness.
2) Review Harness: Display the W.O in display only mode, with no fields changeable. To review
the assignments and w.o without any update.
3) Confirm Harness: Accepts a text note confirming the users response. This harness is called
at the end when the processing of the Work Object is finished. Presents a read-only
confirmation display of the work object, acknowledging user completion of an assignment.
Contains the Get Most Urgent button.
This button is by default linked to the standard activity Work-.GetNextWork. Your
application can override that activity.

Reopen:

Allows a user to reopen a resolved work object.

PrintReview:

Supports printing of all the fields.

36

Controls.
Row
Repeat

Column Repeat

Layout

Accordian
Tabbed
Repeat

SECTIONS.

Basic

Advanced

AutoComplete

Dynamic Selct

Charts
Paragraph

List View

Scripts and Styles Tab.

Script File: It accepts a Javascript/VBscript file name.


Style Sheets: The CSS Style sheets.

HTML Tabs

37

Making Section Visible/Invisible.

Click on the magnifier of the Section. Make it Visible When (can refer a when condition).

Making Property Visible/Invisible.

Provide the Visibility condition as above.

Note: The Section and Property will be visibility/Invisibility will be triggered by some event.

E.g:- Click on Behavior Magnifier.


So OnClick of this HTML Property, The Section will refresh.

You can even call an Activity.


38

Containers:
A container is a structural element of a work object form, defined through a harness rule. Not
every work object forms include a container. The container may correspond to a visually distinct
rectangle on the form, marked by a colorful border.

We can drag a section here. Only Harness rules contain Containers.

Panel Sets
A panel set is a configuration of sections in a harness rule that support a composite portal. On the
Layout tab of the Harness rule form, use the Panel set control (
panel sets.

) to select among the available

Each panel set has one or more panels, each identified by position as Top, Left, Right, Bottom,
or Center.

This panel set is only available in Harness and we can put sections in it.
-

Accordions and Tab are present in Harness and Sections only.

Validation in Pega.
1) Using Validate Rules (Rule-Obj-Validate)
Create a validate rule. Go under process Validate.

39

Validate Each -> Give Aggregated property name.


Call and Call for Each -> Give a clip-board page.
This validate rule can be used under Flow Action -> Action tab.

This rule is used in Flow Action for validating the properties and parameters. Its also used under
Activity under methods
Obj-Validate. Obj-Validate validates only selected properties on the page, but Page-Validate validate
all the properties in a page.
There is another method called Property-Validate, it validates the selected properties, using the edit
validate rule (mentioned in the property it-self) (custom java).

Note: Flow Action, Action tab has 4 major things.


1) Run Activity before Action
2) Run Activity after Action
3) Validation Rule
4) Indicator (for local flow action/connector flow action).

40

2) Using Rule-Edit-Validate

Difference between Validate rule and Rule-Edit-Validate


1.) Rule-Edit-Validate: It requires Custom Java code to validate the property. But Validate rule
doesnt require java code, but we give expressions to validate the property.
2.) Rule-Edit-Validate: It is implemented on property as a whole (In advanced tab of the property
form). It is fired automatically whenever the property is referred.

But Validate rule is

implemented at screen level (at Flow-action action tab) or called by Activity (Obj-Validate and
Page-Validate methods).

Using Constraints. (Rule-Declare-Constraint)


This normally generates a client-side validation code. And it is used to put
validation/restriction on the property in relation to other properties (expression) .It also fires
automatically, as it is under declaration rules.
See the Declaration section for more info.

41

Activities Basics: (We have a separate activities section)

Here we have written an activity with 2 steps. In first step, it sets the property values. The
values for Name and RollNo is being supplied as parameter (from where this activity is called, like
from a Flow Action).

In Step-2, we have called another activity and supplied a parameter to it. (this will be output parameter
in calling activity.) The value of output parameter is supplied from the calling activity.
The parameters tab of calling activity:

42

Types of Activities:

While calling an activity from Utility shape, change the Activity type under security tab as Utility.

Creation of Flow
While creating a Flow we have to edit a check-box in its process tab.

Flow:
A flow is a fundamental representation of a business process in PRPC. Its an instance of RuleObj-Flow rule type, which defines the sequence of processing that your application applies to work
objects. They are represented through Visio diagrams.

Types of Flow
There are basically 4 types of flow.
1.) Starter Flow: A flow that creates a new work object is called a starter flow.
2.) Straight-Through Flow: A flow rule that contains no assignments, and so can execute from
start to end without human input, is known as a straight-through flow.
3.) Sub Flow: A flow that is called by another flow is known as a subflow; the calling flow is called
parent flow. Processing of a subflow is synchronous, meaning that the calling flow execution
43

pauses for the duration of the subflow. When the subflow execution reaches a Flow End
shape, the calling flow can continue.
A Sub flow can create a work object.
4.) Screen Flow: This flow cannot create a work object. This is special kind of sub flow where we
give the flow action inside the assignment itself, not in the connectors. While creating this
Screen Flow, we have to do few modifications.

In the sub-flow properties panel


Flow Type: Screen Flow.
And while creating the Screen Flow,

Template: Screen Flow Standard Tabbed, Screen Flow Standard Classic etc.

44

UTILITIES:
These are used to call an activity from a flow (Activity type = utility).
Here we are calling a pre-defined activity to update the status of work object.
There are pre-defined Activities which we can reference in this utility like: UpdateStatus of work object.

Also we can provide our own Activity under Rule: The Activity must be of type Utility.

Assignments
Important Properties of assignments are:
Rule (Worklist, Workbasket), Instruction, Work Status, Status Assigned, Confirmation Note, Notify,
Route, SLA, Local Action. Etc.

Spin-Off:
A Spin-off task

causes the second flow (sub flow) to start. The main flow and the second

flow executes asynchronously. The user can choose, which flow (Main Flow or Sub-flow) to run first.
While we reach the Spin-off shape, we can choose: View ->My Recent Work -> The recent
work to see the process list.
Now we can choose from the process list, which flow to run first. In its properties panel, we
provide the Rule: Flow name.

45

The Process List for main flow and sub flow to choose between

Note: Except Screen-Flow, other flows can create a new work object. Hence we can say that in spinoff, the sub-flow can create flow to work on same work object (screen-flow) or can create a new work
object (a sub-flow or other main flow).

Split-Joint:
Use the Split-Join shape to require that multiple subflows of your flow be completed before the current
flow continues execution. This allows subflows to execute asynchronously, in parallel. Put multiple
sub-flows inside it. While we run the flow, we can use view-> My Recent Work to see the Process list
containing all the sub-flows. The parent flow will run at last.

There is option here that, to run parent flow when all sub-flows are completed or any one sub-flow is
completed.
46

We describe the Split-ForEach after the PageList Concept.

PageList:
For creating pageList, we have to first create a Data- derived class to contain the properties that we
want to include in pageList.
e.g : Class DLF-RealState-Structure derived from Data- class. Create properties in it like:
EmpId, EmpName, Salary.
Now in the Work type, create a property of type pageList. In the form, itll ask for the Class name
containing the properties. Provide the data class name.

The pageList property will appear like below.

Now we create a Flow Action for PageList. Well create a repeating layout in the Flow Action/Section.

47

Now click on the magnifier button on the layout, and edit the general tab.

Give the PageList/Group as the pageList property we created. Now the Class will be the
containing class of the properties in the Page List.Now drag and drop each element under each of the
2nd column of the layout. This will create a aggregate layout flow action/section.

Creating Data Tables.


Go to Application -> Data Table.

Click On Add new data table.

48

Give
Class name:
The Data- derived class which will contain these properties.
Description: Description of data.
Create properties itll contain, with one column as primary key.
Now generate.
Itll create a Database class containing these properties.
By default, instances of classes created through this facility are stored in the PegaRULES database
table named pr_other and are limited to 1,000 rows.

Editing Data Tables


If we create a data table using the above methods, itll also create few things under technical
category like.

in the Data- derived class.


Click on EditList and modify the things.

Save the modifications. Now can check the Data tables, the modification will reflect there.

Split-For Each
It is used to process an aggregated property (PageList/PageGroup) and executes a sub-flow for each
page.
49

E.g.: if a PageList contains 4 individual pages (4 rows in repeating layout), then for each node (page)
the sub-flow will run.

Note, here we provide values.


Page Property as : the PageList that we want to process.
Class: Containing the Properties of the PageList.
Flow Rule: The sub flow name.

Note: The Sub flow mentioned here must be under the Data- derived class because itll process the
properties of Data- Class. Also the flow actions mentioned inside this sub-flow must be defined under
the Data- derived class.
When well run the flow, process list will appear equal to the no. of pages in the PageList. We
can choose any of the process list to run the sub-flow.
Normally we can think this thing in this way. We have an employee list, with EmpNo, Name and
Salary. We want to Calculate DA and HRA for each employee, the calculation goes inside the subflow.

SKIMMING:
The Skim facility causes a resetting of the RuleSet version values in the highest version of existing
rules. For each rule instance in a specified RuleSet or version, the system identifies the highest
numbered version and creates a still higher copy.

For a major skim, the system adds one to the major part of the version, and sets the minor
and patch values both to "01."

For a minor skim, the system preserves the major version, and sets the minor and patch
version values to the version you specify.

Starting a Skim operation


From the Developer portal, select Tools > Rule Management >Skim a RuleSet to begin the skim
operation.
50

Results:
Skimming simplifies the topmost rule versions in a RuleSet after multiple iterative development cycles.
For example, if the highest version was previously 02-21-06:

After a major skim, the skimmed version number is 03-01-01.

After a minor skim, the skimmed version number is 02-22-01.

Rules in lower versions such as 02-21-05, 02-18-53, or 01-88-15 of the same rule are not copied by
the skim operation.
The skim automatically creates the new RuleSet version instance corresponding to the major,
minor or patch version above the current version. It then copies rules from the current version
(selecting only those in the highest-numbered version) into the new major or minor version. Rules with
available of Blocked in the source RuleSet versions are not copied.

Decision Tables:
Sample Decision Table. Below is the Results Tab. We can provide allowed results for return.
Preset properties and Options.
Note that, I havent found any option for calling other decision rules under it. Wait Now I found out.

51

We can call other Decision table using call.

Decision Trees:
We may provide the input values (property to evaluate) at input tab.

This is the Results Tab.

52

This is the Decision Tab.

Map

We need to provide the Input values for Row and Columns, Then can provide a matrix structure
between 2 values.

53

Decision Tree/Table/Map in Flow

Connector Properties

Status compares the return values of Decision rules used above.

DECLARATIONS
1) DeclareOnChange
A Declare OnChange rule automatically executes an activity, or suspends the current work object,
when the value of a specified property changes.
There can be more than one property that we can include in Declare OnChange rule to watch. If
any of them changes, we can fire 2 activities. One when a When condition returns true, and another
when it returns false.
Note: The called activity must be of Activity Type = Onchange (in security tab)

See next page for Fig.


54

Declare OnChange can also be used to validate properties. We can suspend work object, if the value
of the property is modified meeting some criteria.

Note: Choose Action is Suspend Work Object (Not call activity as before)
Policy Override Flow to Run, we can include any other flow to continue running if the Roll No
changes and when condition is met.
Here we can see, we have given the same flow name at Policy Override Flow To Run so that work
object stalls and asks the user to change the property value.

Declarations (Rule-Declare-)
Declarative rules offer the ability to perform processing whenever the value of a specified property
changes, or on other conditions. We can say that Declarative rules simplifies the applications and
reduces the no of activities we create.
They are fired automatically whenever the value of any property changes and on other criteria.
Declarative rules follow forward chaining as well as backward chaining.

Forward Chaining:

It is the process by which, the target property changes/adjusts its value


depending upon change in the source properties. E.g: A = B + C. If values of either B or C changes,
The value of A is automatically adjusted.

Backward Chaining: Unlike forward chaining, whenever the target property is used or referred, its
value is calculated at that point by seeking the values of its source properties in the dependency
network.
E.g: A = B + C. B can be = D + E and Similarly C = F + G.

Note: Only Declare expressions use backward chaining. Rest all Declaratives use Forward chaining
only.

So the dependency network is built in this way.


55

They are of 6 types.

Declare Expression

Constraints

Declare OnChange

Declare Trigger: Declare Trigger rules perform an activity any time data of a specific type is
changed in the application. For example, a declare trigger could be defined to flag a customer's
account for review any time their address changed.

Declared Index: Indexing can improve performance and facilitate reporting. Create a Declare
Index rule to define criteria under which Process Commander automatically maintains index
instances for faster access. An index can improve search and reporting access for properties
that cannot be exposed as database columns because they are embedded within an aggregate
property.

Declared Pages: A declarative page is a clipboard page created by execution of a declare


pages rule (Rule-Declare-Pages rule type).The name of a declarative page starts with the
prefix Declare_. Such pages are created and updated only through operation of activities
identified in a Declare Pages rule. The contents of these pages are visible but read-only to
requestors.

1) Declarative Expressions:
Declare expressions establish functional relationships between properties, and compute the result any
time one of the Inputs is changed. Declare expressions ensure that any time an input is changed by
any source, the result is always
Up-to-date.
Ways to create:
New -> Declaratives -> Declare Expressions

We can provide Page Context, if we want to calculate values from a pageList/pageGroup.

56

The Change Tracking Tab. 1st option is


Forward changing. Rest 4 options are Backward changing.

In the UI Part

57

We can change the behavior of properties A1 and A2 as Event = On Change, Action = Refresh This
Section.
Note: We can call An activity also when the input changes.

2) Declarative Constraints:

Constraints rules provide data validation for properties after they are already inside your
application. Any time the specified property changes, the constraints rule checks to confirm
that the value still falls within the expected range.

Normally Constraints are used to define validation on one property based on criteria on another
property. Eg: If a = 10 and b = 20 then c must be 30.

3) Declare On Change:
Declare OnChange rules run an activity any time that the value of a specified property changes.

Note: The activity referred must be of type OnChange in security tab.


We can also Choose Action = Suspend Work Object and can assign to start a new flow.

58

So, when condition is true, it Suspends Work Object and Calls another Flow : Screen Flow.

4) Declarative Pages: Given in diff section.


5) Declarative Trigger:
Create Declare Trigger rules to cause an activity to run when instances of a specific class are
created, updated, or deleted in the database. This implements a form of forward chaining.
For each Declare Trigger rule, Process Commander monitors database operations for objects of the
Applies To class (and concrete classes derived from that class). During database commit processing,
forward chaining processing may trigger start execution of the activity identified in this rule.

Trigger when an instance is

59

If we choose Save and .. Then we have to provide some properties that will be watched.
...ONE OF THESE PROPERTIES WAS MODIFIED

Provide the property name that will be watched, so that trigger will fire the activity (of type trigger).

Copy Value To (optional): Provide another property name that will hold the original value of the
property modified.

When: Provide a when condition that will be evaluated. If true then only Activity will be fired.

Trigger Activity: Name of the trigger activity that will be fired. This Activity should be of type trigger.

6) Declarative Index:
Indexing can improve performance and facilitate reporting. Create a Declare Index rule to
define criteria under which Process Commander automatically maintains index instances for faster
access. An index can improve search and reporting access for properties that cannot be exposed
as database columns because they are embedded within an aggregate property.
Index instances are sometimes called alternate keys or secondary keys. The system saves indexes as
instances of concrete classes derived from the Index- base class.
By default, Process Commander stores properties that are embedded in a Page, Page List, or
Page Group property in a BLOB column in the database. In order to make these properties available
for reports, and to optimize them for processing in other operations, the Property Optimization tool
"exposes" the values of an embedded property by creating a concrete Index- class, properties for the
new class, and a Declare Index rule that allow Process Commander faster access to the property
values.

60

Source Page Context: Name of the PageList.


Source Page Context Class: The class name which holds the actual properties (Not which holds the
PageList Property)
Index Class to Write: A concrete class derived from Index- Class, It will also contain the same
properties as above class.

PROPERTIES FOR INDEXING AND MAPPING


Map the properties from Page Context Class to index Class.

ACTIVITIES
Activities automate processing. Activity rules contain a sequence of structured steps. Each step calls
a method rule or contains a control instruction such as Call or Branch.
contain a sequence of procedural, atomic steps that are by default executed top down
reference a specific instruction (known as a method) in each step
can perform calculations
can retrieve, update and save data
can call other activities
can contain loops or iterations

Note: We cannot create our own methods and we have to use the given set of methods only.
1) Page-New and Show-Page: Creates a new page in Clipboard and Show-Page shows the page in
XML Format. Show-page is normally used during debugging, because it blocks the flow. We
should remove the Created page by using Page-Remove method if its not used further. This
keeps the performance good.

In Pages & Classes:


give page name: SamplePage
page class : The class name where the properties mentioned are defined.
Here, we have created a new page called SamplePage and called a decision table, which returns a
value.
We capture the returned value in SamplePage.RollNo. Show page displays the output as below.
61

OutPut:

Note: If we have used a model for a class, then if we declare a page and class in pages and classes
tab, then the model will also b called when the page is created.

Model: Represents the model of the class for which we create the page. Itll initialize all the properties
of the class in the page.

PageList: To save the name of the new page as the final element in a list, identify a Value List
property (not a PageList property). Use the notation pagename.propertyname. The system appends
the name of the new page as the value of the last element of the Value List property.

NewClass: Optional. Identify a class in most cases concrete class for the new page. Enter the
keyword $NONE to create a classless page. If left blank, the system creates the new page using the
class of the page specified in the Step Page column of the activity step being executed. (It retrieves
the class of this page from the array entered in the Pages & Classes tab of the Activity form.) If the
Step Page field is also blank, the system creates the new page of the class that is the first key part of
the current activity.

2) Page-Clear-Message: Clears all the messages in the page. Normally validation/error messages.
3) Page-Unlock:
Use this method to unlock a page in the unusual situation that the page was locked during the
Obj-Open operation but the ReleaseOnCommit parameter was not selected.
Typically, when the Obj-Open method opens and locks an object from the database, the
ReleaseOnCommit parameter is selected. When a later Commit method executes, the system
automatically releases the lock.

62

However, when the ReleaseOnCommit parameter is not selected, the Commit operation has no effect
on the lock, which remains in force. This capability facilitates multiple Commit operations on one page
without the need to re-acquire the lock.
You can also use this method to release a lock that is no longer needed, regardless of the
ReleaseOnCommit parameter value.

4) Page-Validate
Use the Page-Validate method to force validation (or revalidation) of the value of all properties
on the step page. The system adds a message to each clipboard property that fails validation against
the restrictions in its property rule.
If the page has hundreds or thousands of properties, this method can be expensive in terms of
system resources. The properties on the page already set (through the Property-Set method or similar
methods) may already be validated. This method validates them again, and also validates any
property values not changed since the page was opened.
Unless the content of the page was altered by Java code or by unorthodox means, the PageValidate method is not necessary.
It actually refers the Rule-Edit-Validate and Rule-Declare-Constraints to validate the properties
on the Page.
Use the Obj-Validate method, not the Page-Validate method, to validate specific properties identified
in a Rule-Obj-Validate rule.
-A Page-Clear-Messages method applied later to the page removes the messages set by this method.

4.3) Property-Validate

Uses Rule-Edit-Validate. Continue -> Continue if error found else stop. Default -> Set a value if null.
Required -> Value is required else set an error message value not present.

4.5) Obj-Validate:
Use this method to apply a validate rule (Rule-Obj-Validate rule type) for the object identified
on the primary page or step page.
This is different from Page-Validate in one case. It only validates the selected property not all
the property. But Page-Validate validate all the properties.

63

Validate: The Rule-Obj-Validate rule


OverrideClass: The class name from which the search for the above rule will start.

5) Property-Set-HTML
Use this method to save the contents of an HTML stream as the value of a Single Value property. The property value can
then be mapped as output for transmission to an external system.

Parameter

Description

PropertyName

Enter a Single Value target property reference. Identify the property that to receive its value from stream processing.
Typically, choose a property that has a Text type.

HTMLStream

Enter the Stream Name key part of an HTML rule (Rule-Obj-HTML rule type) to be processed to produce the value
of the property.

6) Show-HTML
Use the Show-HTML method to cause the activity to process an HTML rule and send the resulting
HTML to a user for display by Internet Explorer. Known as stream processing. this may involve the
interpretation of JSP tags (or the older directives), which can access the clipboard to obtain property
values, or can insert other HTML rules, and so on.

Parameter
HTMLStream

Description
Identify the Stream Name key part of an HTML rule (Rule-Obj-HTML rule type) to be processed. The system uses the
class of the step page as the Applies To key part of the HTML rule.

7) Show-Stream
Use the Show-Stream method to apply stream processing to an HTML rule, correspondence rule, or XML Stream rule, and
send the results to a browser-based requestor session.

Parameter
StreamClass

Description
Optional. Identify the class of a rule type derived from the Rule-Stream class. such as:

Rule-Obj-Corr

Rule-Obj-HTML

Rule-Obj-XML

If blank, the default value is Rule-Obj-HTML.


Do not use this method with list view or summary view rules.
StreamName

StreamType

Enter the second key part of the rule to be processed. To locate the rule using rule resolution, the system uses the class
of the of the step page as the Applies To class of the rule.
Optional. If you selected Rule-Obj-Corr or Rule-Obj-XML as the StreamClass value, enter here the third key part of the
rule (the Correspondence Type or XML Type).

8) History Add
We can append the history details of a work object.

Database related methods


9) Obj-Open: Use the Obj-Open method to open an instance stored in the PegaRULES database or
in an external database linked to an external class, and save it as a clipboard page.
64

OpenClass: This is the Data table class, whose instance we want to open. Here its DLFREALSTATE-MATERIALS-Work-Employee

Lock: Lock this instance, if we want to update/save/delete. So that it cannot be accessed by other
requestor.

ReleaseOnCommit : Use this to release the lock, if commit is encountered.


LockInfoPage: Use this page if acquiring of lock fails. In that case, this page is created in clipboard
and shows the details.

Property Name: Enter the property that would appear in where clause. We can give multiple
properties too.

The above method fires a query: Select * from DLF-REALSTATE-MATERIALS-Work-Employee


where EmpId = 23

10) Obj-Open-By-Handle : This is another way to open the database instance by using handle.
Handle is a key column (pzInsKey) which is a combination of data class + primary key. So for the above
example, the handle for EmpId = 23 and data class DLF-REALSTATE-MATERIALS-WORKEMPLOYEE would be
----- DLF-REALSTATE-MATERIALS-WORK-EMPLOYEE 23
We can put PropertyName = pzInsKey and value as DLF-REALSTATE-MATERIALS-WORKEMPLOYEE 23

11) Obj-List : This retrieve data from a data table to the clipboard as an array of embedded pages.
This method is deprecated, as it returns the value of all the columns, hence kills the performance. Use
Obj-Browse and Obj-List-View followed by Obj-Filter Instead.

65

Page Name: Name of the page from pages and classes that will hold the record of the returned
values. In pages and classes, we put the value as: pages : MyResult. Classes : code-pega-list
(Normally it should be this class only to hold the retrieved records in embedded pages.
ObjClass:

Name of the data table class whose instance needs to be searched.

RuleObjList: Optional. Identify the second key part List Name name of a list rule that specifies
which properties are to be retrieved.
SelectionProperty: The property specified here will take part in where clause of the query. If left
blank, all the records will come.
The query here will be: select * from <data class table> where EmpId is between 1 and 25.

13)

Obj-Browse : This queries the Database with only selected properties. Only

properties exposed as columns can be used as selection criteria. However, values of


properties that are not exposed as columns, including embedded properties, can be returned.

Page Name: Name of the page from pages and classes that will hold the record of the returned values.
In pages and classes, we put the value as: pages : MyResult. Classes : code-pega-list (Normally it
should be this class only to hold the retrieved records in embedded pages.
66

ObjClass:

Name of the data table class whose instance needs to be searched.

GetRowKey: Include the primary key in the result-set.


Logic : Below logic, there are steps label (A and B). We give logic for or, and conditions. Like (A
AND B) , (A OR B), (A OR (B AND C) ).
Select: If select this check-box, only those properties will be retrieved in result-set. If check none, all
properties will be retrieved.
Field: Only exposed properties can be there in Field value. It will be used for selection criteria.
Condition: We can give a number of conditions and the property to be part of where clause must be
exposed property.
Sort: Can short ascending and descending.

13) Obj-Filter : Use the Obj-Filter method to filter the embedded pages of a results page (such as a
Code-Pega-List page produced by the Obj-List, RDB-List, Obj-List-View or Obj-Browse methods)
based on one or more when condition rules.

We have used here Obj-Browse then Obj-Filter to filter the resultset.

List page: The page (code-pega-list) used above in Obj-browse to hold the result set as embedded
page.

ResultClass: The data table class.


When: Provide a when condition to filter the data. (Here when is .Empld < 100).
14) Obj-List-View :
Use the Obj-List-View method to execute the retrieval and sorting operations, but not the
formatting and display processing, of a list view rule.
The system uses rule resolution to find the list view rule and executes it, but does not produce any
HTML output display. The selection criteria of the list view rule and the sorting requirements (recorded
on the Content tab) are converted to an SQL query that is sent to the PegaRULES database.
The database results are organized into a results page of class Code-Pega-List. The name of
this page is determined by the Content Page Name field on the Content tab of the List View form,
(The Step Page field on the step is ignored.)

67

Parameters
Specify all three key parts of a list view rule.
Parameter
ObjClass

Description
The Data table class

ListView

The List-View Rule of the Data table class

Owner

Owner of the List-View rule

15) Obj-Save
Use this method to request that the system save a clipboard page to the PegaRULES
database or (if the page belongs to an external class) an external database.
The Obj-Save method uses properties on the page to derive the internal key under which it will
be saved. This method can create a new database instance or overwrite a previous instance with that
key.
An object that is stored in the PegaRULES database is persistent. The object is available to
other users, and remains after the requestor session that created it ends.
This method does not always cause the object to be written immediately to the database.
Often, developers use this method perform a "deferred write" operation. In such cases, later execution
of the Commit method, in the same Thread, completes the database update.
Select the WriteNow parameter to force this page (and only this page) to be written to the database
as part of the Obj-Save method. Unlike the Commit method, the Obj-Save method does not operate
on all previously marked-for-commit objects, only on the current page, and does not release locks.
You can reverse the effect of an Obj-Save method if it has not yet been committed with
the Obj-Save-Cancel or the Rollback method.

Cautions

In all but rare situations, do not save a page that contains messages and so is marked as invalid.

16) Obj-Save-Cancel
Use this method to cancel the most recent uncommitted Obj-Save method, so that the instance is not
written as part of a later Commit operation. You can also use this method to undo an Obj-Delete that
has not yet been committed.
Use the similar Rollback method to cancel all uncommitted Obj-Save and Obj-Delete operations,
not only the most recent one.

68

17) Rollback
Use this method to cancel or withdraw any previous uncommitted changes to the PegaRULES
database (and to external databases accessed from an external class) from the current Thread. All
pending Obj-Save and Obj-Delete methods are cancelled.

18) Obj-Sort
Use this method to sort the clipboard pages that are the values of a property of mode Page List. You
can specify one or more properties to sort on, and whether the sort sequence is ascending or
descending for each sort level.

Parameters
This method has two base parameters and an array of two parameters per row:
Parameter

Description

PageListProperty
Class

Enter a property reference that identifies a target property of mode Page List to be sorted.
Identify the class of the pages within the Page List property.

SortProperty

Enter the property based on which well sort the pages.

Descending

Select to cause the method to sort in descending order for the property. Clear the box to sort in ascending order.

19) Obj-Delete
Use the Obj-Delete method to delete a database instance corresponding to a clipboard page and
optionally to delete the clipboard page too. You can cause the deletion to occur immediately, or (more
commonly) defer deletion until a later execution of a Commit method.
This method can operate on objects of both internal classes (corresponding to rows in a table in the
PegaRULES database) and external classes (corresponding to rows in an external relational
database).
The Obj-Delete method uses the class of the page to obtain the appropriate Rule-Obj-Class instance.
It uses the table name, key fields, and other aspects of the class rule to mark the instance for
deletion. Unless you check the Immediate check box on the activity form, the database deletion does
not occur until the system next processes the Commit method.
You can reverse or cancel a previously executed Obj-Delete method by using the Obj-Save-Cancel
method (like the method Obj-Save can be reversed), unless the Immediate box is selected or the
Commit method has already occurred.

Parameters
This method has two parameters:

Parameter Description
Remove

Immediate

If selected, the system deletes the page identified in the Step Page column of this step from your clipboard and marks the
corresponding persistent instance for deletion.
If selected, the system deletes the database instance immediately (commits this deletion).
To delete the database instance immediately from the database, select this box. If this box is cleared, the database
instance is deleted by the next Commit operation.

69

Results
The system finds the clipboard page identified in the Step Page column of the current step and
checks whether it the current requestor holds a lock on the corresponding object.
If the object is not locked (and the class rule allows locking), the method fails and no clipboard or
database changes occur.
If the page is locked and the Remove parameter is selected, the system deletes the page. It marks
the persistent object in the database for deletion, or deletes it immediately, depending on the
Immediate parameter.
The system automatically performs index processing for an immediate delete, or later when a Commit
method follows the Obj-Delete method.

Fail and Warn conditions


These situations cause the method status to be Fail or Warn.
You cannot delete an instance without locking it first (usually with the Obj-Open method).
You cannot delete an instance while it is locked by another requestor.

20) Obj-Delete-by-Handle :

Delete an instance by handle.

20.5) Commit:
Use this method to commit all uncommitted database changes. This method writes all the instances
specified by one or more earlier Obj-Save methods to the PegaRULES database (for internal classes)
and to external databases (for external classes).

Decision Methods (Property-Set-Decision-)


21) Property-Map-DecisionTable
Use the Property-Map-DecisionTable method to evaluate a decision table rule and save the result as the value of a
property.

PropertyName: Property to receive the return value of Decision Table.

22) Property-Map-DecisionTree
Use the Property-Map-DecisionTree method in to evaluate a decision tree rule (Rule-DeclareDecisionTree rule type) and store the result as the value of a property.

70

PropertyName: Property to receive the return value of Decision Table.


Input:
Optional. Enter a literal value or property reference that is the source value for the decision
tree evaluation.
When provided, this value is used for comparisons in the top-level structure of the true, for evaluations
with no left-hand value, such as:
if > "Hello"
When you leave this blank, the system uses the value of the Property field on the Input tab of the
Decision Tree form for the rule.

23) Property-Map-Value
The Property-Map-Value method evaluates a one-dimensional map value (Rule-Obj-MapValue
rule type) defined in the parameter. The method sets the result as a value for a Single Value property.

24) Property-Map-Value-Pair
The Property-Map-ValuePair method evaluates a two-dimensional map value rule identified in
the parameters. It sets the value that results into a specified property.

71

25) Property-Seek-Value:
Use this method to initiate backward chaining computations for the value of a property, based
on Declare Expression rules.

26) Property-Set-Messages
Use this method to associate a text message with a property or a step page. The system reads
the appropriate property and adds the message to the page. You can provide the entire literal text of
the message, or reference a message rule key that in turn contains message text.

Message: This field can contained a pre-defined message or a Field Value.

27) Property-Set-Special :

Used to set special properties like py properties. But deprecated now.


We can use the Proprty-Set method only.

28) Call <Activity Name>


Use the Call instruction to cause the current activity find another specified activity and execute it.
When that activity completes, control returns to the calling activity.

Pass current
parameter page?

Select to cause the calling activity's parameter page to be passed to (shared with) the called activity, which can
alter its contents in any way. Clear to use the array that appears below the check box to pass parameters to the
called activity.
If you select this box, the parameter page remains available to the calling activity after the return. This capability is

72

sometimes known as call-by-reference.


If you select this box, make sure that input parameter values needed by the called activity are present on the
parameter page before calling the activity.

Or pass the parameters required by the called activity. Here we pass two input parameter (A and B)
and one output parameter i.e C.

29) Branch <Activity Name> : Similar to call but.


Use the Branch instruction to cause the current activity to find another specified activity and
branch to it without a return. When the system executes a Branch step, control transfers to another
activity found through rule resolution. Execution of the original activity pauses.
When the branched activity ends, processing of the current activity ends also; no steps after the
Branch step are executed.
You can pass parameters to the target activity, or you can share the current activity parameter page
with the target activity.

RDB Methods
The four RDB Methods RDB-Open, RDB-Delete, RDB-Save, RDB-Browse are not used individually.
But they are used in conjunction with Connect SQL rules. (New -> Integration-Connectors ->
Connect SQL).

73

30) The RDB-Open -> will use the SQL query written in the Open Tab of Connect SQL tab.
Use this method to retrieve a single row (record) of data from an external relational database and add
the retrieved data into a specified clipboard page as property names and values.
Use this method in conjunction with a Connect SQL rule that contains SQL SELECT or EXECUTE
statements in the Open tab. Define the SQL statements so that the database returns exactly one row.

OpenClass -> The data class name, whose instance we want to open.
RequestType -> 3rd Key Part of the Connect SQL rule (See in previous page)
Access-> MSSQL, ORACLE, SYBASE, DB2 etc.

31) The RDB-Delete -> will use the SQL query written in the Delete Tab of Connect SQL tab.
It has the same parameters as above.
Use this method to delete a row or rows from an external relational database using SQL. This method
operates in conjunction with an SQL statement in the Delete tab of a Connect SQL rule (RuleConnect-SQL rule type) that contains the DELETE, TRUNCATE or DROP SQL statement.

32) The RDB-Save -> will use the SQL query written in the Save Tab of Connect SQL tab.
It has the same parameters as above.
74

Use this method to save the contents of a clipboard page into a row of a relational database. The
system saves the properties on the specified step page to the specified table in the database.
This method operates in conjunction with a Connect SQL rule that contains SQL statements such as
INSERT, UPDATE, and CREATE statements on the Save tab.

33) The RDB-List -> will use the SQL query written in the Browse Tab of Connect SQL tab.
Use this method to retrieve rows from an external relational database and place the results as
embedded pages in a specified step page of class Code-Pega-List.
This method references a Connect SQL rule instance, and executes SQL statements stored in the
Browse tab of that rule instance. The search can do anything you can specify in a SQL statement,
such as a SELECT WHERE statement. Any constraints on the returned data are in the SQL.

ClassName

Enter a class name, the Applies To key part of a Rule-Connect-SQL rule.


Identify the exact class of the rule. The system does not use class inheritance to find the Rule-Connect-SQL rule
instance. This is also the class of the pxResults embedded pages which hold the search results. It can be a class that
you created to hold the results.
This class is distinct from the class which the RDB-List method searches, which you identify in the SQL code in the
Rule-Connect-SQL rule.

MaxRecords
BrowsePage

Optional. Enter a positive integer that is the maximum number of rows to return in the search results.
Optional. Identify the top-level page into which the search results are to be returned. The pxResults pages are
embedded in this page. If left blank, the system uses the step page you specified for the RDB-List method in the
activity step.
If you select this option, do not select the RunInParallel option. Parallel operations cannot update the single top-level
browse page.

ApplyDeclaratives

Select to cause change tracking for Declare Expression and Declare Constraint rules processing
to be applied to the properties returned by this method.
You cannot select this box if the RunInParallel box is selected.

Complex and Dynamic SQL Statements in Connect SQL.


In Connect SQL Rule, in browse tab, we can include lots of complex queries. Note the results can
be either a record or sets of record. Hence include a page/page-list accordingly in the browsePage of
RDB-Browse method.
75

Select MarketPrice as ".MarketPriceprop" : To include column name that includes lowercase


letters, include as.
WHERE zipcode={myPage.zipcode Integer} : Integer is the database specific data type.
References to elements of Page List and Value List properties must contain integer constant
index values such as 7 or 23 or keywords such as <LAST> or <CURRENT>.
You cannot use the Param keyword in these property references.

Table or Class name Literals.


the Class keyword is similar to the Table keyword. With Class keywords, use the format:
{class:ClassName}
for a direct reference to a fixed, known class. or:
{class: {page.property}
for an indirect reference that at runtime becomes the class.
For example,
{class:Data-Customer-Address-Details}

Table keyword
To use Table keywords, follow the format:
{Table:TableName}
for a direct, static reference to one Database Table instance, or:
{Table: {page.property}}
for an indirect reference to a property that, at runtime, contains in its value a Database Table name. For example,
{Table: {CustomerMaster.OracleAddressTable}}.
Use this syntax when entering a SELECT statement:
SELECT columnname AS ".propertyname" or "page.propertyname".
to select all the columns in the table. Use it to replace a SELECT * from ... statement.
For example:
SELECT {all} from {class: Data-Customer-Summary}

Calling a stored procedure

{call procedure({resultset})}

we use resultset keyword.

To create multiple resultsets in one procedure, place a {resultset} marker for each parameter for each example that returns a
resultset. For example:
{
{resultset} = call testFunc(
{dataPage.OutProperty1 out},
{dataPage.inkey1},
{resultset},
{dataPage.inkey2},
{dataPage.OutProperty2 out},
{dataPage.inkey3},
{resultset})
}

Capturing SQL statements and status responses


To include SQL debugging and return status information from the database software, enter a line at the top of your SQL
code in the format:
{SQLPage:mySQLPage}

76

Enter the name of page on which the system records the error messages. The page can have a class or be a
classless page.
When the Connect SQL rule executes, the system creates a page with this name and adds two properties:

pxSQLStatementPre The SQL you entered in the Connect SQL form.

pxSQLStatementPost The SQL you entered in the Connect SQL form tab with the references
resolved to show their values, so you can verify the references.

If errors occur, additional properties appear on this page:

pxRDBError An error message from Process Commander.

pxRDBSQLCode A result code from the database access driver.

pxRDBSQLVendorError1 An error code from the database vendor.

pxRDBSQLVendorError2 An error code from the database vendor.

pxRDBSQLVendorMessage1 An error message from the database vendor software.

pxRDBSQVendorMessage2 An error message from the database vendor software.

To Map to external DB. We can create a instance of Data-Admin-DB-Name.


New -> SysAdmin -> Database.

Use configuration in preferences -> configuration in prConfig.xml


Use JDBC URL : Provide JDBC URL, Username and Password.
Use JDBC Connection pool : Use JNDI Resource pool.
In Advanced Tab, we have connection pool size, and Fail-over Data base.
77

To return Multiple ResultSet


Use keyword Mutiset.

The resulsets will be stored inside the browsePage which must be of code-pega-list. But only in SQL
Server and Sybase.

ASIS KEYWORD
Used for dynamic SQLs. Store the dynamic part of SQL statements in a property in clipboard.
For example, you can create a text property named DynamicWhere and use a Property-Set method to store the value:
"pyLabel like 'Mexico%'"
Then, in a Connect SQL rule, you can use this as a WHERE clause, using the syntax:
where {ASIS: pyWorkPage.DynamicWhere}
The ASIS keyword is essential, so that Process Commander does not place spaces or double quotes around the value.

34) Java:

Used to write custom java code.

35) Connect SOAP:

This is used to connect to the SOAP services method. This method is used by the

connector Activity to
connect to a SOAP services. See Integration section for more details.
Similarly Other connect methods also are used to connect to the respective services.

Iteration in Activities.
Iteration in activities can be done using for loop, for each page, for each embedded page etc.
Giving 3 ways to iterate in activities.
1) Using <CURRENT>
This <CURENT> tag holds the current index of iteration. It is updated automatically in each
iteration. Note in the below screen-shot. We are iterating on the pagelist EmpPageList (This is
created in the clipboard, if we use this pagelist in repeating layout in a flow-action to collect
values).

78

Iterate on .EmpPageList. Under iteration, we have several sub-steps (1.1 to 1.4)


- Create a new page (for data class )
- Set Properties in the page that we want to save in data-base.
- Primary page refers to pyWorPage here. EmpPageList (<CURRENT>).EmpId = EmpPageList
(1).EmpId in first iteration, EmpPageList (2).EmpId in second iteration etc.
- Save the page in data-base.
So in each itration, we are collecting values for a single page or single record of repeating layout and
saving in data base. The iteration will perform 3 cycles here, as we have 3 records.

2.) Using parameter pyForEachCount


This is a parameter passed automatically to the activity by PRPC Application only when the activity
uses looping.
To access it, we just need to add this parameter as input, in the parameters tab in the activity.

79

Similar to above, Param.pyForEachCount holds the index of current iteration. The same concept as
above.

3.) Using local variable.


In parameter page, we have entry for local variable. Update a local variable there.

Now in the activity, initialize this variable to 1. Use this variable as index, and in each sub-step,
increment it manually.

Get values from Data Tables and display in flow action.

80

In Pages and classes, use these values.

Obj-Browse method used to get the records from the Data table.
Iterate on the resul-set (returned by Ob-Browse method as pageList DataPage.pxResults.
Copy each page from pageList to our pyWorkPage.EmpPageList (PageList declared in our
class).
All the values of the pageList will be available in the Clip-board. If we use the pagelist properties in a
repating layout, the results can be shown.

Creating WorkBasket
New-> Organization -> WorkBasket

81

Give the name of WorkGroup it contains. Similarly create a Workgroup. New -> Organization ->
WorkGroup.
Give the name of WorkBasket in the WorkGroup.

Now in the OperatorID provide the WorkGroup and WorkBasket name under work-Setting tab

82

Sending Work object to Worklist/Workbasket


An assigment is a state of a Work Object which requires some action by a user. Usually, the business
process will require that particular Work Objects be performed by specialized users. PRPC handles
this situation using Worklists.
A Worklist is, as its name indicates, a list containing the Work assignments that are assigned to a
specific operator. Within a flow, a Work Object assignment is sent to a specific user through the use of
a Router Shape. In the configuration section for the router, the developer shall specify "ToWorkList" on
the "Rule" field and then, as "Parameter", the Operator ID to whom he wants to send the Work Object
assignment.

Figure 4. Properties of a router shape using ToWorklist routing rule in PRPC 5.5
The assignment properties will need to be configured according to the rule used to route the Work
Object:

Figure 5. Setting the routing type on the properties of an assigmnet shape in PRPC 5.5
As shown in Figure 4, the ToWorklist routing rule takes as parameter a user ID, to know to the
worklist the assignment must be sent. There is an adittional option to check, before routing the object,
the availability of the selected operator. When a Work Object assignment is routed to an operator
different than the one who is working on it, PRPC shows a Review Harness as depicted in the image
below:

83

Figure 5. Work Object has been routed to a different operator in PRPC 5.5

Work Basket
A Workbasket is a queue of Work Object assignments that are not directly linked to an operator, so a
group of operators can work on the assignments contained in it. Workbaskets are related to an
organization unit, a workgroup and a calendar, and within a flow, work objects are sent to them
through the use of a Router Shape. In a similar way as with WorkLists, the router shape must be
configured using the rule "ToWorkbasket", setting as parameter the name of the selected workbasket.
Do not forget to set the routing type to "Workbasket" on the assignment's properties.

Figure 6. Properties of a router shape using ToWorkbasket routing rule in PRPC 5.5

In a similar way as when routing to Worklists, PRPC notifies the operator that the current Work Object
has been routed to a work list through a review screen:
Workbasket routing can also improved upon when used in conjunction with Skills. A specific User can
have different skills in different levels, and Work Objects assignments can be sent to an skilled
workbasket allowing only the users with a certain skill at a certain level to work on them. Again, this
configuration is made through the Router Shape, configuring it to use the rule ToSkilledWorkbasket,
which parameters are the required skills and levels and, of course, the selected workbasket.

Skilled Workbaskets
Also a workbasket can be used in a way that only allows a subset of users to access certain work
object assignments, even if there are more users that have access to that specific workbasket. This
kind
of
filtering
can
be
accomplished
using
skills.

84

Figure 8: displays how different skills with different ratings can be defined for an operator. Skills are
instances of Rule-Admin-Skill. PRPC provides standard skills (English, French, Java, HTML...).
In order to use a skilled workbasket, the router shape will have to be configured. The following image
displays the required rule and its parameters:

Figure 9. Properties of a router shape used for Skilled Routing in PRPC 5.5
In this case, the Router must be configured to use the rule "ToSkilledWorkbasket". As parameters, this
activity takes the destination workbasket and also the required skills and its levels. Create the skill and
it will be available for selection here. Skills can be set as "required", by checking the Required
checkbox or as "desired", without checking it.
85

Dynamic select
When we want to populate data from Database, to be filled in a dynamic select (drop-down) we need
this concept.
It always retrieves unique values in the field. Duplicate values are not shown.
Ways to do it.
1) Create an activity (to fetch data from DB)

This Activity browses a Data Table and fetches the records from it and places it in Step-page.
Now we call show page, so that itll provide the data in XML format, which will be used by the
dynamic select
Property to parse and display the data.
Note: The data class is DLF-REALSTATE-MATERIALS-Work-Employee
Now, we need to modify the property in the UI.

86

We want to make Name as dynamic select. So click on the


Display As
Give DynamicSelect. Now click the magnifier symbol
Fill the details.

Options In Dynamic Select

If we select List View: Then Provide :


- Class name where the List View is present.
- Name of the List View.
If we select Activity

- Class Name of Activity


- Activity Name
- Class whose properties will be returned.
87

button of Name field. And in the

again near it. It opens a parameter page.

Select ID: We can give a unique ID to this Dynamic Select Property, so that it can be referred in other
Dynamic Select.
Default Caption: The default first selected name in the drop down. Like States
Property for Option Display: The property from the returned result-set whose value would be shown.
Property for Option Value: The name of source property that will capture the values of above
property. Normally its same as the Property for Option Display
FILTERS
Param Name: Name of the Parameter that the above List View or Activity will receive.
Select ID: Name of the Select ID (of a different Dynamic Select which will affect our value).

If you choose Advanced.


Next Page.

88

Select ID: We can give a unique ID to this Dynamic Select Property, so that It can be referred in other
Dynamic Select.
Source: Enter the query string form of the activity to call, including values for parameters. Click the
magnifying class button ( ) to open an Activity Picker window for guidance on entering input
parameter values. Use URL encoding (commonly called percent-encoding) for blanks and other
special characters. Use this syntax:
pyActivity=myClass.myActivity&param=value....

Default Caption: The default first selected name in the drop down. Like States
Value: Enter a semicolon-delimited string of property names that form the values of the HTML Option
elements in the format:
propertyName1; propertyName2;...
For example, the following string sets the values of a Dynamic Select to the class names in a list:
pyClassName.

ParentID : Optional. Enter the ID of another <SELECT > element that, when changed, triggers a
refresh of this control.

TargetID: Optional. Complete this field when the results of another Dynamic Select control on the
same harness, section, or HTML form depends on the results selected by users for this Dynamic
Select control. This technique is known as cascading.
Enter one or more semicolon-delimited text value to identify the ID(s) of the other Dynamic Select
controls whose values depend on the value selected in this Dynamic Select control. When a user
selects a value in this Dynamic Select control, the system appends the value to the Source of the
target Dynamic Select control. The activity of the latter control is then executed to populate it. The
Source of the target control must end with the following syntax:
parameterName=.

The value of the selected option in the first Dynamic Select then becomes the value of the parameter
in the activity of the target Dynamic Select.

89

Output:

Auto Complete
This is the feature similar to that we see in Google.
The concept is similar as above. We need to create an activity to browse the values from a data table.
Now we want to make Name as AutoComplete. So click on the
Display As
Give AutoComplete. Now click the magnifier symbol
Fill the details.

See next page

90

button of Name field. And in the

again near it. It opens a parameter page.

Activity Applies To: Name of the class which contains the activity.
Activity Name: Name of the activity.
Search Property Applies To: The data table name which will provide the data for the AutoComplete.
Display Field : Name of the property in data table.
Minimum search Characters : No. of characters after the AutoComplete will work.

If we choose Clipboard Page.

91

Clipboard Page Name, Class Name, Property Name..(Provide these Details)

Declared Pages (Rule-Declare-Pages)


Declare pages are read-only clipboard pages that can be available to multiple users on the system
(node level) or just one user (thread level).

92

Note:
The properties in the declare pages can only be modified by the Activity defined in the declare page
Load Activity. This activity is of type : Load Declarative Page.
For the page to refresh, we need 2 conditions.
1) The Refresh timings declared must be expired. 2) The when condition must return false.
-

Declare pages are not subject to Rule Resolution

Note That, If above conditions meet also, its not necessary that the Declarative page will be calling
the activity and refreshing at the background. If we reference the properties in the Declare Pages, in
our flow, activities, Decision rules etc, then the Declare page refreshes and calls the Load Activity
(Provided above 2 conditions satisfy).
Load Activity used in Declare Pages.

93

Circumstance
A circumstance is an optional qualification available for all rules. Using a circumstance allows your
application to support multiple variants of a rule. They allow you to specify that different rules should
be used for different situations.
For example, we have a property called customerType.
If Gold -> 10 % discount.
If Silver -> 5 % discount.
If Platinum -> 15 % discount.
So we create Circumstances for same rule (activities, Flow actions etc) based on this property.

Types of Circumstance
1) Single Property value Circumstance.
2) Single Property and Date Property Circumstance.
3) Multiproperty/Mutivariant Circumstance.
4) Date Range Circumstance.

1) Single Property value Circumstance.


We create a base rule. Then use the save-as button to create a circumstance, the save-as
form will provide the circumstance options and date range options.

94

2) Single Property and Date Property Circumstance.


Here we provide the circumstance based on single property as well as date property.

95

3) Date Range Circumstance.


Here we provide the date range along with the property, the circumstance will be valid.

4) Multiproperty/Mutivariant Circumstance.
For multi property/Multivariant circumstance, we need to create 2 things.
- Circumstance Template
- Circumstance Defination

Circumstance Teemplate.
New-> Technical -> Circumstance Template.
Provide the properties that you need for circumstance.

Circumstance Defination
New-> Technical -> Circumstance Definition
Provide the properties values that you need for circumstance in the definition.
We can create more than one definations.

96

Note: Here two definitions we have created,


one with RollNo = 1, Name= Abhi, Gender = Male./ RollNo=2, Name= Kabhi, Gender = Female.
And
RollNo = 3, Name= Raj, Gender = Male./ RollNo=4, Name= Aaj, Gender = Female.
Now Save-as your base rule and in the form provide the value of Template and Definitions.
Use -> Template instead of property.

Ruleset Versioning
While moving/migrating the application into another system, we need to lock our original ruleset
(version) and proceed with migration.

97

View -> sysAdmin -> Ruleset version. Lock the version for Unlocking/add-update this version.

Create a new version.


New -> sysAdmin-> Ruleset version.
Or you can save-as the existing ruleset version and change the patch.
If we create a new version, the while creating any rules further, we will have the option to select
between the rulesets versions.

To Migrate to another system


New -> sysAdmin -> Product.

98

See next page.

Provide the details of


- Application,
- rule-sets,
- classes (only data classes. Normal classes come along with rulesets).
Now click on create a zip file. Save the file.

Migration
Migration is a process to export the application from one System to another. For E.g the
developers develop the application in development server. After development is completed, we need
to migrate the application to Quality Assurance server (QA server) for the testers to test it. Then finally
to the production server.
Process Commander provides several tools to archive rules, data instances, and work objects into ZIP
files and move them from one Process Commander System to another.
Well use the product rule here to create a zip file of our application that can be migrated to another
PRPC server.
New -> sysAdmin -> product. Give product name and version.
99

Note: Lock your rule-set and create another higher version rule-set. Now migrate the lower version
locked rule-set.

Provide Application Name and Version.


Provide RuleSet Name and Version. (Work related classes are included in this)
Provide Classes (Derived from Data-)
Create a ZIP file and save it.

Reports:
Reporting is the process to represent data in a particular format which would be beneficial for decision
making. Accurate, flexible, dynamic reporting lets stakeholders know what is going on and makes
good decision-making possible. A report is a way to answer a question about your application, your
team, your sales, or some other measurable assembly of data. Reports can answer questions like
o

"How long does it take for us to resolve an order we receive?"

"Are there seasonal trends in sales that we should adjust our inventory plans for?"

"Which teams are processing works well, and which are having trouble meeting their
deadlines?"

Process Commander Reports assemble the data you specify and display it in customizable tables and
charts. In Process Commander, you can:

incorporate reports into manager and user portals

share reports between managers

export reports as spreadsheets or PDF documents

drill down into reports that summarize data and see the actual data that lies behind the
summary

add charts to summary reports, simplifying data analysis


100

List View: Displays information in a spreadsheet format about work objects of a particular class
where each row represents data about a single work object and each column presents the data held in
a database field associated with the work objects. We can also create List View to represent data
from, Data tables, External Data base etc.

Summary View: Displays summarized or aggregated information (grouped by subtotals, averages,


dates, or other factors) for work items or class instances. We can also incorporate Pie-Charts, Bars,
Curves, data grams, diagrams etc in the Summary view. These reports can further drill down to
produce more grandeur level information.

Important Terminology
Dashboard: A dashboard is an assembly of charts based on reports that is designed to provide a
manager or stakeholder with a quick view of the current status of the work the reports cover. Viewers
can normally drill down (see below) into the charts to see more details about the information they
depict.

Drill down: In summary reports, and in charts associated with them, users can generally click on an
entry in the report or a section of the chart to 'drill down' into the report and see in more detail the data
supporting the top-level display.

Report Browser: The composite Manager portal includes a report browser that lets a manager create
new reports, modify existing reports, and share reports with other managers.
Report Viewer: The composite Manager portal includes a report viewer that lets a manager review,
modify (including adding charts to summary-type reports), and export reports.

Trend report: A trend report organizes data along a time line or other progress indicator. Managers
use trend reports to understand their business processes: for instance, a manager may want to see a
report of the number of sales made per month over the past year.

Relational database: A relational database stores information in multiple tables, and then assembles
information related to a particular data object based on relationships between the various tables. For
instance, in a system managing employees, the table holding the basic employee record might hold
the person's first and last name, a code for the person's department that refers to an entry in the
"Dept" table, a code for the person's job title that refers to an entry in the "Positions" table, and so on.
Process Commander Uses SQL commands (see below) to tell the database what data to retrieve.

SQL: Process Commander uses Structured Query Language (SQL) to query the database for the
information the report needs. SQL is a language designed for managing data in relational database
management systems. The Report Viewer simplifies selection and assembly of SQL statements:
creating Process Commander Reports requires no extensive knowledge of SQL.
Report definition rules, introduced in PRPC V6, simplify creating, adapting, and sharing reports. Both
managers and developers can create and manage reports using report definition rules.
101

List View Report


List View reports can be created in two ways. First from the developer portal by using New -> Reports
-> List View. And other from Managers Portal, using the report wizard.
New -> Reports -> List View.

Applies To : Name of the class whose properties will be used/displayed. Give work type (class) name
when you want to create report on work object. Give data class name if you want to represent data
from a different table/external database.

View Purpose: Just a name to describe the report


Owner: Owner of the report. Write ALL if you wish to share this report to all.
Display Field Tab

102

Category: To assign a category to this report, select from the Smart Prompt list.
Choose one of seven standard categories to cause this report to be listed in a corresponding
group on the Monitor Activity workspace (present in manager portal), (and so available to those users
who can access this workspace.) For example, choose Work Analysis to list this report in the Analyze
Quality area.
Embedded: Select if the output display of this list view is to appear within the runtime presentation of
another rule, such as a section rule or flow action.
Fixed Header: Optional. Select to indicate that the header area is to be excluded from the scrollable
area. This causes the headers to remain fixed, where as the rows are scrolled.
Enable Sorting/Filtering: Self explanatory.
SHOW THESE FIELDS: Use to name the properties to be displayed in the report. You can use
properties from another table/data class also. You need to declare the page and class name under
pages and classes.
Here I am using the EmpID property of data class employee. Hence use pageName.Property.
Note that in order to use the properties of different class, we need to JOIN it with our current class.
JOIN is described later in this section.
Content Tab

103

Criteria: We can provide criteria on properties. These criteria will come as where clause in the SQL
query. We can also provide values for criteria at run-time using page.propertyName or by using
parameters param.value (need to be declared in parameters tab).

Edit Input: Provide a Edit Input rule, if you want to change the format of the field.
Ignore Case and Use Null is self explanatory.

Prompt Settings: These are used to prompt to user (while running the report) a criteria value to
provide at run time.

Get These Fields: Include the properties that you want to be present in result-set. Only properties from
this list mentioned in Display fields tab will be visible in the report. We use this in cases, when we want
some properties to be present in result-set, but not shown in the Report, because they may be used
for calculation purpose etc.

Content Page Name: The page name in clipboard that will hold the records. This page will have a
pageList pxResults to hold the records. Normally we give the page which represents the class CodePega-List (Mentioned in pages and classes tab).

Activity Name: By default getContent Activity (pre-defined) which queries the database to fetch
result. Mostly this is not customized.

Selectable Tab
This tab enables selection of rows. Either single selection (radio button will appear before rows) or
multiple selection (check box).

Organize Tab

104

Provides options for paging. Means if the report is very large, then it will come in pages like 1 2 3 4 etc.

Also provides options for the buttons that will appear in the Report. Like Export to PDF, Export to
Excel etc.
Format Tab.

Describes the HTML/CSS Formatting styles for report/rows/alternate rows etc.


Also describes event handling. It can call Activity on single click or double click on rows.
Parameters Tab
Used to describe parameters. Input parameters can be used to receive values at run time.
Pages and Classes tab

105

JOIN Tab

Provide the data table name here, that you want to use in JOIN conditions in SQL query. Here we tried
to Join Employee and Steel classes (Tables).
Prefix: This value will be used to create a Page for the particular class in Pages and Classes tab.
Here B is prefix for Employee class, hence we can access the properties of Employee class by
B.propertyName (used in Display Field Tab).
Edit Conditions: Used to provide JOIN Conditions. Normally a equi-join.
See in next page.

B.Name = Primary.Name. It means (Employee class/table).Name = (Steel Class).Name.


106

Declarative Index Join:


Indexes created by Rule-Declare-Index rules can be specified here to reference embedded properties
for both display and criteria from the Applies To class. This facilitates using Rule-Declare-Index rules
for performance by avoiding retrieving properties from the BLOB (Storage Stream) column. You can
attach an alias to any declarative index that you have previously defined.
Prefix

Index Name

Enter a text string to be used as an alias for the joined


declarative index class and all its properties. The prefix is
assigned to all the properties in the class and used to
reference the properties from these fields for the Display
Fields and Content tabs.
Specify the Index- class created by the Declare Index rule.

Note:
List View Reports can also be used to show data/records/tables in a section or flow actions. Drag and
Drop the list view in the particular section/flow action. We can also pass run time values to the list view
through properties and parameters. Use these parameters and properties in the Display Fields or
Criteria values.

Summary View (Rule-Obj-SummaryView)


A summary view rule defines a two-level report display, presenting summary counts, totals or
averages to be displayed initially, and allowing users to click a row to drill down to supporting detail for
that row.
Summary view rules support interactive charts, trend reports, and the use of AJAX for pop-up Smart
Info windows.
We can create Summary View reports by Report Wizard and also by Summary View Form.
New -> Reports -> Summary View

107

Applies To : Name of the class whose properties will be used/displayed. Give work type (class) name
when you want to create report on work object. Give data class name if you want to represent data
from a different table/external database.

View Purpose: Just a name to describe the report

Content Tab

Category : To assign a category to this report, select from the SmartPrompt list.
Choose one of seven standard categories to cause this report to be listed in a
corresponding group on the
Monitor Activity workspace (present in manager portal), (and so available to those users
who can access this workspace.) For example, choose WorkAnalysis to list this report in the Analyze
Quality area.
Fixed Header: Optional. Select to indicate that the header area is to be excluded from the scrollable
area. This causes the headers to remain fixed, where as the rows are scrolled.
Move Group By Caption to header: Select to present the Caption value from the current Group By
element in the display header.

108

Criteria: We can provide criteria on properties. These criteria will come as where clause in the SQL
query. We can also provide values for criteria at run-time using page.propertyName or by using
parameters param.value (need to be declared in parameters tab).
Edit Input : Provide a Edit Input rule, if you want to change the format of the field.
Ignore Case and Use Null is self explanatory.
Prompt Settings : These are used to prompt to user (while running the report) a criteria value to
provide at run time.
GROUP BY:
Provide the properties that will be used in the Group By clause of the SQL queries required to retrieve
the data.

FIELDS:
We can provide the properties here to be used in an aggregate functions like count(), Sum(), Avg() etc.

TREND REPORTING

Click on the symbol

to open a window for Trend Reporting.

109

Trend Choose an interval, Range (buckets) or Expression. Choose:

Yearly, Quarterly, Monthly, Weekly, or Daily For fixed intervals.

Range You can determine the ending point of a series of past time intervals, in units of days,
weeks, calendar months or calendar quarters.

Expression Enter an expression to define break points. If the expression results in a boolean
value, enter a comparison.

Select a
Property

Select a DateTime property to be the basis of trend


intervals.

THRESHOLDS

Select if you want to define one or colors to identify ranges on an interactive chart (as
Define
Thresholds backgrounds).
Configure... If you selected the Define Thresholds box, click to enter threshold values and colors for
each.
Content Page Name: The page name in clipboard that will hold the records. This page will have a
pageList pxResults to hold the records. Normally we give the page which represents the class CodePega-List (Mentioned in pages and classes tab).
Activity Name: By default getContent Activity (pre-defined) which queries the databse to fetch
result. Mostly this is not customized.

Drilled Down TAB

110

DrillDown To: This option enables another layer of reporting. When the user viewing the summary
report, when he clicks on the chart/bars, they open-up into another layer of report like List View,
Summary View or Detailed View.
3 options --- List View, Summary View, Detailed View.
In case of List View and Summary View we have to provide the pre-created List View and Summary
View rules. We can also pass parameters to them.
Detailed View
Provide the properties to be shown in the detailed view report. Modify the fields.
DATA SOURCE OF DRILL DOWN VIEW : Leave this field blank in most cases, to use instances of
the Applies To key class of this rule as the source of drill-down information.
You can choose a different concrete class that contains the properties to be displayed in the drilldown display, if:

All properties listed in the Criteria array (on the Content tab) are present in both the Applies To
class and the class you enter in this field, and all are exposed as columns.
The properties in the Group By array (on the Content tab) are present in both classes.

Organize Tab
Provides options for the buttons that will appear in the Report. Like Export to PDF, Export to Excel etc.

Format Tab.

Describes the HTML/CSS Formatting styles for report/rows/alternate rows etc.


Also describes event handling. It can call Activity on single click or double click on rows.

111

Chart Tab
Chart
Output
Type

Select:

Image to develop a static chart and send to the browser as a PNG image. Complete the
remaining details on this form.

Interactive to develop an interactive chart as an Adobe Flash file. Complete the Select
output layout field, but do not complete other fields on this tab. Then click Configure
Interactive Charts to specify parameters for this chart.

Now Press Configure Interactive Charts Button to open a dialog to configure the charts.

You can define Chart Type.

Provide Field and Name Field value, to be used in the charts.


You can define different options in Options TAB That how the chart will appear, size, what buttons to
appear in the chart etc. Color Tab to define colors.

Parameters Tab
112

Used to describe parameters. Input parameters can be used to receive values at run time.
Pages

and Classes tab

JOIN Tab

Provide the data table name here, that you want to use in JOIN conditions in SQL query. Here we tried
to Join Employee and Steel classes (Tables).
Prefix: This value will be used to create a Page for the particular class in Pages and Classes tab.
Here B is prefix for Employee class, hence we can access the properties of Employee class by
B.propertyName (used in Display Field Tab).
Edit Conditions: Used to provide JOIN Conditions. Normally a equi-join.
See in next page.

113

B.Name = Primary.Name. It means (Employee class/table).Name = (Steel Class).Name.


Declarative Index Join:
Indexes created by Rule-Declare-Index rules can be specified here to reference embedded properties
for both display and criteria from the Applies To class. This facilitates using Rule-Declare-Index rules
for performance by avoiding retrieving properties from the BLOB (Storage Stream) column. You can
attach an alias to any declarative index that you have previously defined.

Prefix

Index Name

Enter a text string to be used as an alias for the joined


declarative index class and all its properties. The prefix is
assigned to all the properties in the class and used to
reference the properties from these fields for the Display
Fields and Content tabs.
Specify the Index- class created by the Declare Index rule.

Note:
Summary View Reports can also be used to show data/records/tables in a section or flow actions.
Drag and Drop the list view in the particular section/flow action. We can also pass run time values to
the list view through properties and parameters. Use these parameters and properties in the Display
Fields or Criteria values.

Tickets (Rule-Obj-Ticket)
Tickets support business exception processing in a flow. It overrides the normal processing of a flow,
when any exception or event occurs.
To create a ticket
New -> Process -> Tickets.

To call a ticket, we need an Activity to set tickets. Here we are calling the activity from the flow action.

114

Calling TicketAct activity and passing the name of the ticket in the parameter (TicketCollectInfo).
The activity is shown below. It sets the ticket conditionally. In the pre-condition we call a when to check
if RollNo is less than 0 or negative, then it sets the ticket, otherwise removes the ticket.

Now, when the condition for Set ticket is met, the ticket is set and our flow returns back to the place
where the ticket is set. It searches the ticket in main flow as well as sub flow.
Occasionally, we can provide a HTML-Reference also to the flow action in order to set a note while
ticket is set.
In Flow action, we change the HTML tab as :

115

This HTML Reference ActionSetTicket creates a form to receive some note, while setting the ticket.
Output of the HTML-Reference.

Tickets (Rule-Obj-Ticket)
Tickets support business exception processing in a flow. It causes the flow to move back to a specified
place where the ticket is set. It overrides the normal processing of the flow.
However, ticket rules are optional; a ticket rule defines only a name.
Create a Ticket.
New -> Technical -> Ticket

116

How tickets are raised


1) An activity can call the Obj-Set-Tickets method to set a ticket, and call the same method again to reset
(turn off) the ticket.

Here the input parameter Ticket provides the name of the ticket. This parameter has to be passed at
the place of calling the Activity.
We can call the activity from flow action.
This flow action calls activity TicketAct (described above). It passes parameter Collect to the
activity. This Collect is the ticket name.

117

When the flow reaches this flow action, the normal processing of the work object is stopped and the
control goes back to the place where the ticket is placed.
Normal practice is to keep this flow action (which raises ticket) as a local flow action, so that user has
choice to raise ticket or move forward in the flow. Or keep the Activity that raises ticket to test a precondition, which when fails raises the ticket.

2) Users can select the standard Work-.SetTicket or @baseclass.SetTicket flow actions when
processing an assignment.
These flow actions can be inherited (overridden) in our classes. They do the same thing as above.
They call an activity called ActionSetTicket which raises the ticket. They also refer to an HTML
Source (HTML tag in Flow action) ActionSetTicket which provides a UI in the flow, where we can
select the Ticket manually and write a note.

118

The Status-Resolved ticket


When a work object becomes resolved (the status changes to a resolved status), Process
Commander automatically turns on (or "raises") a ticket named Status-Resolved. Every flow
execution in process for the work object that contains a ticket with this name is interrupted and control
transfers to the ticket task in the flow.

Service Level Aggreement (SLA) (Rule-Obj-ServiceLevel)


A service level rule is an instance of the Rule-Obj-ServiceLevel type. Each service level rule
defines one to three time intervals, known as goals, deadlines, and late intervals, that indicate the
expected or targeted turnaround time for the assignment, or time-to-resolve for the work object. These
provide metrics or standards for the business process.
A developer can associate service level rules with assignments in a flow and with the entire flow.
The time interval starts when the assignment is created, not when a user begins processing the
assignment.
For assignments, the service level rule is referenced in the Assignment Properties panel of the
assignment task.
For the overall work object, the service level rule is identified in the standard property .pySLAName,
typically set up through a model for the class. (The default value is the Default service level.)
The Pega-ProCom agent detects service levels not achieved unmet goals or deadlines promptly.
If an assignment is not completed before the time limit, the system can automatically notify one or
more parties, escalate the assignment, cancel the entire flow, and so on.

119

1) Create a SLA.
New -> Process -> Service Level

The Escalation Activity is called, when the goal, deadline is passed.


Note:
The Pega-ProCom agent is responsible for detecting the service level and calling the
appropriate activity.
Hence we need to modify the Pega-ProCom agent (rather Pega-ProCom agent schedule)
inorder to detect our SLA and call accordingly. The details to modify the Pega-ProCom agent are
given in following pages.

2) For Assignment SLA


Set the Assignment Properties for Service Level.
Note: For Service level to start, we need to route the assignment to a worklist/workbasket .

120

There are few predefined SLAs too.

3) For Work Object SLA.


After a service level rule has been configured for a work type, whenever a work object from that class
is created, a standard flow named Work-.Overall SLA starts running in the background. In its default
state, the OverallSLA flow creates an assignment named SLAProcessing in the default workbasket for
the operator's organization.
This assignment stays open until the work object is resolved. The times specified in the work object's
service level are tracked against the SLAProcessing assignment. Additionally, the OverallSLA flow
appears in the clipboard as one of the executing flows on the pyWorkPage page:

2. Locate and open or create the pyDefault model rule for the work type of the work object for which
you created the service level rule (Rules by Type explorer > Technical > Model).
3. In the model rule, configure an entry for the pySLAName property that specifies the name of the
service level you created. Save the Model . For example:

121

Now when you create a work object of that work type, flow processing tracks the service level
for the work object against the SLAProcessing assignment. Note that because you specify the service
level in a model for the work class, the service level applies to all flows that create work objects of that
class.
Note: In order to make this Work Object SLA work properly, we need to define the Workbasket of the
operator whom we route the work.

3) Configuring the Pega-ProCom Agent


We need to configure the Pega-ProCom Agent Schedule in-order to make our SLA detectable.
Open View->SysAdmin-> Agent Schedule. Open Pega-ProCom Agent.

The second No. Agent, i.e ServiceLevelEvents must be modified and enabled. It calls Activity
ProcessEvent.
In the security tab, add the Application Rule-Set.

AGENTS
Agents are internal background processes operating on the server that run activities according
to a schedule. Agents are autonomous and asynchronous. The activities they call run individually on
their own schedules and one activity does not have to finish before another one runs.
Agents route work according to the rules in your application; they also perform system tasks such as
sending e-mail notifications about assignments and outgoing correspondence.

122

Every Process Commander system includes three standard agents named Pega-ProCom, PegaIntSvcs, and Pega-RULES.
Agents are implemented through two Process Commander Objects:
Agent queue rules instances of Rule-Agent-Queue. These rules specify the activities the agent
runs and the interval, in seconds, at which it runs them. There can be no more than one agent queue
rule in a RuleSet.
Agent schedule data objects instances of Data-Agent-Queue. Process Commander generates
these schedules for
each node in the system, based on the settings in
the agent queue rule. For each agent queue rule, one agent schedule is generated for each node in
the system.
An agents rule provides a template that specifies the global settings for that agent on all nodes. To
modify the configuration settings for an agent, open the generated agent schedule object for a specific
node and modify the settings in the agent schedule.
The Agent Manager is a master agent that gathers and caches the agent configuration information
set for your system when Process Commander starts. Then, at a regularly scheduled interval, it
determines whether any new agents rules were created during the last period. If there are new agents
rules, the Agent Manager adds them to its list of agents and generates agent schedule data instances
for them for each node. The Agent Manager also notices when updates are made to existing agents
rules or agent schedules.

MASTER AGENTS
The PegaRULES engine runs two master agents:
Agent Manager: This master agent gathers and caches the agent configuration
information set for your system when Process Commander starts up. Then, at a
regularly scheduled interval, it checks whether any new agent queue rules have been
defined. If they have, the Agent Manager adds them to its list of agents and generates
schedules (data objects) for them for each node.
Requestor Manager: At a regularly scheduled interval, this master agent examines
the state of all the requestors in the system to see if any have timed out. If a
requestor has timed out, the Requestor Manager terminates it.
The master agents behavior is determined by settings in the prconfig.xml file, which is described
later in this section.

STANDARD AGENTS
By default, Process Commander relies on two standard agents: Pega-ProCom and Pega-RULES. If
your system is using the PegaDISTRIBUTION Manager application, Process Commander also uses
the Pega-IntSvcs agent.
The Pega-ProCom agent queue rule is configured to run two activities by default and two
additional activities if you enable them:
ProcessServiceLevelEvents compares the current time to the times specified as the
goals, deadlines, and late times of the current assignments. This activity is enabled
by default and it runs every 30 seconds. For more information, see Configuring the
SLA Agent on page 7-17.
123

SendCorr sends notify messages to users about assignments and outgoing


correspondence to work parties. This activity is enabled by default and runs every
30 seconds.
Email_CheckIncoming checks the inboxes of any incoming e-mail accounts that
have been configured and if it finds messages, routes them according to the
settings in the e-mail account. When enabled, it runs once every 30 seconds.
GetConvertedPDFsFromPDM checks the PDM Requests table to see if any Word
documents have been converted to PDF files. You enable this activity only if you
are using PegaDISTRIBUTION Manager and you want to use it to convert Word
files attached to work objects into PDF files. For information about this product, see
the PegaDISTRIBUTION Manager for Process Commander Installation and
Configuration, which is available on the Pega Developer Network (PDN). Figure 7-1
shows the Pega-ProCom agent queue rule.

Process to Create An Agent.


New->sysAdmin -> Agent.
(Note: We cannot create Agent Schedule, its created automatically for each node by the Agent
Manager Master Agent).
Give the rule-set Name in the form. Its created with the same name as the rule-set. Note we can
create only one Agent per rule-set.
Now give the details.

In security tab, provide the Access Group name.


124

After this, the Agent scheduler is automatically created by Master Agent for this agent. And the activity
runs in the timely manner.
There are 2 Patterns here.
1) Periodic: Means the activity will be called periodically at equal interval, say 30 secs.
2) Recurring: Means we can specify other advanced Interval, when to call the activity.
Eg:

Daily, weekly, monthly, everyday etc.

Modes of the Agents

Legacy Specifies that this is an agent that was created in a version prior to V5.4 and has not yet been updated.
This option is not available for agents created in V5.4 or later.

Standard Specifies that this agent processes items from an agent queue and that it relies on the system to
provide object locking and other transactional support.

Advanced Specifies that this agent uses custom queuing. See


Pega Developer Network article PRKB-25045
Understanding agent queues. We have to use Queue-for-Agent method in an activity to enable the agent to
process the specific objects from the System queue.

This method stores a request for processing as a persistent object (entry) in the system queue. The method specifies:

Which agent is to process the queue entry

How many times the agent attempts to process the entry

How long the entry is to remain in the queue before the agent can try to process it the first time.

We can see the details in System Management Application under tools.

To check schedule agents (data agents) go to Nodes tab and check there. Click on the node.

125

In the security tab, provide the details of Access group and Tick on Bypass Activity Authentication.

SYSTEM MANAGEMENT APPLICATION


The System Management application (SMA) is a Web application that developers can use to
monitor and control caches, agents, and listeners, Requestors, Tracing and Logging.
They can also see the contents of Memory, prconfig.xml file etc. and other processing in your Process
Commander system. The URL name is prsysmgmt.

Capabilities
Using the System Management application, you can:

Review the memory used by the Java Virtual Machine on the server.

Review the most recent ServletRequest and HTTPRequest details.

Display the prconfig.xml file.

Access any requestor and view the clipboard, start the Tracer, examine performance statistics,
and terminate requestor processing.

View executing threads and their characteristics.

View, stop, cycle, or restart agents and listeners.

View open JDBC database connections.

View rule cache statistics, and empty the cache.

Force extraction and recompilation of the functions in a library.

Extract and compile one activity rule or model rule.

Start or stop remote logging.

Observe the utilization of requestor pools supporting stateless services.

Review the status of the Java class loader.


126

Tracing the Agent Activity


In SMA, we have Agent Management. We can click on Agents. We have options of

Select the Agents that we want to trace. Then Click on Delay Button. (It delays the Agents activity for
60 secs to connect to a Tracer).
Now go to Requestor Management.

Select the Requestor having a message in Last Input Tab : Waiting for 60 Secs for Tracer
connection. Now Click on Tracer. It will start tracing the Agent.

Logging
Each node on a Process Commander system produces two logs:

The Pega Log also known as the console log or system log contains messages created since the server was
most recently started. The log file is usually named PegaRULES-YYYY-MMM-DD.log, where the date portion of the
name indicates the date the application server was recently started (on the current node).

The Alert log contains only alerts and supports performance-related monitoring.

Viewing or downloading the Pega log


Select Tools > Log Files to view or download the current Pega log from the server to your workstation.

127

Listeners operate as Java threads rather than as full requestors, and so cannot be accessed with the Tracer. Accordingly,
use logs to debug listeners.

Follow the steps in the following procedures to configure a listener or service requestor to send log messages to your
workstation. Then, using a modified version of the LogFactor5 log analysis module, you can review detailed or filtered
messages. (LogFactor5 was an open source project of the Apache Software Foundation.)

Install the log4j Remote Logging package


To install remote logging client software on your workstation:

1. Select Tools > System Management Application to start the System Management application.
2. On the System Management application window, select a node. Select the Logging and Tracing > Remote Logging
menu item.

3. Click the link "here" in the sentence "To download log4j socket server click here." This download contains a
licensed redistribution from the Apache Software Foundation.
4.

Save the file to a local drive and extract its contents.

5. Note the directory that you extracted it to so you know where to locate the startSocketServer.cmd file. This file
starts the LogFactor5 window that displays the contents of the log.
6.

Review Internet Explorer settings to confirm that your workstation has a Java 1.4.1 or later JVM installed and
enabled.

7. Create a Windows shortcut for the startSocketServer.cmd file and then place it on your desktop. You then can start
LogFactor5 with a mouse click.

128

CACHE
Process Commander maintains a memory cache of recently found (and non-found) rules to improve
the performance of the engine, especially during rule resolution searches. This rule cache (also
called the rule instance cache) operates invisibly and automatically. The system adds to the cache
any rule that is read three or more times (for some rule types, a higher limit applies). Caching
provides a substantial performance and response time improvement for all users.
Operation of your Process Commander system benefits from several caches, provided by various
software facilities.

All caches

Rule cache Per node. Reduces PegaRULES database traffic, contains copies of rules
recently accessed or recently updated by developers. Occupies virtual memory. The
PegaRULES agent, during the periodic system pulse, invalidates rules in the rule cache that
were recently updated on another node.

Rules Assembly cache Per node. Tracks rules for which Java generation and compilation
is complete. Formerly known as the FUA cache. Located in virtual memory; links to loaded
Java classes.
The Rules Assembly cache is an in-memory table that allows Process Commander to rapidly
identify compiled Java CLASS files that correspond to compiled and assembled rules (such as
activities, functions, and stream rules).

Rule Resolution cache Per node. Supports faster rule lookup; in virtual memory.

Personal rules cache Per node. Similar to the Rules Assembly cache, for rules checked
out into private RuleSets by developers.

PegaRULES database cache System-wide. Provided by Oracle, Microsoft SQL Server or


other database software, not by Process Commander software. This can be an important
factor in performance, but managed independently of Process Commander server caches.

Rule Cache Management in SMA (Under Advanced Link)


129

Rule Assembly Cache in SMA (Under Advanced Link)

SMA LINKS

130

AES: ATOMIC EVENT SERVICES


AES is an independent, self-contained system that gathers, monitors, and analyzes
performance and health indicators from multiple SmartBPM systems across the enterprise. AES
combines server-level and BPM-level enterprise monitoring in a single web-based tool.
AES can be quickly deployed on any SmartBPM enterprise configuration. The installation and
configuration package contains all the necessary files needed to set up the AES server and configure
the nodes for monitoring. The processes are straightforward and do not require deep technical
expertise.
The AES Enterprise Health console provides up-to-the-minute enterprise, cluster, and node level
monitoring. The console tracks these key statistics and events:

Number of active requestors

Number of agents running

Percentage of JVM memory being used

Last time of system pulse

Process CPU usage

Number of database connections

SQL exceptions

Average HTTP (browser or portal requestor) response time

Rule cache enabled

Alerts and exceptions the require immediate attention

131

WorkParties (Rule-Obj-WorkParties)
A work party is a person, organization, or other actor identified in a work object, who can be the
recipient of e-mail or other forms of correspondence.
A work object may identify no work parties, one, or many work parties. The work party role
associated with each work party identifies why a party is present, and may determine which properties
are defined for that party.
Five standard data classes derived from Data-Party are available for capturing information
about work parties:
Data-Party-Com For business organizations
Data-Party-Gov For government organizations
Data-Party-Operator For Process Commander users (who each have a Data-Admin-Operator ID
instance)
Data-Party-Org For nonprofit organizations
Data-Party-Person For people who may not be Process Commander users with Operator IDs
Your application can include other classes derived from Data-Party or from one of the above concrete
classes.
Create a Work Party as below.

Party Label : Enter a unique label that is to appear on the work object entry form to identify this party
role. For example, you can enter Lawyer or Design Manager.
Role: Enter a unique identifier for this role. This may be same as above party label.
Party Class : Any of the above Data-party classes.
132

Party Prompt: Optional. Enter a short description of the Data-Party class. This short description
appears at runtime, following the party label on the work object entry form.
Model: This is optional. This initializes the common Work-Party properties. (If this is not used, we may
have to give values to each
Properties appearing at WorkParty section in New Harness). Some of the properties are.
.pyCompany, .pyTitle, .pyFirstName, .pyLastName, .pyEmail1, .pyEmail2, .pyEmail1Type,
.pyEmail2Type, .pyHomePhone
.pyWorkPhone, .pyMobilePhone.

Attach a work party with the Flow/Work Object

Workparty Info at New/Perform Harness

CORRESPONDENCE
133

1) Correspondence is the Process Commander term for outgoing e-mail messages, printed Letters, or

facsimile transmissions produced by the system and its users. These are Typically associated with
one work object or a cover or folder and may consist of text, Images or both.
2) A correspondence rule is an instance of the Rule-Obj-Corr rule type.
3) Correspondence rules are part of the Process category

Correspondence Types
Four standard correspondence type rules are installed with your Process Commander system.
1) Fax : For outgoing letters to be sent by fax transmission through the Correspondence Output Server.
2) Mail : For outgoing postal letters (handled by the Correspondence Output Server) to be printed.

Stores the correspondence body as an instance of the Data-Corr-Letter class, and the address in the
Data-Address-Postal class.
3) PhoneText : For short outgoing text messages to be sent to a beeper (pager) or digital cell phones
that support the Short Message Service.
4) Email For outgoing e-mail messages, where the body of the message is stored in an instance of

the Data-Corr-Email class and the addresses are stored as instances of the Data-Address- Email
class.

Where referenced
Rules of three other rule types can reference correspondence rules:
1) Flow rules, using Notify tasks
2) Flow action rules, indirectly through activities identified on the Action tab
3) Activities

Steps for configuring correspondence generation in flows :


1) Configure an email account object (Data-EmailAccount) that holds information about the
email server, Incoming and Outgoing mail configuration and user account flow
processing should use to send outbound email.
2) Create a correspondence rule (Rule-obj-corr) and/or correspondence fragments.
3) Create the work parties rules that associate work party roles with your work classes.
4) Create Models. These Models are important to set the properties of workparty.
5) Create correspondence, correspondence fragment, and HTML stream rules.
6) Configure your flows to call the standard correspondence activities and flow actions at the
7) Appropriate places.

General Cofiguration Steps


134

Step1 : Configure an email account object (Data-EmailAccount).


Input values for Outgoing and Incoming Mail.

Provide values for SMTP/POP3 Server, Email Address, Pasword, SSL etc.
New -> sysAdmin -> Email Acount

Step 2: Create Correspondence rule.

135

We can create our own correspondence. For creating a correspondence, we can do it in two ways.
1) Create correspondence rule (Rule-Obj-Corr) directly.
2) Create a correspondence fragment (Rule-Corr-Fragment)

Correspondence rule (Rule-Obj-Corr)


A correspondence rule is an instance of the Rule-Obj-Corr rule type. Instances of this rule type define templates, such as
preconfigured form letters, that can draw on the values of properties in the database to produce specific letters or e-mail.

New -> Process -> Correspondence.

Note: We can include text, image, properties, sections, correspondence fragments, paragraph
rules etc.

136

Rules that can be included.


All these rules, properties and fragments etc generate a JSP (uses pega custom tags). We can see
that in
Source mode.
We can also use validation of properties used. We can give a validation rule (Rule-Obj-Validate) in
prompts tab.
Correspondence fragments (Rule-Corr-fragment)
Similar to above, we can create a Correspondence fragment and use it in the Correspondence rule.

Step 3: Create WorkParties Rule: As done above.

Step 3 : Create a Model for each Role :

137

1) Configuring flows that generate automatic notification messages:


When you want to configure your flow to automatically send notification messages about assignments,
connect a notify shape to the assignment. A notify shape identifies a notify activity.

Notify Activities
These standard Work- activities have an Activity Type of Notify. They can be used in the Notify task,
).
represented by the Notify shape (
1) Notify 2) Notify All 3) NotifyAssignee
6) Each Assignee.

4) NotifyAllAssignees

5) NotifyParty

Steps:
1) Drag the Notify flow shape from the shape panel onto your flow and connect it to the assignment.

2) In the Notify Properties pane in the left frame, enter a descriptive name for the task/shape.
3) In the Rule field, enter or select the name of a notify activity.
4) Provide values for the activity's input parameters. CorrName is always required because you have
to specify what to send.
5) Click Apply.
6) Save the flow.

Rule: Any of the above options. The description is given below.


Party Role: Provide the party role of the workparty.
CorrName:
138

Here we can provide the correspondence rule that we have created. To create a correspondence
rule:
New-> Process -> Correspondence. Write the email.

7) Create a work object to test your configuration. When the work object reaches the assignment
with the notify shape, click the attachments icon. In the History/Attachments window, expand the
Attachments section and verify that the notify message was generated:

139

Flow With Notify Activity (Single Party same as notifyParty)

Notify : Send an E-mail message as Correspondence to a Party identified through a Parameter.

Flow With NotifyAll Activity (All the Workparties identified in the work object)
Notify All : Send a Single e-mail message to each Work Party identified in the Work Object.

140

Flow With NotifyAssignee Activity


NotifyAssignee : Send an e-mail message to the Process Commander user who received the
assignment. If the assignment is in a workbasket rather than a worklist, an e-mail message goes to
the first operator listed in the Contacts array of the Workbasket tab.

1) Create Operator Ids


2) Create a WorkBasket

141

Flow With NotifyAllAssigneesActivity


NotifyAllAssignees : Send an e-mail message to the Process Commander user who received
the
assignment. If the assignment is in a workbasket rather than a worklist, an e-mail message is sent

to each operator listed in the Contacts array.


1) Create Operator Id
2) Create WorkBasket

142

Flow With NotifyPartyActivity


NotifyParty : Send an e-mail message as correspondence to a party identified through a parameter,
but only send when a threshold urgency level is reached or exceeded.

Flow With EachAssignee Activity

143

Configuring flows that automatically generate correspondence (Utility Task)


Steps
1) Drag the Utility shape onto your flow in the appropriate place and ensure that it is connected.
2) In the Utility Properties panel in the left frame, enter a descriptive name for the task/shape.
3) In the Rule field, select or enter CorrNew.
4) Click Apply. Fields for the CorrNew activity's input parameters of appear in the Properties panel.
5) Enter values for CorrName and PartyRole (required).
6)

Click Apply.

7)

Save the flow.

8)

Create a work object to test your configuration.

144

Configuring Flows (Flow action rules, indirectly through activities identified on


the Action tab)

145

Sending Correspondence Using Send Correspondence Flow

146

Configuring flows so users can add work parties to work objects


Steps:
1) In the Flow ,Select the Assignment and in the Assignment Properties pane in the
LocalActions Section, Select AddParty.
2 ) Click Apply and Save the flow.
3)

Create a work object to test your configuration. When the work object reaches the assignment

with the AddParty flow action, select the action and ensure that you can add a party.

Creation of work object to test our configuration.

147

148

Integration with SOAP


Most systems applications require access to data or computations that are provided by another
system, or need to respond to requests from other systems for data or computations.
For E.g: Our Application may require the latest currency exchange rates, hence we need to connect
to some of the external systems providing these values.
The external system exposes certain services to the outside world that can be used by the connector
application, to get the data.
E.g: The MakeMyTrip.com connects to several external systems (Like Air-India System, Jet Airways
Systems, Indigo etc) to fetch Airline data. It sends parameter like No. of seats required, Date of travel,
Source and destination Airport etc. And receives the values from them like, seats available, price,
time of flight etc.
The Airline Systems here are external systems which act as Server as they expose a service.
MakeMyTrip.com uses connectors to connect and receive the service.
Since, Service and connectors can be running in different Operating system, written in different
language etc, hence we need a universal language to interact between the two. The common
language is xml (developed by Microsoft). The data transfer occurs between them in form of xml.

Connector capabilities, which allow your application (in the role of client), to request data or
services from another system (in the role of server)

Service capabilities, which allow your application (as a server) to respond to requests it
receives from another system (a client).

SOAP: Simple Object Access Protocol


It is a protocol that is used for the exchange of information in a decentralized, distributed environment.
SOAP is an XML-based protocol with three components:

An envelope for describing what is in a message and how to process it

Encoding rules for expressing instances of application-defined data types

A convention for remote procedure calls and responses

Services implemented using SOAP are often called Web services. The SOAP standard is maintained
by the World Wide Web Consortium (W3C) at www.w3c.org.
The web-services provides a WSDL file to connector systems which facilitates the data transfer
between the web-services and connector systems.
WSDL (Web Services Description Language) is an XML format defined by the World Wide Web
Consortium (W3C). Each WSDL file describes network services as a set of endpoints operating on
messages containing either document-oriented or procedure-oriented information.
A WSDL file describes a SOAP service. It includes XML schema information that describes the input
parameter values that need to be sent in a SOAP request message, and the output parameter values
that can be extracted from a SOAP response message.
It also specifies the delivery method (usually HTTP) and the URL of the Process Commander servlet
that processes the SOAP requests. Software tools are available that generate WSDL files from other
representations of the service.
149

Creating Service Package, Service, Connectors in PRPC


1)

Service Package: A service package is a name that groups one or more service rules that are
designed to be developed, tested, and deployed together. For some service rule types, this
corresponds to a package of Java classes. Use a Service Package data instance to define a
package name, define access for listeners, and support deployment of services.

To define a service package, create an instance of the Data-Admin-ServicePackage class. Then use
this name as the first key part of the service rules.

New -> Integration-Resource -> Service Package.

Service Access Group: Provide the access group.

Service Type: Give Rule-Service-SOAP.


The Service Methods described in the screen-shot, will not appear now, as we have not created
services and methods. Hence do not click on the button Show Service Methods now.

150

Deployment Type: WSDL.


Similarly, here, we have not created Service Class yet. Hence leave this blank. Dont Click on
Generate Deployment Files.

2) Service SOAP
A SOAP service provides service method for an external application to use. Each method in the
service package corresponds to a SOAP service rule that identifies an activity to run and maps the
incoming and outgoing data.
To call a Process Commander SOAP service, an external application collects data values, wraps
them in an XML document envelope (SOAP envelope) that contains the name of the requested
service, and posts the envelope to the URL of the Process Commander PRSOAPServlet servlet. The
PRSOAPServlet servlet routes the request to the appropriate SOAP service package and rule.
New -> Integration-Service -> Service SOAP.

Customer Package Name: Provide the value of previously created Service Package name
Customer Class Name: Provide a Unique Service Class Name.
Customer Method Name: Provide a unique Service Method name.
151

Page Class: The concrete class where my Service Activity will be present.
Page Model: Model to initialize the properties of the class in the page created.
Page Name: top-level clipboard page that Process Commander uses as the primary page by the
activity being called through the SOAP service. The activity property values may be written to or read
from this page.
Service Activity Name: Name of the Activity that the service will call to perform operation and return
data to connectors. This is the main activity in Server, which does the actual processing. This activity
is called by the Service system on request by the connector. It returns the data by output parameters
to the connector.

Execution
Mode

End requestor
when done?

Select one of the following options:

Execute synchronously select this when you want the service to run the request immediately.

Execute asynchronously select this when you want the service to queue the request, return it after some time.

Select to have the system end this requestor session when the activity completes.
This check box affects only stateful processing. This check box is ignored when the Processing Mode on the service
package data instance is set to Stateless.

152

My service receives one input parameter (EmpID). It serches the database and returns 2 output
parameter to the connector (Name and Salary for EmpID) system.
Mentione Request Parameter here.

Similarly we mention the response parameters here.


Save the rule.
It creates the following service rule inside the Service Soap Section of class group.

153

3) Update Service Package. Create WSDL

Now again go to Service Package that we had created before. Click on the button Show Service
Methods. Itll register the Service class and methods. The message will come as in figure.
Now go to Deployment tab

Click on button Generate Deployment Files


Itll generate WSDL file (.xml) to be used by the connector system to connect the service. We can
download the WSDL file and copy it in the local folder of connector system, or use the above URL
to locate it.
http://localhost:8888/prweb/PRServlet?pyActivity=Data-AdminServicePackage.ServeWSDL&pzAuth=guest&wsdlPath=SOAP/EmpDetailsPKG/EmpDetailsClass
.wsdl

4) Connector (Connect SOAP)


Use SOAP connector rules when your Process Commander applications need to call an external
Web service.
Well use the 5.2 connect wizard to create the connector.
Note: The connector and services normally are in diferent systems. But we are creating this in same
system. We can perform the same steps in different systems also.

IN PRPC 5.5 open the wizard by Tools -> Integration -> 5.2 connect wizard

154

Source DataType: Web Service (SOAP)


Base Class: Provide an abstract class here. The connector class with properties will be created as a
child class of this.
Connector Activity Class : The concrete class which will contain the connector Activity.
Press NEXT.

Provide the WSDL URL:


E.g :-

C:\PRPC\EmpDetailsWSDL.xml (if saved locally)

If not saved use the generated URL path.


http://localhost:8888/prweb/PRServlet?pyActivity=Data-AdminServicePackage.ServeWSDL&pzAuth=guest&wsdlPath=SOAP/EmpDetailsPKG/EmpDetailsClass.wsd
l

Now one by one itll ask for Service Class, Port and Method. Select them.

155

Click NEXT.

The following Class structure is created in my application.


I had provided
Base Class: DLF-REALSTATE-MATERIALS- (Abstract class)
Hence it created Another connector class (abstract) DLF-REALSTATE-MATERIALSEmpDetailsClassService-

156

Click on The Connect SOAP Method EmpDetailsMethod. Its completed by the wizard
automatically.

157

The wizard also creates a Connector Activity with the same name as of the method in the class
we mentioned in the wizard.
Normally, this Activity is created with availability = No. So itll not open. Just right click on it
and do a save-as with availability = Yes.

158

Open this Connector Activity.

Parameter Tab.

Pages and Classes Tab.

This Activity just creates a new page (for the connector class). Connects the input parameter
and output parameter with the properties of the connector class.
159

This Activity accepts one Input parameter (EmpID) and calls the Service Activity in the Server,
sending the I/P parameter.

Service Activity
The Activity in the server (mentioned in previous pages) takes EmpID as input and it does a
Obj-Browse in the data-table to find a matching record. If record found, it returns the name and
salary as output parameter to the connector Activity.

Pages and Classes tab.

Test Connector Activity


Open the connector Activity and Click on the Button.

160

. Give the EmpID I/P Parameter.

Output

Explaining the Concepts

161

Points to be Noted
The Connector Activity calls Service Method and sends I/P parameter. It receives the O/P
parameters, which is set in its class properties. (EmpDetails_Name, EmpDetails_Salary).
The Service Class receives I/P parameter, which sets in its class properties.

After the

processing work, it sets the values in its own Class properties (Name and Salary) which are
mapped with O/P Params.
Hence we can say that the connector properties and service properties are connected via
parameters.

Calling the connector Activity in Flow.

Rule:

The name of connector Activity.


162

EmpDetails_EmpID - This is parameter that we need to provide. We provide the value of property
here i.e
.EmpDetailsMethod_EmpID. (We set the value of this property in the above Flow Action FA1).

1) Tracer
Use the Tracer tool to debug flows, activities, services, parse rules, and declarative rules.
The Tracer tool provides full debugging facilities, including step-by-step execution, breakpoints, and
watch variables.
You can pause and resume processing, view or set the value of watch variables, and drill down to
step-by-step details. You can view trace events for any requestor connected to your server node, not
just your own session.

Setup

Use these controls to set up trace conditions. Click Play ( ) to start the Tracer, or Pause (
on your access role, some Tracer capabilities may not be available to you.

Button

Connection

Function

) to stop tracing. Depending

Help

Choose a requestor session other than your own. Wait a


Selecting a connection
few seconds until the Tracer connects.

Select which RuleSets, rules, and events are to be traced. Setting Tracer options
Options
Setting breakpoints

Set or change breakpoints.

163

Breakpoints
Setting watch variables

Set or change watch variables


Watch
Save Tracer output on the workstation as an Excel CSV
or XML file.

Save

After clicking Play ( ), select to reduce the amount of


clipboard detail retained for each Tracer row.

Abbreviate Events?

Tips and notes

Operations
After selecting the connection and setting other options:
1.

Minimize the Tracer window.

2.

Perform the work that you want to trace (or wait for it to be performed, when tracing a requestor session other than
your own session).

3.

Restore the Tracer window to review its results.

4. As the target session runs, the Tracer display lists the events of each type that you selected in the Trace Options
dialog box.
At any time tracing is paused, you can change any options using the buttons in the above table. After tracing begins, you
can use these buttons:

Button

Function
Erase the displayed events.

Clear
Pause the session being traced at the next possible moment.
Pause
Resume processing after a Pause button click, or after a breakpoint event. Appears only after a pause.
Continue
Save the Tracer results in the current window into a text file in Comma-Separated-Values format or as a
more detailed XML file, depending on prconfig.xml settings. See Tracer Adjusting the buffer size.
Save

You can open and print the saved CSV file with Microsoft Excel. (This operation is available only on user
workstations that have installed the PegaClientSupport ActiveX control.)

2) Rules-Inspector
Rules inspector is a tool used to identify few things inside UI. E.g : 1) HTML Rules:- Harness, Sections, Flow Actions.
2) Property Rules:
3) Declarative Rules:
4) Field Value Rules:
5) Style Rules.
It can be started as Run -> Rules Inspector. (Now check the above things which we need to identify).
164

3) Preflight
The Application Preflight tool reports the results of several checks on the rules in the currently selected application. These
checks encourage good design and implementation practice, as codified in the guardrails and elsewhere.
A rule in your application may work correctly and save without errors, but still be marked with a warning (
Application Preflight tool summarizes these warnings.

). The

For example, a decision table rule may contain two rows that conflict give a different result for the same inputs. You can
save the decision table rule and execute it within your application, because the uppermost row of the table is used at
runtime, and other conflicting rows are ignored. However, the conflict may indicate that the rule was not entered correctly.
You can perform the preflight check at any time during development. As a best practice, use the Application Preflight tool before
you lock a RuleSet version. Research each warning message.

Warnings are instances of the Index-Warning class, which corresponds to the pr_index_warnings database table.

Application -> Preflight

Download High Priorities Warnings


Performance and DataIntegrity warning types are considered to be high priority. They can degrade system reliability
by slowing performance (for instance, a list view that retrieves embedded properties) or by violating data integrity (for
example, an activity that uses the Commit method incorrectly). Eliminating high priority warning conditions before putting the
rules into production is strongly recommended.

165

The Download High Priority Warnings option enables you to:

Create and download Excel spreadsheets containing all high priority warnings in the RuleSets comprising your
current access group. Links within the spreadsheet enable you to open a PDN article relevant to each warning, and
to open the rule form containing the warning.

Warnings by Rule Type chart

This bar chart appears when you choose Application > Preflight. It displays the number of rule instances with
warnings for each rule type for all available RuleSets in your application. You can change the rule type range in the
display using the slider widget at the top of the chart.

Performance Warnings by Rule Type

Displays a bar chart and summary report of rule instances that have performance-type warnings. The summary
report and Criteria functionality are the same as described above for the All Warnings by Rule Type report.

Pie Chart of Warnings by Severity

Displays a pie chart and summary report of total warnings by severity level (four levels). Level one signifies a
warning that is most likely to compromise expected processing behavior.

Browser Compatibility Report

Work object forms and reports that are part of a Pega Composite application can be designed to operate with
Firefox 2.0+ browsers as well as Internet Explorer.

This option displays a chart that assesses the user interface rules in your application for compatibility across these
browser types. This report checks the value set in the Browser Support field (on the HTML tab) of all the harness,
flow action, section, HTML, HTML property, and HTML fragment rules in your application.

4) Performance tool (PAL)


Use the Performance tool to understand the system resources consumed by processing of a single requestor session, or the
SQL statements sent to the PegaRULES database by the requestor session.
Process Commander always accumulates cumulative resource statistics for the Performance tool. Use the tool to display
these statistics, and to identify incremental resources (in the delta rows) consumed by your processing. Because this feature
displays existing data, its use does not degrade processing.
The Performance tool is sometimes known as PAL. Run > Performance

Monitoring SQL operations with DB Trace


You can monitor the interactions between Process Commander's server engine and the PegaRULES database or other
relational databases, and the operation of the rule cache. Familiarity with SQL is required to interpret the output. To use this
facility:
1.

Open the Full details window.

2. Click the DB Trace Options link to set up which database events are monitored. See Setting DB Trace options.
166

3. Click the Start DB Trace link to turn on the facility and record SQL statements that Process Commander sends to the
database software.

4. Click Stop DB Trace to end data collection and access the trace results as a text file or with Microsoft Excel. See
Interpreting DB Trace Results.
Unlike the resource statistics feature, the DB Trace feature is normally off. Use the DB Trace feature only for a brief
interval. When enabled, DB Trace processing can produce voluminous output and may adversely affect session
performance.
The DB Trace tool link is not displayed in a production system a system with the Production Level on the System form
set to 5. In addition, the DB Trace is available only to users who have the PegaRULES:SysAdm4 access role. These access
roles provide access to the standard privilege named Code-Pega-.PerformanceTools.
You can start and stop this tool from an activity, by calling the standard activity Code-PegaRequestor.SetRequestorLevelDBTrace to turn the DB Trace tool on and off. This activity sets the
pxRequestor.pyDBTraceEnabled property; the tool closes the output text file when tracing is turned off.

System-wide database trace


An alternative approach that provides comprehensive tracing of SQL statements sent to the PegaRULES database is the
dumpStats parameter in the prconfig.xml file.
To enable this feature:
1. Update the <database> node of the prconfig.xml file to add this element:
<entry key="dumpStats" value="true" />
2. Stop and restart the application server.
This setting generates a system-wide database trace file in the ServiceExport directory that can become very large
quickly, and can affect system performance. Use this setting only for brief periods, and when a single-requestor DB trace is
not suitable.

DB Trace Dialog.

167