Professional Documents
Culture Documents
Benefits of BPM
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.
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.
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.
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
Moving applications sets of rules from one Process Commander system to another.
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)
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.
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
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
DATA-
CITI-
(Org)
- Name
Work-
- AcNo
CITI- DATA-
CITI - Finance-
(Divisn)
CITI-DATA- Items
CITI - Finance-Cards -
(Unit)
Work-Object-
Properties
- TransactionID
---
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
Default -> Default SLA in WorkObject. It defines 2 days and 5 days as goal and deadline time. No
escalation Activity.
Inheritance in Pega
Class Inheritance.
Ruleset inheritance
RuleSet Version Inheritance.
2) Harness
Select class explorer. From it select Work-. Click on Work-, and then select Harness. Click New
(in the grid)
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-
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
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.
13
tick it.
Harness :
14
15
16
8) Creating expressions
17
3) Section: in the properties of each of the calculated columns. Do -> Display as: Calculated Value.
18
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.
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
20
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
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.
Name as Purchase,
Implementation class as worktype
Work ID Prefix as p-
10)
Here we have a check-box -> isShipping Details. If we click on check-box, a new section will
come to collect the address.
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:
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-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.
-
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.
-
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.
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-.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.
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
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
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.
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.
HTML Tab
It can refer a HTML Fragment (Rule-Obj-HTML), a section or can define its own form.
34
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
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.)
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:
PrintReview:
36
Controls.
Row
Repeat
Column Repeat
Layout
Accordian
Tabbed
Repeat
SECTIONS.
Basic
Advanced
AutoComplete
Dynamic Selct
Charts
Paragraph
List View
HTML Tabs
37
Click on the magnifier of the Section. Make it Visible When (can refer a when condition).
Note: The Section and Property will be visibility/Invisibility will be triggered by some event.
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.
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.
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.
-
Validation in Pega.
1) Using Validate Rules (Rule-Obj-Validate)
Create a validate rule. Go under process Validate.
39
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).
40
2) Using Rule-Edit-Validate
implemented at screen level (at Flow-action action tab) or called by Activity (Obj-Validate and
Page-Validate methods).
41
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.
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
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.
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.
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.
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: 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.
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:
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
Decision Trees:
We may provide the input values (property to evaluate) at input tab.
52
Map
We need to provide the Input values for Row and Columns, Then can provide a matrix structure
between 2 values.
53
Connector Properties
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)
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:
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.
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.
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
56
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.
58
So, when condition is true, it Suspends Work Object and Calls another Flow : Screen Flow.
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
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.
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
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
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.
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.
Property Name: Enter the property that would appear in where clause. We can give multiple
properties too.
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:
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
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:
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.
List page: The page (code-pega-list) used above in Obj-browse to hold the result set as embedded
page.
67
Parameters
Specify all three key parts of a list view rule.
Parameter
ObjClass
Description
The Data table class
ListView
Owner
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
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.
20) Obj-Delete-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).
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
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.
27) Property-Set-Special :
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
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.
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
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.
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}
{call procedure({resultset})}
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})
}
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:
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.
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:
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
79
Similar to above, Param.pyForEachCount holds the index of current iteration. The same concept as
above.
Now in the activity, initialize this variable to 1. Use this variable as index, and in each sub-step,
increment it manually.
80
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
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
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).
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¶m=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.
90
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.
91
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.
-
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.
94
95
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
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.
98
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.
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
"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:
drill down into reports that summarize data and see the actual data that lies behind the
summary
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.
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
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.
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.
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.
Index Name
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.
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.
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
109
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
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.
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.
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.
Parameters Tab
112
Used to describe parameters. Input parameters can be used to receive values at run time.
Pages
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
Prefix
Index Name
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
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
119
1) Create a SLA.
New -> Process -> Service Level
120
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.
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
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:
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.
This method stores a request for processing as a persistent object (entry) in the system queue. The method specifies:
How long the entry is to remain in the queue before the agent can try to process it the first time.
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.
Capabilities
Using the System Management application, you can:
Review the memory used by the Java Virtual Machine on the server.
Access any requestor and view the clipboard, start the Tracer, examine performance statistics,
and terminate requestor processing.
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.
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.)
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.
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.
SMA LINKS
130
SQL exceptions
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.
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
Provide values for SMTP/POP3 Server, Email Address, Pasword, SSL etc.
New -> sysAdmin -> Email Acount
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)
Note: We can include text, image, properties, sections, correspondence fragments, paragraph
rules etc.
136
137
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.
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 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
141
142
143
Click Apply.
7)
8)
144
145
146
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.
147
148
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).
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
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.
150
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?
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.
153
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
IN PRPC 5.5 open the wizard by Tools -> Integration -> 5.2 connect wizard
154
Now one by one itll ask for Service Class, Port and Method. Select them.
155
Click NEXT.
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
Parameter 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.
160
Output
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.
Rule:
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
Help
Select which RuleSets, rules, and events are to be traced. Setting Tracer options
Options
Setting breakpoints
163
Breakpoints
Setting watch variables
Save
Abbreviate Events?
Operations
After selecting the connection and setting other options:
1.
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.
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.
165
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.
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.
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.
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.
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.
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.
DB Trace Dialog.
167