You are on page 1of 224

Certification Material

Table of Contents
1. Introduction to BPM & BRE ................................................................................ 3
2. General PRPC Architecture .............................................................................. 12
3. Class Structures & Hierarchy Design............................................................ 31
4. Data Modeling...................................................................................................... 44
5. Process Flow ........................................................................................................ 50
6. Case Management ............................................................................................... 67
7. Activities .............................................................................................................. 73
8. User Interface ................................................................................................... 92
9. Decision Rules & Declarative Rules .............................................................. 115
10. Rule Management/Security .......................................................................... 126
11. Integration ....................................................................................................... 150
12. Implementation and Performance Tools ................................................... 179
13. Reporting .......................................................................................................... 191
14. Application Deployment ................................................................................ 203

1. Introduction to BPM & BRE

Business Process Management:


A business process is a set of coordinated tasks and activities, conducted by both
people and equipment that will lead to accomplishing a specific organizational goal.
Automation of business processes, in whole or in part, where documents, information,
or tasks are passed from one participant to another for action, according to a set of
rules.
A business process is a logically related set of workflows, work steps, and tasks that
provide a product or service to customers. BPM is a mix of process
management/workflow with application integration technology.
Business Process Management is a structured approach that models an enterprises,
human and machine tasks and the interactions between them as processes. BPM
software provides users with a dashboard interface that offers a high-level view of the
operation that typically crosses departmental boundaries. The dashboard integrates
with all the applications that perform processes as well as related databases. It can be
used to trigger the start of a unit of work, and it provides a single interface to the end
user.
Advantages:
C Solution tailored to closely meet needs of business
C Easy to build, easy to change
C Ability to capture of objectives directly in system
C Automates the programming and the work!
C Ease of integration
C Leverage BPM vendor's significant development investment
Disadvantages:
D May encounter cultural resistance as BPM fundamentally changes the way
Business Users and IT work together.

Business Rules Engine:


Business rules represent policies, procedures and constraints regarding how an
enterprise conducts its business.
Organizations have policies in order to satisfy the business objectives, satisfy
customers, make good use of resources, and conform to laws or general business
conventions

Business rules become requirements, that is, they may be implemented in a software
system. BREs can be used alone or in conjunction with other technologies, like
Business Process Management (BPM).
A business rules engine is a software system that executes one or more business
rules in a runtime production environment.
BRE is the software that automates policies and procedures within an organization,
whether legal, internal or operational. The use of a rules engine (BRE) requires
placing the company rules in an external repository that can be easily reviewed rather
than buried inside the code of numerous applications. Instead of a program executing
internal algorithms, it goes out to the BRE to obtain its business logic.
A BRE enables software changes to be implemented much faster than changing
source code. It can also ensure that the same rules are applied in all programs on all
platforms across departmental lines. In addition, it supports platform changes. New
software can be deployed knowing that the same business logic is going to be
executed in the new programs.
This means that the rules engine is capable of getting data through services, process
the data with some business logic, and return results through services. It can also
interact with other backend systems to get more information, validate data etc, but
through services.
Advantages of Business Rules Engine:
C Quick development
C Easy Rule move from one environment to another environment
C Business Users can update the rule directly without IT help (Up to some level)
C Lot of in build functionality. No need to write thousands lines of code (For
Example Parsing XML, Generating XML, Connecting external system.)

BPM vs. BRE


BPM tools are made for process automation, workflow and routing.
BRE's are made for decision management, can use inferencing, and are context
sensitive.
A BPM application can be a type of B2C.
A BRE application can be a type of B2B.

SmartBPM
The latest generation of PegaSystems' industry-leading, rules-driven Business Process
Management (BPM) is a comprehensive suite intended to help businesses plan, build,
and manage process-management solutions through their entire lifecycle.

SmartBPM is a process that blends your process and practice rules and helps you
rapidly deploy and update solutions in response to changing circumstances.
SmartBPM Suite contains the below Components
1.

2.
3.

4.

5.
6.

7.

PegaRULES Process Commander At the core of the SmartBPM Suite is


PegaRULES Process Commander, Built on top of the PegaRULES enterprise
rules engine, and employs a sophisticated common object model to deliver the
power of process and practice integration, without the expense and resources
associated with maintaining separate business process and rules databases, user
interfaces, test environments, and production environments.
Process Analyzer Uses a data warehouse of both historical work and
simulated data, with on-line analytic tools to continuously improve processes.
Process Simulator New business processes are simulated before they go live.
Using "wizards," analysts can quantify and compare potential for increased
service levels, as well as reductions in time, error, and cost.
Enterprise Integration PegaSystems' SmartBPM is built from the inside out
with a services-oriented architecture (SOA). It offers an extensive library of
enterprise connectors and adapters, including support for industry standards such
as BPEL.
Case Management A smart case-management application is included as part
of the SmartBPM Suite, and can be put to work immediately.
Content Management Integration The SmartBPM Suite can also integrate
multiple image repositories and document- and content-management systems to
manage global policies and processes for record retrieval and retention.
Portal Integration Businesses turn to web-portal technology to enable
collaboration with their trading partners and to open up self-service to their
customers.

What is SmartBPM Six Rs?


With PegaRULES Process Commander, Pegasystems provides the traditional BPM
capabilities receiving, routing, and reporting on work across the enterprise,
accomplishing these tasks automatically based on intent-driven rules and processes &
completes work by researching, responding, and resolving, thereby eliminating most
manual processing for completing work.
1. Receiving and controlling work regardless of the source or channel
2. Routing work based on worker skills and workload, and SLA-based priorities
3. Reporting and simulation based on historical, not just models
4. Researching by rules-driven data and image gathering
5. Responding automatically via multiple communication channels
6. Resolving by automating critical business decisions

SmartBPM Six Rs Drive Work to Completion

What is meant by Build for Change?


Build for Change Rapid development of solutions that support fast and safe realtime changes
Built-in versioning makes interactive change and selected pilots easy and safe to
manage.
Solution Accelerator auto-generates solutions links to PegaSystems Process
Simulator for what-if testing
Web-based tools provided for trace, debug rules and performance management
Graphical decision trees with natural language expression
Push-button documentation for project tracking and compliance requirements
Portal interface for architects, developers, and business analysts
Integrated Microsoft Visio for process and rule creation, as well as Visio flow
import
Extensive array of fit-for-purpose forms to speed implementation and allow
business-user change
What is meant by SmartBuild?
SmartBuild Smart Design for Smart Systems
SmartBuild is the sequence of 14 steps for developing business process management
(BPM) and Business rule engine (BRE) solutions with Process Commander. Each

step describes how to design and build specific components. You perform these steps
and the associated tasks iteratively to deliver a fully functional solution. In short,
SmartBuild is the design and development process for Process Commander Solutions.

PegaRules Process Commander (PRPC) Basics


PRPC is a combination of BPM ( Business Process Management) and BRE (Business
Rules Engine )
Most Business Process Management (BPM) solutions provide workflow capabilities
receiving, routing, and reporting on work across the organization.
Process Commander accomplishes these tasks automatically and goes beyond
traditional workflow management to complete work researching, resolving, and
responding eliminating most manual processing for completing work.
Process Commander is the only BPM solution that automates both the business
decisions and the business processes that drive work to completion.
Process Commander is shipped with 56 standard rulesets viz,
1.
2.
3.
4.
5.

Pega-ProCom Supports business Process Management


Pega-InvSvcs Supports integration services
Pega-WB Supports portal infrastructure
Pega-Rules Supports rules engine and rule resolution
Pega-AppDefinition - supports the Direct Capture of Objectives features.

Services are interfaces from other systems to PRPC. Standard services that come in
with PRPC are
1. Rule-Service-COM
2. Rule-Service-CORBA
3. Rule-Service-BPEL
4. Rule-Service-File
5. Rule-Service-HTTP
6. Rule-Service-Portlet
7. Rule-Service-DOTNET
8. Rule-Service-EJB
9. Rule-Service-Email
10. Rule-Service-JMS
11. Rule-Service-JSR94
12. Rule-Service-MQ
Connectors are interfaces from PRPC to other systems. Standard connectors that
come in with PRPC are
1. Rule-Connect-EJB
2. Rule-Connect-BPEL
3. Rule-Connect-File
4. Rule-Connect-HTTP
5. Rule-Connect-JCA

6. Rule-Connect-DOTNET
7. Rule-Connect-SQL
8. Rule-Connect-Java
9. Rule-Connect-JMS
10. Rule-Connect-SOAP
11. Rule-Connect-MQ

Process Commander supports a three-level organizational hierarchy consisting of


organizations at the top level, divisions at a second level, and units as a third level.
An organization is an instance of the Data-Admin-Organization class. An
organization is the top level of the three-level organizational hierarchy available to all
of your applications.
A division is an instance of the Data-Admin-OrgDivision class and is the middle
level of the three-level organizational hierarchy available in all applications.
Divisions are below the organization level (Data-Admin-Organization class) and
above the organization unit level (Data-Admin-OrgUnit class).
An organization unit is an instance of the Data-Admin-OrgUnit class. An
organization unit is the bottom level of a standard three-level organizational hierarchy
available in every Process Commander application.
Operators are created through instances of Data-Admin-Operator-ID class.
An operator ID can belong to only one primary access group. Important entries
while creating the operators are
1. Organization ( Mandatory)
2. Division ( Mandatory )
3. Unit ( Mandatory )
4. Workgroup ( Mandatory )
5. Access Group ( Mandatory )
6. Allow Rule Check Out ( Check box ) ( Optional )
Work group is an instance of the Data-Admin-WorkGroup class. A work group can
identify a user who is a supervisor, together with a set of workers and workbaskets
that report to that supervisor.
Access group is an instance of the Data-Admin-Operator-AccessGroup class. Access
groups make a set of RuleSet versions available to requestors.
Access role is an instance of the Rule-Access-Role-Name class.Use an access role
name to convey permissions (capabilities) to a user or a group of users. Access roles
can be referenced in requestor instances, Operator ID instances, in access group
instances, in activities, and in queries.

Standard access roles (with names starting with PegaRULES:) define capabilities for
below PRPC model users
a. Business Users
1. Business User : End user of the application
2. Business Manager : Who monitors the performance of users or user
groups
b. Developers and Implementers
1. Process Architect: A business analyst who defines and maintains
business rules, service levels, and flows
2. System Architect: An application developer who creates class structure
for the application and who builds the interfaces with external systems
3. System Administrator: System engineer who is responsible for
installation and setup, security, and high level configurations
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. Together with the RuleSet
version, a RuleSet name is a major aspect in:
Access control
Managing the rules
Moving applications sets of rules from one Process Commander
System to another.
RuleSet version is an instance of the Rule-RuleSet-Version rule type. The version
number in the form NN-NN-NN, defines six digits in three groups that characterize
the evolution and development of a rule instance, and of the application it belongs
with. The three segments are known as the major version, minor version, and patch
version.
RuleSet Format
LoanAppl 01-02-03
01- Version
02 Minor release within the version
03 Interim or patch release within minor release
Rule resolution is the sophisticated internal search algorithm that the system uses
to find the best or most appropriate rule instance to apply in a situation. Rule
resolution applies to most, but not all, classes derived from the Rule- base class.
Rule resolution uses as input values:
The name of the rule needed

10

Starting location in the class hierarchy


RuleSet list
Current date-time, which may cause time based rules to take precedence.
Circumstance property and value
The value of the as-of date property
When to use directed inheritance and pattern inheritance.

Ten Guardrails for a Successful PRPC Solution


1. Adopt an Iterative Project Approach
2. Establish a Robust Foundation
3. Do Nothing That Is Hard
4. Limit Custom JAVA
5. Build for Change
6. Design Intent-Driven Processes
7. Create Easy-to-Read Flows
8. Monitor Performance Regularly
9. Calculate and Edit Declaratively, Not Procedurally
10. Keep Security Object-Oriented, Too

Questions:
1. Typically, the process architect maintains which of the following rules:
a. Decision tables
b. Decision trees
c. Access roles
d. Access privileges
e. Correspondence
f. Expressions
2. Typically, the system architect maintains which of the following rules:
a. Properties
b. User interface rules
c. Services
d. RuleSets
e. Indexes
3. Typically, the system administrator maintains which of the following rules:
a. Flows
b. Portal access
c. User IDs
d. Activities

11

2. General PRPC Architecture

12

PRPC and JEE architecture

PegaRULES has a flexible, open architecture. It allows you to execute the rules
engine in a variety of configurations and platforms. In addition, PegaRULES nodes
can run concurrently on heterogeneous platforms. This capability provides flexibility
to system administrators in configuring and deploying user accounts or execution
models against a shared PegaRULES database.

The flexible architecture of PegaRULES Process Commander supports several


patterns that can be deployed with variations to fit the specific platform requirements
of an enterprise business rules application and technology environment.

PegaRULES Process Commander Internal Architecture


As illustrated, the PegaRULES engine consists of a run-time environment, including
the forward and backward chaining inference engine. The engine maintains the rules
and executes Pegasystems patented rule resolution algorithm. The environment also
includes the clipboard containing XML objects that represent the work data for
various users or requestors. The run-time environment also provides other essential
capabilities such as performance monitoring, security management, context
management, Java caching, and database access.

13

PegaRULES runs as a collection of loosely coupled nodes that bring the execution of
processes and rules in proximity to the requesting user or system. PegaRULES can
support various architectural designs. The patterns shown in the following sections
are examples of fundamental implementations.
Basic Multitier Pattern with Servlets
PegaRULES runs as servlets within the Web container of a J2EE application server
(or a servlet container, such as Apache Tomcat). The rules engine runs self-contained
within the Java Virtual Machine (JVM).

Multitier Java Architecture Portable and Powerful


A number of servlets are associated with PegaRULES including the PRServlet (the
standard servlet) as well as servlets for system monitoring, rule tracing, and external
services. PegaRULES servlets run within the Web container of a J2EE application

14

server (or a servlet container, such as Apache Tomcat). PegaRULES also supports
server tier architectures and EJBs.
Process Commander is designed to run as a Web application, built in a Service
Oriented Architecture (SOA) to support a Web services environment, such as
SOAP and other industry-standard transports. While these architecture patterns are
well served by the J2EE framework, two other primary integration methods batch
and embedded are not. For certain high-performance applications, embedded or
batch processing provides a better alternative. For this reason, Process Commander is
built to run within the J2EE environment without inheriting its limitations.
In the multi-tier architecture, Process Commander sends HTML to the browser for
both business user and developer/administrator functions. HTML screens are
managed using specialized HTML rules within the rules engine.
Embedded Java Application Pattern
PegaRULES supports the JSR 94 standard rules application interface (API). The rules
engine can be invoked through the Java API and can execute within a rules engine
application on the same Java virtual machine (JVM). With this pattern, client
applications can embed the rules engine in the overall Java code of their applications.

Embedded PegaRULES Engine

15

Batch Processing Pattern


The embedded Java application pattern can be used in processing large volumes of
business rule transactions through batch scripts. PegaRULES uses file listeners to
support batch processing. With file listeners, a batch job (or any other application) can
write files to a prescribed folder. The PegaRULES listener can then pick up and
execute these files in high volume.

PegaRULES Engine in Batch Processing


The robust PegaRULES engine also supports other architecture patterns. However,
the patterns described in the previous sections provide the flexibility that system
administrators and application developers need in deploying enterprise applications.

WAR and EAR Deployments


Overview of the Installation Procedure
The following outline details the steps in the 5.1 installation process:
1. Prepare the Database server
Create a database with a PRPC user and password
Install the PRPC schema appropriate for your database vendor
2. Prepare the application server
Configure the server environment
Verify the Java environment

16

Create and verify the database connection


Create a DataSource with the JNDI name of jdbc/PegaRules.
Verify the PRPC Temporary directory
3. Deploy the PRPC components.

3. Install the Process Commander Rulesets


Start the Process Commander Database Utilities application
Upload the application files from the Process Commander distribution to
your application server
Install the Process Commander application instances to the database
4. Configure Your PRPC system
Optionally configure a Lucene search engine to support Rule and Work
Object searches in Process Commander
Configure the Help and System Management applications
Setup an initial user organization
You perform the first two steps with the database and application server administrator
tools, respectively. You use the Process Commander Database Utilities application
(prdbutil) to upload and install the application files, and to set up the initial
configuration of your Process Commander system.
To set up a Process Commander system, you deploy four software components in
your application server:

17

The deployment of a basic installation instance is shown in the diagram below:

Deployment of a basic installation instance


Selecting the right core component for your platform
The PRPC core application is packaged in five different versions to support the
deployment of PRPC into different J2EE environments. The following table
summarizes all the packages provided and their use:
Type of deployment
All Tomcat deployments

PRPC package to use


prweb.war

All new deployments on WebSphere 6.x or


WebLogic 9.x, or Oracle Application Server
10g Release 3

prweb.war or prpc_j2ee14.ear

Note: The legacy packages listed below are provided only for existing
customers to support backward compatibility. Contact customer support before
deploying.

18

All new deployments on WebSphere 5.1.

prweb.war

All new deployments on WebLogic 8.x

prweb.war or prpc_j2ee13.ear

Existing deployments on WebSphere 6.x or


WebLogic 9.x that used prweb.ear

prweb.war or prweb_j2ee14.ear

Existing deployments on WebSphere 5.x or


WebLogic 8.x that used prweb.ear

prweb.war or prweb_j2ee13.ear

Components labeled j2ee14 should be deployed in application servers that conform


to the J2EE 1.4 specification. The components labeled j2ee13 should be deployed in
application servers that conform to the J2EE 1.3 specification.
Tomcat and WebSphere 5.1 customers should install the WAR in all cases.
WebSphere, WebLogic, or Oracle Application Server customers may also deploy the
WAR if they are not using functionality in either of the EAR packages. You must
deploy the EAR file component if you intend to use any of the following containermanaged features with your Process Commander application:
Two-phase commit

JMS message services


Rule-Service-EJB
J2SE security

When upgrading Process Commander, you should generally install the core
component package that is currently in use in your environment. That is, existing
WAR deployments should deploy the 5.5 SP1 WAR component; existing EAR
deployments should deploy the 5.5 SP1 EAR. However, if you upgrade the
supporting platform components at the same time as Process Commander, or if your
integration requirements have changed, you may need to change the PRPC core
component and your system configuration.
Note: Please refer the Pega Installation Guide from the PDN site for any detailed
Deployment procedure.
The prerequisites for installing Process Commander are:
An application server host computer with adequate memory and disk space for the
installation. Process Commander requires a minimum of one GB of free memory.
This is in addition to any memory allocated for the operating system or other
applications on the server. The memory required for your system may need to be
higher, depending on the number of users and your specific configuration.
A working installation of the application server.
A configured relational database available for Process Commander use, and
support in your organization for the installation and configuration of relational
databases.

19

Note: The database and application server platforms may be either UNIX or
Windows systems. However, a Windows system is required for the Pegasystems
developer and end-user clients and for some of the Pegasystems monitoring tools,
specifically, PegaRULES Process Analyzer, Process
Simulator and Autonomic Event Services. The environment for your initial
Process Commander system should include at least one Windows platform.

Caching
To allow the powerful Rule Resolution process to occur with the required
performance levels for enterprise-scale systems, PegaRULES has a series of caches.
A cache contains data that has been copied out of one place and stored temporarily in
another for easier access. In Process Commander, some caches are stored in the
system memory (JVM), some are stored in the database, and some are stored on disk.
Caches stored in memory include:
Rule cache
Rules Assembly cache
Conclusion cache
Caches stored on disk in the file system include:

LookupList cache
Static Content cache
Rule cache holds data about the reads done from the PegaRULES database for rule
classes. The first time a rule is requested from the database, the cache has no
information about it. It passes the request on to the database, and the system attempts
to retrieve the information from the database. If the data is available in the database,
the system retrieves the rule, stores it in the Rule cache, and then sends the rule
information back to whichever process requested it. The next time that information is
required, it is retrieved from the cache instead of the database.
Rules Assembly cache is used to minimize Java code generation and compilation
mainly by tracking RuleSet lists and user entries. Rules assembly is the process
whereby all the rules run by the Process Commander system are generated into Java
code for the system to execute. Rules assembly, especially code compilation, is
extremely resource intensive and comprises a series of processing steps.
A conclusion is an instance of a Java object (resulting from the Rules Assembly
process) that was generated, instantiated, and then persisted to the database for future
use. The unique feature of conclusions that differentiate them from normal Java
object persistence is that these classes also rebuild themselves in response to rule
changes (just like all other types of rules). The benefit of conclusions is that they
group a number of similar rules, and digest the information down to the minimum
amount required at runtime.

20

Rules Assembly is the process whereby all of the rules which are run by the Process
Commander system are generated into Java code for the system to execute. Since
Rules Assembly is an expensive process (in terms of system resources), the process
has been broken down into several steps to maximize performance and efficiency.
When the system calls a rule to be run, if that rule was never executed, the Rules
Assembly process must:
assemble the rule, including all the other rules required (for example, if this is an
activity rule, it may call other rules)
generate the Java code for the rule
compile the code
load and execute the resulting class file
Of these steps, the code compilation is the most expensive. Therefore, several Rules
caches have been added to try to minimize Java code generation and compilation.
During Rules Assembly, one of the key factors is the users RuleSet List, as that
controls which rules the user may see. Two users with different RuleSet Lists may
call the same named rule, but due to their different Lists, the rules selected and the
code ultimately generated may be quite different. Similarly, it is possible for two
users with different-yet-related RuleSet Lists to call for the same named rule; because
the rules are defined entirely in the RuleSets they have in common, the generated
class is exactly the same. Due to these factors, a cache structure is maintained in
memory, keyed by a combination of the RuleSet List and Rule Name (its purpose)
that maintains a reference to the generated class files loaded instance.
Static Content Cache
In PegaRULES, static content files contain information presented to users which
doesnt need to be constantly processed, such as form images or help files (example:
the login splash screen, which will not be affected by changes to rules or to work
items). In PegaRULES Process Commander, the main Rules which contain static
content are:
Rule-File-Binary
Rule-File-Form
Rule-File-Text
These rules are read from the database using the Rule Resolution process, and the
files are cached to the server file system (not into memory). Since these files dont
change rapidly and are expensive to read from the database, they can persist in the file
system through system shutdown and startup, and be retrieved as a file, rather than
spending the resources to constantly retrieve the data from the database.
The static content data is actually cached in two places:
on the client (each users PC)
on the server

21

Static Content Cached on the Client is standard browser caching. Whenever a user
requests static content (Rule-File- forms, Help forms, and other static content in the
WAR file), that information will be cached in the browser on the client side. It is
possible to set an expiration tag on this information, which will tell the browser to
look first in its cache for data before asking the server again.
Static Content Cached on the Server: The first time information from a static file is
requested, the system searches the directory structure for the requested rule, in the
following order:
Personal RuleSet subdirectories
(\rule_cache\webwb\RuleSethashname\PersonalRuleSethashname)
RuleSet List directories (\rule_cache\webwb\RuleSethashname)
the WebWB directory
(NOTE: Just as the Rules in the personal RuleSet override the Rules in the main
RuleSets, so the static content in the Personal subdirectory overrides the static files in
the main subdirectory.)
LookupList Cache
LookupLists contain information that displays in dropdown boxes in Process
Commander. These are items (such as the SmartPrompts) which are built on a
complex query that takes a long time to run (perhaps more than two seconds). Since
this information is so expensive to produce, it is cached to improve performance.
The LookupList cache is stored similarly to the Static Content Cache, in the file
system. Files are put in the contextroot/webwb/llc directory, and grouped by
classname.
Example:
prweb/webwb/llc/Rule-Obj-Fieldvalue
prweb/webwb/llc/Rule-HTML-Harness

The first time a LookupList is requested, the system searches the directory structure
for the requested rule, in appropriate class subdirectory under LLC. If the file is
present, it will be returned. If the file is not already cached, the system will load the
file from the database, and also write the file to the LookupList cache on disk.
Again, the LookupList cache should have to be cleared rarely, if ever. If something
that is done that modifies rules outside normal processing, such as importing rules
using the PRImpExpServlet, then the cache must be cleared to pick up the new data.
Also, if there was a problem with the system pulse, and data was not correctly
propagated to the other nodes in the system, the LookupList Cache should be cleared
(along with various other caches).
The consequences of clearing the cache is that the system must check the cache
before going to the database, and then cache everything again, which will slow
performance until the caches are rebuilt.

22

When PegaRULES is installed on a multi-node system, then a copy of the various


caches are stored on each node, and each of those nodes must be updated with rule
changes. This update process is managed by the System Pulse functionality.
Saving a rule change (update, add, or delete) to one of the Rule tables in the database
will fire a PegaRULES database trigger, which will then register the change in the
pr_sys_updatescache table (in the same database). Each node records all their
changes in this table; the types of event which are saved to this table include:
Cache for any changes to the rule cache (changes to the rules)
Index for Lucene changes
DELLC when the lookuplist cache is deleted
RFDEL for any rule-file- deletes
Once per minute, the pulse (which is part of the standard PegaRULES agent) on each
node wakes up (independently) and queries the pr_sys_updatescache table. The
query retrieves records which are not from this node (which this node did not
create), and which have a timestamp which falls within the window of time starting
with the last pulse (or system startup) and now. In this way, all of the changes
originating on other nodes are selected, and the appropriate cache entries on this node
are invalidated. The next time one of the rules which has been invalidated is called, it
will not be found in the cache, and the updated version of the rule will be read out of
the database and be eligible for caching again.

23

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 are implemented through two Process Commander objects:
Agent queue rules
Agent schedule data 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.
Two built-in master agents are background processes operating on each Process
Commander node that manage requestor sessions and agents defined through agents
rules and agent schedule data instances. They are not defined by agents rules.
(Technically, these are daemons, rather than full agents.)
The Master-for-Requestors (Requestor Manager) master agent monitors idle
requestor sessions to enforce automatic timeouts. By default, this occurs every 60
seconds. Your site can establish another value in the prconfig.xml file setting:
<env name="agents/requestortimeoutwakeup" value="NNN" />
The Master-for-Agents (Agent Manager) master agent starts and monitors agents
defined through agents rules and agent schedule data instances. By default, the
Master-for-Agents master agent awakes every ten minutes. Your site can establish
another value in the prconfig.xml file setting:
<env name="agents/newqueuewakeup" value="NNN" />
where NNN is in seconds.
Process Commander relies on two standard agents:
Pega-ProCom
Pega-RULES
If your system is using the PegaDISTRIBUTION Manager application, Process
Commander also uses the Pega-IntSvcs agent.

24

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.
SendCorr sends notify messages to users about assignments and outgoing
correspondence to work parties. This activity is enabled by default and runs every
30 seconds.
Email_CheckIncoming checks the inboxes of any incoming e-mail accounts
that have been configured and if it finds messages, routes them according to the
settings in the e-mail account. When enabled, it runs once every 30 seconds.
GetConvertedPDFsFromPDM checks the PDM Requests table to see if any
Word documents have been converted to PDF files. You enable this activity only
if you are using PegaDISTRIBUTION Manager and you want to use it to convert
Word files attached to work objects into PDF files
The PegaRULES agent queue is configured to run three activities by default:
SystemCleaner removes stale entries from system caches once a day.
SystemPulse synchronizes the system caches once every minute.
SystemIndexer generates and updates the indexes that support the Find feature
once every minute.
Agent vs. Activity
Because the processing of an agent is completed through activities, the term agent
sometimes refers to the agent (the rule and/or the data object) and sometimes it refers
to an activity the agent runs.
For example, sometimes the ProcessServiceLevelEvents activity is referred to as the
SLA agent. In another example, typically the SystemPulse activity run by the PegaRULES agent is called, simply, the System Pulse.
Additionally, the Agent Management page in the System Management application
lists each activity specified in an agent queue rule as a separate entry. On that page,
the term agent means an agent activity and queue means agent queue rule.

25

Interacting with the Database


Persistence
A persistent object is an object instance that was saved from a requestor's clipboard
into the PegaRULES database. It can be accessed and used by others requestors and
remains in the database after the requestor session ends.
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.
Q. What methods store persistent data objects in PegaRules database?
a) Obj-List
b) Obj-Save
c) RDB-Commit
d) None of the above
Q. The pages become persistent when they belong to both concrete and abstract
classes.
True
False
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.
Q. The rule is an instance of concrete class only.
True
False
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. The Data-Admin-DB-Name class contains database data instances.
Database data instances are always stored as rows of the pr4_base table
JDBC Connection Pool to use a connection pool defined by a Java Naming and
Directory Interface (JNDI) facility. Process Commander may open more than one
connection to a database. When using WebSphere's pooled connection facility, a
general guideline for production systems is to set the maximum number of
connections for the PegaRULES database to about one-third to one-fifth of the
number of simultaneous requestors and adjust the PegaRULES database settings to
allow the same number of connections.
Note: Don't forget to count listeners and agents as requestors.
Database settings in prconfig.xml are as below:

26

<env name="database/databases/Northwind/url"
value= "jdbc:microsoft:sqlserver://shelpnt:1433;SelectMethod=cursor"/>
<env name="databases/databases/Northwind/userName" value="Smith" />
<env name="database/databases/Northwind/password" value="password" />
<env name="database/databases/Northwind/maxConnections" value="3" />
Q. If the Database connections limit exceeds then what error will be thrown by
PRPC?
a) SQL exception
b) Java Database exception
c) Page level error
d) None of the above
Q. What alert will be set to detect long database call waits?
a) PEGA0001
b) PEGA0014
c) PEGA0026
d) PEGA0023
Sybase databases are accessible only through Connect SQL rules. Sybase is not
supported as a host for the PegaRULES database. If your PegaRULES database is
hosted by Oracle 9, the Type 2 (OCI or thick client) driver is required; the thin client
(Type 4) works with Oracle 10g.
Use Connect SQL rules (Rule-Connect-SQL rule type) to access relational databases
other than the PegaRULES database. Tables and views in the PegaRULES relational
database become visible through Database Table instances (Data-Admin-DB-Table).
Q. Do we need to undeploy and redeploy the PRPC configuration file prconfig.xml
after any changes to Database setting?
True
False
Q. Which background process will save the User pages in PRPC?
a) Clipboard
b) Passivation daemon
Obj-Save method: 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. We 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. It specifies that an
object should be saved. By default, Obj-Save sets up a deferred write operation that
does not occur until the next commit operation executes.

27

Using Obj-Save method system examines the page's pxObjClass property to


determine its class. It uses the corresponding Rule-Obj-Class instance to find the
Database Table name, Lock Key format, and so on.
Q. Can we save a page that is locked by another requestor?
Yes
No
Q. We cannot save a page that your session does not hold a lock on
True
False
Q. We cannot save pages of any class derived from the Code- base class or the
Embed- base class. Such pages exist only on the clipboard.
True
False
Commit method: 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). The Commit method operates on Thread pages. The Commit
method has no parameters. Specifies that all operations currently on Process
Commander's deferred operations list be written to the database. If any of the
operations fail, the commit will end in a rollback: all the operations will be rolled
back.
In a J2EE application server setting, the JTA transaction aspects of this method
depend on how the Process Commander system is deployed. If your system is
deployed appropriately in the Enterprise tier of a J2EE application server, a Commit
operation can be processed as a full Java Transaction API (JTA) transaction. This is
useful when objects are saved to more than one database.
For example a single Commit operation may update both the PegaRULES database
and an external database (made visible through the External Database Table wizard).
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.
Rollback method: 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. Specifies that all operations currently on Process
Commander's deferred operations list should be removed, or rolled back. Any objects
with locks specified as ReleaseOnCommit are released with a rollback operation.

28

Generally speaking, activities that commit objects use the following pattern:
1. Commit the deferred operations list.
2. Evaluate the results of the commit step.
3. If the commit failed:
Report errors to the clipboard page and to the Pega log.
Roll back the operations.
The Work-.commitWithErrorHandling activity also illustrates how to report errors
when a commit operation fails.

Transaction Model
The applications need to participate in distributed transactions, Process Commander
must be deployed as an enterprise application and must use a JDBC driver with XA
support.
Q. What is the default transaction model of Process Commander?
a) Bean-Managed
b) Container-Managed
Bean-Managed transaction: When running in this mode, Process Commander is in
charge of the (distributed) transaction. Process Commander issues the begin statement
and the final commit or rollback.
Container-Managed transaction: When running in this mode, an external J2EE
container starts and ends distributed transactions that Process Commander joins as
one of the participating resources. When Process Commander finishes its work, it
submits a list of operations to the resource manager(s) or it marks the transaction for
rollback. Only the processing managed by certain Process Commander Service rule
types (EJB, Java, and JMS) can participate in container-managed transactions.
Deferred Operations Model
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.
The standard HTML rule @baseclass.DeferredOps interrogates system internals and
presents an ordered list of deferred (uncommitted) database operations for the current
Thread.
In addition to the object locking feature, Process Commander ensures data integrity
by creating a deferred operations list during a business transaction rather than writing
each change to the database individually.

29

Locking
Object locking for work objects is enabled by default. Object locks are associated
with users' requestors. Requestors obtain a lock on a work or other object when the
user opens an object for modification. While the requestor holds the object lock, no
other requestor can make changes to that object. After the processing of the
application causes the changes to be written to the database, the lock is released and
the object is available to another requestor.
Object locks have a timeout interval that is set to 120 minutes by default.
Mechanisms provided by your database management system that control how/whether
operations access data at the same time. Database locking provides functionality such
as preventing two write operations from committing changes to the same row at the
same time.
A Java object that holds information about a user and that user's session. In Process
Commander, users are represented as requestors and object locks are associated with a
user's requestor.
When selected, ReleaseOnCommit parameter instructs Process Commander to release
the object lock on the item being opened when changes for the object are committed
to the database.
Threading Model
A PegaRULES Thread object is a named context of clipboard pages. Most processing
for a requestor is single-threaded. The first Thread for a requestor is named
STANDARD. The pxThread page is a named top-level clipboard page sometimes
referred to as the thread page. The class for the page is Code-Pega-Thread.
Q. What is Pega alert in case of number of threads exceed the limits?
a) PEGA0011
b) PEGA0018
c) PEGA0026
A requestor can have multiple Threads, but the Threads are guaranteed to never run
concurrently. A daemon is a reserved background Java thread that executes as a
BATCH requestor type. Ex: Passivation daemon Saves requestor sessions after
timeout or other situations
The PEGA0030 alert is generated when the number of requestors logged onto the
system (including agents and services) exceeds the alert threshold.

30

3. Class Structures & Hierarchy


Design

31

Organizational Hierarchy

Process Commander supports a three-level organizational hierarchy consisting of


organizations at the top level, divisions at a second level, and organization units as a
third level. Each user (Operator ID instance) is associated with an organization,
division, and unit.

Process Commander Application, group organizational data hierarchically, using


nested levels of organization, division and unit. The following structure shows a
sample organizational hierarchy with one organization, three divisions, and four units.
Top Level: Organization - identifies the company entity.
Second Level: Division - identifies the highest-level entities of the company. For
example, you might use the structure of your company's senior management team
as a starting place for division-level entities.
Lowest Level: Unit - identifies the most specific level at which organization
information is recorded (a cost center, for example).

Basic Organizational Hierarchy

When a user log in with an operator ID, their organizational affiliations grant them
appropriate RuleSet access. The ID also identifies two additional affiliations: work
group and access group.
Work Groups - Users and the work they do are tied to work groups, which fall
below units in an extended organizational hierarchy. Users working on a common
set of items generally belong to a single work group.
Access groups - Users' application permissions, portal layout, and accessible
work are controlled by access groups. Access groups may span multiple work
groups, and typically mirror Process Commander job functions.

32

Example: The following Hierarchy shows an extended organizational hierarchy.


The North America and Asia divisions each have Marketing and Sales units; each
Marketing unit, in turn, has Marketing Communications and Product Management
work groups. All work group managers are afforded additional privileges by
belonging to the Managers access group.

Extended Organizational Hierarchy

33

Reusability is the ability for PRPC to share the same instance of a rule, RuleSet,
and/or service so that it can be reused by other portions of the same application and/or
other applications.
Some examples of reuse that we see in PRPC are:
The Add activity defined at Work- that can be can be reused by many
applications as-is without customization
Utility functions that are defined in a shared RuleSet so that they can be
reused by multiple applications
The class structure provides you with a hierarchy in which rules can be
placed. The higher a rule is in the hierarchy, the more potential reuse there is.
However, a rule can only reference other rules at the same level in the
hierarchy or higher. For example, a rule X at class A- cannot call Rule Y
defined at A-B if no rule Y exists at A-.
Implementation Class vs. Framework Class:
An implementation class is a class that belongs to RuleSet that is one of your
application RuleSets. Classes for the implementation are sometimes called the
implementation layer.
A framework class is a class that belongs to RuleSet that is not one of your
application RuleSets. Classes associated with the framework are sometimes called the
framework layer.
Example: Typically, work objects belong only to implementation classes (work
types). To simplify, develop a list view and summary view reports. You can define
reports in framework classes that, at runtime, execute with the corresponding
implementation classes.

34

Class
Class defines capabilities (rules such as properties, activities, HTML forms, and so
on) available to other, subordinate classes, or to instances of the class.
Classes are organized into a hierarchy. The ultimate base class named @baseclass is
at the top (or left). The base classes Data-, Rule-, Work- and others are immediate
child classes of the ultimate base class. Other classes are derived from the base
classes. Classes can be either Abstract or Concrete.
Abstract class cannot have any instances, appears at the top level of the class
hierarchy. An abstract class is a rule (an instance of the Rule-Obj-Class class)
created to support the definition of rules, including other classes. A dash or minus
character "-" as the last character in the class name indicates an abstract class.

A Concrete class, near or at the bottom of a class hierarchy can have instances
stored in the database.
Concrete classes corresponding to instances saved in the PegaRULES database are
known as internal classes
Concrete classes corresponding to a table in an external relational database (rather
than the PegaRULES database) are known as external classes.
Concrete class that is a class group:

35

Concrete class that belongs to a class group:

Concrete classes derived from the Rule- base class are known as rule types and
those derived from the Work- base class are known as work types. Concrete classes
dont end with a (dash).
The Rule- class and Work-Cover- class are abstract classes, while Work-CoverGeneral is a concrete class.
Custom classes that are immediate child classes of the ultimate base class are known
as top-level classes. These are different from base classes.
Inheritance is a primary benefit of object oriented technology. Process Commander
offers multiple types of inheritance that can maximize reuse of your rules while
allowing localized overriding as appropriate.
Inheritance allows a rule created for one class (possibly an abstract class) to be
applied to other classes that inherit from it.
RuleSet version inheritance works using three-level version numbers. For
example, users who have a version 02-15-06 in their RuleSet list inherit rules in
version 02-15-05, when no rule instance exists in 02-15-06.
RuleSet inheritance arises through the order of RuleSet names in the user's
RuleSet list. Rule instances in a RuleSet at the top of the RuleSet list supersede
others of the same name.
Organizational inheritance is implemented through a four-level assembly of
privileges and RuleSet versions through the access group, organization unit,
division, and organization.
Class inheritance searches for rules from a concrete, lower class, up the class
hierarchy to find available rules.
36

Class inheritance uses a sophisticated algorithm to find the parent classes of a specific
class. Two types of class inheritance directed inheritance and pattern inheritance
are available
Directed inheritance allows naming a class choosing a name that's not related to
its parent's name.
Pattern inheritance the name of the parent class is a prefix portion of the name of
the class, based on the dash (-) characters.

A class group instance causes the system to store the instances corresponding to two
or more concrete classes that share a common key format in a single database table.
Class groups are primarily used to group a set of related subclasses of the Work- base
class; such class groups are also known as work pools.
The following benefits of having class group:
All instances of classes that are associated with a class group share a common key
definition and common lock definition. This allows the database to save the
instances as rows in one table in the PegaRULES database.
The common key format also ensures that the same database table is accessed
when an instance is converted from one class (within a class group) to another
class (in that same class group). For example, a work object may initially be
entered incorrectly as a merchandise order, but later be reclassified as a
merchandise return request. Both work types have the same key structure and
belong to a common work pool (class group).

37

Class groups can help with database table management, backup, space, and
reporting.
A work object is a primary unit of work completion in an application, and a primary
collection of data that a flow operates on. As an application is used, the work objects
are created, updated and eventually closed i.e. it will be resolved. Every work object
has a unique ID (property pyID), an urgency value, and a status (property
pyStatusWork).
A work object ID is a permanent, external identifier of a work object, the value of
property pyID. This value has an optional prefix portion, a number, and an optional
suffix portion and is unique system-wide.
The standard activity named Work-.GenerateID uses the standard properties
pyWorkIDPrefix and pyWorkIDSuffix in its computation. By convention, an
ordinary work object ID has a prefix of W-nnnnn and no suffix, so W-9432 identifies
such an object. Conventionally, a cover object ID has the format C-nnnnnn, and a
folder object has the format F-nnnnn, where nnnnn is a system-assigned decimal
number. Normally the system assigns a work object ID automatically as it creates a
work object, using a prefix set in the model rule of the work type or work pool
The internal class Data-UniqueID supports work object numbering, and ensures that
work object IDs are unique system-wide, not just within an application or
organization. The property Data-UniqueID.pyPrefix holds the prefix and is the key to
instances of this class. The integer property Data-UniqueID.pyLastReservedID holds
the highest assigned number. The property Data-UniqueID.pyOrganization, a key
part, is not filled in by standard rules. This property value is left blank so that work
object IDs are unique system-wide.
The Work Object ID is stored in the pc_data_uniqeid table.
The standard property Work-.pyStatusWork defines whether the work object is
open or resolved. The value of this property is a primary indicator of the progress of
the object towards resolution. Values are restricted and controlled, and are changed
only through specific mechanisms.
Resolved work objects identify completed work and are ordinarily not modified by
any further processing, unless the work object is re-opened. The following are the
standard work object statuses available:
New not yet reviewed or qualified
Open responsibility for processing is with the processing organization
Pending responsibility for processing is currently with an external organization
Resolved-Duplicate resolved, as judged to be a duplicate of another work
object
Resolved-Rejected resolved, not accepted
Resolved-Complete resolved, work completed

38

The HTML property rule WorkStatus supports localization of the status value on
displays, through field value rules.

Clipboard Viewer:

39

The Work- base class, one of thirteen standard top level abstract classes, is a
superclass to all the classes that define work objects.
Properties, HTML forms, and flows in the Work- class are available to support the
behavior and appearance of all types of work objects, including
Ordinary work objects, typically belonging to the a class derived from the
standard abstract class Work-Object Covers, typically belonging to a concrete class derived from the Work-Coverclass
Folders, typically belonging to a concrete class derived from the Work-Folderclass
The external key to all Work- instances is recorded in the pyID property, and
typically consists of an alphabetic prefix, a dash, and an arbitrary but unique number.
Through directed inheritance, a subclass of the Work- base class may have a name
that does not begin with "Work." For example, the class PegaSampleCustomerRequest, part of the sample application, is a work type.

40

Questions:
Q1) In designing a class structure for an application, what should the first step be?
a. Identify primary users
b. Identify systems that the application will be interfacing with
c. Identify major units of completed work
d. Identify the key tasks that the application will perform
Q2) In a class
a. Both Pattern Inheritance and Directed Inheritance should be selected
b. Pattern Inheritance is mandatory
c. Directed Inheritance is mandatory
d. Neither Pattern or Directed are selected
Q3) In describing class inheritance in PegaRULES Process Commander, which of the
following statements is false?
a. Directed inheritance causes a class to inherit characteristics directly from the
specified parent class, regardless of any defined pattern inheritance.
b. Pattern inheritance causes a class to inherit characteristics from classes that it
resembles, moving up the pattern class hierarchy.
c. In pattern inheritance dashes are the delimiters for pattern matching.
d. The developer must specify pattern inheritance; directed inheritance is optional
and if specified, takes precedence.
Q4) Consider the following Data Tables and their classes
Class
Data Table
DataData-AdminData-Admin-XYZ
Acme-

pr_data
pr_data_admin
pr_XYZ
acme

Now a class Acme-Data-ABC is created which directly inherits from Data- and a data
table that belongs to this class is created. Five rows are added to this. In which of the
above data tables are these five rows included
a. pr_data
b. pr_data_admin
c. pr_XYZ
d. pr_other
e. acme

41

Q6) Which one of the following defines a work-pool


a. Work-Group
b. Work-Basket
c. Class-Group
d. Class-Pool

Q7) About Concrete class (select 3)


a. Must end with -
b. It belongs to class group
c. It may be a class group
d. Must inherit from abstract class
e. Have instances
Q8) Class group should inherit from
a. @baseclass
b. Workc. Work- Objectd. Work- Foldere. Work- CoverQ9) A concrete class which ends the Work- class like MyCo-HR-Loan-Work- means,
a. Indicates the Class Group
b. Indicates the Work Pool
c. Developer can derive the Work- class
Q10) Which type of inheritance allows the name of the parent class to be a prefix portion
of the name of the class.
a. pattern
b. directed
c. direct
d. all the above.
Q11) A top-level class
a. Inherits from @baseclass
b. Inherits from Workc. Contains most of your business logic
d. Is usually the same as a bottom level class
Q12) Which of the following is not true
a. Classes that end in - must be abstract
b. Abstract classes can not have instances
c. Concrete classes must belong to a class group
d. A class group must always have at least one key

42

Q13) A class group


a. Is any set of related work objects
b. Causes the system to store the instances corresponding to two or more concrete
classes that have a common key format in a single database table
c. Is unrelated to your applications requirements
Q14) An implementation class is a class
a. that belongs to RuleSet that is one of your application RuleSets.
b. that belongs to RuleSet that is not one of your application RuleSets.
Q15) Concrete classes corresponding to instances saved in the PegaRULES database are
known as
a. Internal Class
b. External Class
c. Class Group
d. None of the above.
Q16) Concrete classes corresponding to a table in an external relational database (rather
than the PegaRULES database) are known as
a. Internal Class
b. External Class
c. Class Group
d. None of the above.
Q17) The standard property that defines whether the work object is open or resolved.
a. Work-.pyStatusWork
b. Work-.pyID
c. StatusWorkObject
d. WorkObjectStatus.
Q18) The Work Object ID is stored in the
a. pc_data table.
b. pc_data_uniqeid table.
c. pr_data
d. pcv4_work_history

43

4. Data Modeling

44

Properties

A property rule provides a name and characteristics for data in an object. Because a
property definition is a rule, it shares the benefits of versioning, inheritance, and
access control that Process Commander provides to all rules. Properties are used
to
hold data in work objects, so it can be apart of your application Rule Set.

A property is an instance of the Rule-Obj-Property rule type. There are three types
of standard properties stating with the Index px, py, and pz.
Properties starting with px are computed properties that user can see on a form,
but cant directly enter the values or change.
Properties starting with py can be used by the user or developer to enter or change
via direct input
Properties starting with pz are reserved for internal process commander use. User
cant see, enter or change the values of these properties.

Property Types
Properties can be used in different types to determine the kind of data that values of
the property represent. There are 11 different types in the representation of a single
property.
Types: Text, Identifier, Password, Integer, Double, Decimal, Date, DateTime,
TimeofDay, TrueFalse, TextEncrypted.

Property modes are used to determine how the system represents the property data.
Every property has one of eleven property modes. This is a permanent feature of a
property that cannot be changed after you save a property rule. The simplest
45

property mode is Single Value. A Single Value property contains text that can
represent HTML, a date or time, an identifier, a number, or a Boolean true/false
value.
Properties with a mode other than Single Value are known as aggregate properties.
All eleven properties modes can be divided into four categories based on the
representation of the property data. The major categories are Value modes, Page
modes, Java Object mode, and Java Property modes.

Value mode identify properties that can have none, one, or multiple strings as
the
value:
Single Value: Select Single Value to create a property that can contain a Single
text string value. Text, numbers, dates, Boolean values and amounts are stored in
Single Value mode properties.
Value List: A Value List mode is an ordered, indexed list of strings, sometimes
called an array.
Value Group: A Value Group mode contains one or multiple strings, in
unordered manner and each identified by a unique text index value.
Page mode identifies properties for which the value has a single or multiple page
structure.
Page: Page is a data structure that contains name-value pairs.
Page List: A Page List mode property is a data structure consisting of an
ordered list of zero or more embedded pages, each identified by an integer index.
Page Group: A Page Group is a data structure consisting of an unordered set of
pages, each identified by a string index value.

46

Java Object mode contains a reference to an instance of a Java object.


Java Object: Java Object is selected to indicate that this property holds on the
clipboard a reference to an instance of a Java object.
Java Object List: Select Java Object List to indicate that this property can
contain an array of Java objects.
Java Object Group: Java Object Group is selected to indicate that this property
can contain an unordered group of references to instances of Java objects.
Java Property mode support the Java pages feature, which enables Process
Commander applications to interact with external Java objects as though they were
pages and properties on the clipboard.:
Java Property: A property rule provides a name and characteristics for data in an
object. Because a property definition is a rule, it shares the benefits of versioning,
inheritance, and access control that Process Commander provides to all rules.
Properties are used to hold data in work objects, so it can be apart of your
application Rule Set.
Java Property List: Supports the Process Commander Java pages feature that
enables your application to interact with Java objects as though they were pages
and properties on the clipboard. Java Property List is
selected to indicate
that this property represents an array property of a Java class that defines an
external Java object.
Using Prompts in Property we can define optional table edits for Single Value,
Value List and Value Group properties by enumerating the values that the property
can assume, or identifying a place where a list of values is available at runtime.
There are six types of table edits. They are
1. None No table edits apply.
2. Local List Values are enumerated in this tab.
3. Field Value Values correspond to field value rules.
4. Class Key Value Values correspond to the first key parts of a known other
class.
5. Remote List Values are enumerated as elements of a List or Group within
a single Process Commander object.
6. Prompt List Values are enumerated as with a Local List, but for each
internal value, a different localized value appears on input or output.
An embedded page is a clipboard page that has the value of a property of mode
Page. Any page on the clipboard that is not a top-level page is an embedded page.
Process Commander uses a recursive page structure. Pages contain properties that
can have single or multiple pages as their values.

47

Properties wizard are used to create one or more property rules with a common
Applies To class by completing a single form. This is used only when to create
several properties, using this wizard the all properties can be created faster than
completing the Property form for each property.

Data Table
Developers can use the Data Table editor to add, update, or delete instances of a
concrete class derived from the Data- class for which no form is defined, or other
classes for which an Excel template rule is defined. This facility allows easy entry
and maintenance of data instances for classes that have a simple structure.
Select Application > Data Tables to access a list of existing Data Tables in your
system. Click Add at the bottom of the form to create a new data table.
We Can use the wizard to create an edit form for any class that meets these
requirements:
Derived from the Data- base class
Contains only properties of mode Single Value
Does not require user input for properties inherited from any higher classes
Contains a Single Value property that defines a unique key

If you add a property (column) to a previously created data table, you must open and
update the list rule (Rule-Obj-List rule type) to have the new property available to
the Data Table editor. After generating the data table, edit the data table to enter the
required data.

48

How to use data tables?


To make references using data tables:
1. Create a Data-Zzzzzz class.
2. In an activity, perform an Obj-Open on the instance that contains your system
details.
3. Pass the value into your application.

Model
A model rule defines initial values for properties of a specific class. A model can be
applied to a new empty page of that class to set many property values in one
processing step. Model is an instance of Rule-Obj-Model.
Using a model, the value of multiple properties can be easily to zero, to the null
string, to True or False, to a computed value such as today's date or the current time,
a copied value such as your Operator ID, and so on. By convention, a model named
pyDefault is available for most standard classes.
Using a model the value of multiple properties can be easily set to required values,
rather than setting the property values one-by-one in an activity, this improves
runtime performance. Using a model also speeds development, because you can set
values for many properties quickly.
Flow rules that create work objects use a model rule for a Work- class to set
initial properties for the work object. In Definition Tab of Model specify a target
property or property reference to be initialized with the initial values.
Superclass Model causes the system at runtime to apply a model of the immediate
parent of this model's class with the same Model Name before it applies this model.
Linking together several models is called as model chaining. Process Commander
identifies the superclass to be called at the time you save the Model rule form, not at
runtime.
Important Points
1. Process Commander identifies the parent of the current class using the Parent
field in the class definition, not by following full class hierarchy searches
2. After identifying a parent class, the system uses rule resolution to find the model
of the same name as the current model.
3. The model in the highest class is applied first. The current model is applied last.

49

5. Process Flow

50

Process Flow
Process Commander associates a flow rule with a Microsoft Visio diagram, which
graphically represents a process. The diagram contains a network of shapes (tasks)
and connectors (arrows).
A flow rule defines a business process or part of a business process. A flow rule

governs how work objects are created, progress through the system, and become
resolved. A flow rule consists of a network of shapes and connectors (lines), each
with associated parameters and values.
A flow rule is an instance of the Rule-Obj-Flow rule type. Flow rules are normally stored in
the PegaRULES database as rows of the pr4_rule_flow table.

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 resolved. Every work object has a unique
ID, an urgency value, and a status.
A temporary work object is a work object that is created and resolved by a single
operator or through straight-through processing and never saved as a database object.
To create a temporary work object, select the Creates temporary object checkbox in
the flow that creates the object. Temporary work objects can be used in screen flows
and regular flows.
Some of the features like reporting, history, and attachments are not available for
temporary work objects. Also the below points are important in terms of temporary
work object:
Temporary work objects do not have a work object ID.
Temporary work objects cannot be members of a cover.
The Where-Am-I? Display is not available for temporary work objects.
History additions performed on such objects do not cause a flow to fail, but have
no effect.
Flow Editor Toolbar button (

) is used to start Microsoft Visio 2002/2003 and edit

the flow. Click the Return button (

) when you complete Visio editing.

List of Flow shapes

FlowStart Identifies the start task of this flow. Every flow has one Start
shape.

51

Connector Associates a task in the flow with another that may follow the
first task. Connectors leaving assignment tasks may be flow actions.
Connectors leaving other tasks such as decision or utility shapes may be
when conditions.
Assignment Creates an assignment task associated with work object in a
workbasket or worklist. The task must be completed by a person or the
system before the flow can progress. It represents a pause or potential pause
in the flow.
Optionally, after the assignment task is defined, you can associate a service
level rule with it. A clock appears on the diagram, as shown here.
Utility Specifies an activity to run at that point in the flow to perform
automated processing without any user assignment.
Fork Supports automatic selection of one connector from two or more.
Decision Identifies an activity that can make an automated decision about
the progress of the work object through this flow.
Flow Identifies a subflow, which is a flow rule that is referenced in
another flow. For example, add a Flow shape to your flow rule to start
another flow and end processing of the current flow. The second flow is
called a subflow of the first flow.
Router Sends an assignment to a user, workbasket, or agent other than the
current user. Associate a Router task with an assignment task. This activity
determines which worklist or workbasket is to contain the assignment.
Notification Notifies a work party by e-mail or correspondence about the
status or progress of this work object as the assignment is created.
Comment Adds explanatory text comments anywhere on the flow
diagram. Comments do not affect execution of the flow.
Ticket Marks a business exception that might arise at any point in the
flow, such as a cancellation.
Integrator Identifies an activity that can connect to an external system
to send or receive data.
Assignment-Service Passes control to an external system (for example,
using a Connect BPEL rule). Flow execution pauses until Process
Commander receives a service request of the appropriate type.
Spin-off Starts a new flow execution and does not wait for its
completion.
Split-Join Sends the work object to two other flows, both of which must
complete before the current flow resumes.
Split-ForEach Performs an operation or test on each element in a
repeating group.
Pools and swim Lanes Identifies and groups tasks performed by
separate organizational units within one division.

52

A few standard flow rules, harness rules, flow actions, and section rules are known as
templates. These rules have special characteristics and settings. If the Template field
appears on the new dialog, you can select one to use as a base (similar to copying) for
this rule. This can save time and typing.
Classic: Creates a flow rule using V4/5.2 shapes. These differ only in appearance
from the standard shapes introduced in V5.3.
BPMN: Creates a flow rule using Business Process Modeling Notation and
terminology.
CrossFunction: Creates a flow rule consisting entirely of tasks performed by two
or more distinct organization units in one division. See Flow Form Editing in
Visio Swim Lanes.
PolicyOverride: Creates a flow rule to support policy override reviews. This flow
calls the standard flow named FinishPolicyOverride as a final task.
ScreenFlowBPMN: Creates a screen flow rule using Business Process Modeling
Notation and terminology.
ScreenFlowClassic: Creates a screen flow rule a sequence of assignments for
one or a set of users that involves no automated processing tasks. Special
restrictions apply; see Flow Form Editing in Visio Screen Flow Rules.
ScreenFlowStandard: Creates a screen flow rule using the Process Commander
shapes
ScreenFlowStandardTabbed: Creates a screen flow rule using the Process
Commander shapes & the tabbed work object forms
Standard: : Creates a Standard flow rule using the Process Commander shapes
A standard Business Process Modeling Notation (BPMN) will provide businesses
with the capability of understanding their internal business procedures in a graphical
notation and will give organizations the ability to communicate these procedures in a
standard manner.
Types of flows
A flow rule that contains no assignments, and so can execute from start to end
without human input, is known as a straight-through process. A flow rule that
contains assignments that apply only for unusual, rare situations also can be
considered straight.
A flow rule that consists only of assignments or decisions and meets other criteria is
known as a screen flow. After submitting a form, the user is presented with another
simple form (with more questions) that may depend on previous answers. At any
point, the user can backtrack to review, or change, previous answers. Process
Commander flow rules can support such interactions in Screen Flow mode.
A flow that creates a new work object is called a starter flow.

53

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 pauses for the duration of the subflow. A subflow, also called a subprocess,
that is referenced in another flow rule, so that execution of the other rule may start
execution of the subflow.

Description of Flow Shapes:


Every flow rule has a single Start shape (
) with
no incoming connectors. This marks the first shape of
every execution of the flow rule. When you create a
flow, the Start shape is already present. You rarely
need to alter the Start Properties panel. You can enter
or revise these fields:
Use comments to document your flow on the Visio diagram. Comments (
)
have no effect on processing.Drag and drop a comment symbol and type in your
comment text.
A flow may contain none, one, or multiple FlowEnd shapes. When processing
) this shape, no further processing by this flow rule occurs. If this flow
reaches (
was called as a sub flow by another flow, processing continues in the calling flow.
The work object may remain open when it advances to a FlowEnd shape. Processing
in a separate flow may advance the work object farther toward eventual resolution.
Flow processing automatically saves the work object (using the Obj-Save method)
when a FlowEnd shape is reached, unless the work object is temporary.
Use the Ticket shape (
) to mark the starting point for exceptions that may arise
at any point in the flow, such as a cancellation. The ticket is a label for a point in a
flow, much like a programming "GOTO" destination.
An activity executing anywhere in your entire Process
Commander application can set or raise this ticket by
executing the Obj-Set-Tickets method with this ticket
name as a parameter. A raised ticket causes the
system to search for any executing flow (on the same
or a different work object) that contains this ticket. If
found, processing stops on that flow promptly, and
resumes at the ticket point.

54

Connect a Notify shape (


) to an
assignment to cause your flow rule to send
correspondence to a work party (identified in
the work object) reflecting the creation of the
assignment instance. Rule: Select a Notify
activity. See Standard activities for flows for
descriptions of a few Notify activities. The
Notify shape attaches to the bottom of the
Assignment shape. However, the activity
associated with the notify task runs when the
system creates the assignment, not later when the assignment is performed.
These standard Work- activities have an Activity Type of Notify. They can be used in
).
the Notify task, represented by the Notify shape (
Notify: Send an e-mail message as correspondence to a party identified through a
parameter.
NotifyAll: Send a single e-mail message to each work party identified in the work
object.
NotifyAssignee: Send an e-mail message to the Process Commander user who
received the assignment. If the assignment is in a workbasket rather than a
worklist, an e-mail message goes to the first operator listed in the Contacts array
of the Workbasket tab.
NotifyParty: Send an e-mail message as correspondence to a party identified
through a parameter, but only send when a threshold urgency level is reached or
exceeded.
NotifyAllAssignees: Send an e-mail message to the Process Commander user
who received the assignment. If the assignment is in a workbasket rather than a
worklist, an e-mail message is sent to each operator listed in the Contacts array.
Use

the

Assignment

Service

task

) in a flow to pass control to an


(
external system using a connector (for
example, Connect BPEL rule). Assignment
Service tasks
support
asynchronous
coordination with external systems, in
contrast to the Integrator tasks, which
support synchronous connections. Connect
at least one incoming connector and at least
one outgoing connector to the shape.

55

Use the fork shape ( ) to represent a point where


the flow execution chooses one of a few different
paths (connectors) based on tests on the work
object. At runtime, the system evaluates the
conditions on each outgoing connector, starting
with the connector assigned the highest likelihood.
The flow execution continues along the first
connector that evaluates to True.
) activity determines which
A router (
workbasket, worklist, or agent is to receives an
assignment. Associate a router activity with each
assignment, unless the assignment is always to
appear on the worklist of the current user (the one
who is currently executing the flow rule).Rule:
Select a router activity that determines which
workbasket or operator worklist is to receive the
assignment. See Standard activities for flows to read about a few standard router
activities.
) is an activity that can
A utility task (
update a work object without human input. It may
perform computations, searches, retrieve data from
another system, and make a decision affecting the
course of the flow, and so on. Rule: Select a Utility
activity to be executed when a flow execution reaches
this shape. See Standard Activities for Flows for
descriptions of a few standard Utility activities.Work
Type: Select the name of the work type for the
application that you want to link to the flow shape.
The value of this field is referenced with the flow
diagram in application documents.
) to reference a
Use the Decision task (
map value rule, decision table rule, decision
tree rule or a Boolean expression that when
evaluated produces a value that is the basis of
branching in the flow.At runtime, the system
evaluates the decision rule based on inputs
from the flow and the work object, and
chooses one of the outgoing connectors based
on the result. No user interaction or input is
required.Choose a decision rule Type: Map

56

Value, Decision Tree, Decision Table or Boolean Expression.


Type: Map Value or Decision Tree or Decision Table or Boolean Expression. Rule:
Select a map value rule, identified by the second key part.
An Integrator task (
) identifies an activity
that connects your Process Commander system to
an external system to send or receive data.
Integrator tasks use activities (with Connect as the
Activity Type) that call connector rules (RuleConnect- rule types).
Rule: Select an activity with an Activity Type of
Connect.
Work Type: Select the name of the work type for
the application that you want to link to the flow
shape. The value of this field is referenced with the flow diagram in application
documents.
Service Level: Optional. Select a service level rule to apply to this task. For example,
a service level can cause escalation processing when no response is received from the
external system after 60 seconds.
Add an assignment task for each place in the
business process that requires human judgment and
input.

Rule: Select an assignment activity. Use SmartPrompt to see a list of activities


with an Assign Activity Type that are available. Four standard activities defined
with
Work- as the Applies To class are always choices in this field. (Your
application may include others or override these standard activities.)
Work-.WorkList causes the assignment to be placed on the worklist of the
current operator (or of another operator identified by a Router shape). Creates
an instance of the Assign-Worklist class.
Work-.WorkBasket causes the assignment to be placed in a workbasket,
determined by an associated Router shape. Creates an instance of the AssignWorkbasket class.
Work-.External starts the directed Web access feature, sending a
temporary assignment by e-mail to a party identified in the work object who is
not an interactive Process Commander user. Creates and instance of the
Assign-External class.
57

Work-.Agent Sends the assignment to a background process rather than to


a person (rarely used, similar to WorkBasket).
Service Level is Optional. Select a service level rule to apply to this assignment.
and
Local Actions are Optional. Enter one or more local flow actions that are to be
available at runtime from this assignment. Use SmartPrompt to display all flow
actions available to flows in this class.

Use connectors
(sometimes called arrows)
to connect a shape element in the flow with the
next shape element, to indicate a possible path
for the flow execution. Complete the Connector
Properties panel to identify the connector flow
actions available to a user who performs this
assignment.
In Flow Action select the Action Name
second key part of a flow action. There are two or more outgoing connectors from
a decision or fork shape, one of which is labeled Else. A utility shape can return a
literal constant result using the Task Status-Set method. Similarly, a subflow called
from this flow can return a literal constant result to indicate which FlowEnd shape
was reached.
The summary of actions for connectors when they are coming out of different shapes
is:
Connector
action

Assign Decision Utility Fork


ment

Always
Action
Status
When
Else

No
Yes
No
No
No

No
No
Yes
No
Yes

Yes
No
Yes
Yes
Yes

Yes
No
Yes
Yes
Yes

Spin-Off/
Called
flow
/Spilt-join
/Split for
each
Yes
No
No
Yes
Yes

Integrator

Yes
No
No
Yes
Yes

A Call or Branch Flow shape (


) may
represent any of the following:
A branch to another flow without
returning (one or more incoming
connectors, no outgoing connectors)

58

A call to another flow with return (one or more incoming connectors, one or more
outgoing connectors)
Part of a Split/Join or Split-forEach shape (at least one incoming and one
outgoing connector)
A flow rule that is branched to or called by another is sometimes informally called
a sub flow.
Define Flow on Identify the objects the flow rule is to update. Select:
On current work Item to continue processing on the current (unresolved) work
object in the next flow.
Choose on another Work Item to start processing on a different work object.
Choose on Embedded Page when this flow is part of a Split-forEach operation.
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. For an example, see the standard flow Work.ParallelWork. (

Connecting the shapes


1. Connect at least one incoming connector to the top of the Split/Join shape. Add at
least one outgoing connector
to the bottom of the shape.
2. Expand the Split/Join shape
so that the rectangle becomes
large enough to enclose the
Flow shapes.
3. Select and drag a Flow shape
) for one of the subflow
(
to be started. Complete the
SubFlow Process panel; then click Apply.
4. Repeat for each additional flow to be started. The Split/Join shape must contain at
least two called subflows.
5. Add a connector from the top triangle to the top of each called flow. Add at least
one connector from the bottom of each called flow to the bottom triangle.
6. Complete the Connector Properties panels. If you choose Status for the connectors
that start the subflows, you can associate a Likelihood value with each. At
runtime, Process Commander starts the called flows in order of greatest
likelihood.
The Split-ForEach ( ) task provides a form of searching or enumeration over the
pages in a property. Use a Split-ForEach shape to iterate over the pages of a Page
List or Page Group property. You can't use the Split-ForEach shape to create work
objects. At runtime, this shape process the work object's embedded Page List or
Page Group properties; the embedded pages must exist before the Split-ForEach
shape is reached

59

When a work object advancing through a flow reaches the Spin-off shape (
),
Process Commander starts execution of a different flow, using the current or a
different work object. Processing in the current flow rule continues in parallel,
without waiting for the other flow to complete.
A flow rule that is reached and started by another is sometimes informally called a
subflow; the original is called the parent flow. However, no field on the rule form
marks a flow rule as a subflow; the term describes how a flow rule is referenced
rather than its characteristics. Some Business Process Management materials use the
term subprocess for a branch flow.
Use pools and swim lanes to define and separate processing performed by distinct
organization units within one division or that depend on the value of a work object
property. This shape defines a series of vertical lane borders, as in an Olympic
swimming pool. Each lane corresponds to an organization unit or specific property
value. To create a flow for which every shape belongs to a lane, choose
CrossFunction as the Template value in the new dialog box.
Flow in Draft mode is a setting that allows you to create and model flows with
shapes that contain rules and flow actions that are not yet defined or complete. For
ease in developing applications, this mode allows you to define and save flows that
reference rules and flow actions that do not exist.
workspace home page. It lists open,
A worklist is an element of the
outstanding (not complete) assignments waiting for a user to perform them. Thus, a
worklist display shows selected instances of the Assign-Worklist class. Usually,
assignments appear on a worklist because an Assignment task in a flow created the
assignment. Assignments appear in order of assignment urgency the most urgent
assignments appear first, those with the highest pxAssignUrgency value.
A workbasket is a named queue of open assignments that are not associated with an
operator. A workbasket is defined by an instance of the Data-Admin-WorkBasket
class.
As work objects progress through a flow execution, the system creates an
assignment. Assignments may be associated either with human users or with a
workbasket.
Assignments leave a workbasket in three ways:
Users who are qualified can remove an assignment from the workbasket to
process the assignment.
An application can automatically route assignments in a workbasket to users
based on work schedules, due dates, skills, workloads, and other factors.
Managers can transfer assignments from a workbasket to user worklists.
Click the Where-am-I? Icon ( ) on a worklist or the Where-am-I? Button ( ) on a
work object form to view, in a separate window, the Visio diagram of the current
60

flow rule, with a larger arrow marking the current assignment. If the current flow
execution is a subflow that was called by another flow rule, you can navigate within
the display to see the call location within the parent flow.
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. Create correspondence rules to define, in HTML, templates for
the content of outgoing correspondence. Each correspondence rule contains standard
text for one type of correspondence such as e-mail, letter, or fax. JSP tags or
directives allow correspondence to incorporate property values and calculations.
Correspondence rules are part of the Process category. This is an instance of RuleObj-Corr.
Correspondence rules that use JavaServer Pages tags can incorporate paragraph rules
(Rule-HTML-Paragraph rule type), which provide rich-text editing on the rule form.
Rules of three other rule types can reference correspondence rules:
Flow rules, using Notify tasks
Flow action rules, indirectly through activities identified on the Action tab
Activities
The Pega-ProCom agent periodically sends queued messages. Most correspondence
is sent using e-mail. Outgoing e-mail is supported by an appropriately configured
Data-EmailAccount data instance. If the correspondence is to be printed or faxed, the
HTML file (as a ZIP archive, with image files if any) is sent to a server running
Windows and the Correspondence Output Server.
A correspondence type rule is an instance of the Rule-CorrType class. These rules
determine how the system finds an address for outgoing correspondence. The class
you identify must use the properties pyOwnerKey and pxCreateDateTime as key
parts. You can use any of three standard classes or another class you created:
Data-Corr-Email
Data-Corr-Letter
Data-Corr-PhoneText
Create a correspondence fragment rule to define reusable or boilerplate HTML text
for correspondence, such as a standard heading, footer, or signature. Correspondence
fragment rules are instances of the Rule-Corr-Fragment class. They are part of the
Process category. Using the <pega:include > JSP tag, your application can
incorporate the text in a correspondence fragment rule in multiple correspondence
rules during stream processing.

61

These standard activities support correspondence generation and sending:

Work-.Notify called from a Notify shape in a flow. Generates correspondence


to a work party identified in a parameter.

Work-.CorrNew called from a Utility shape in a flow. Generates


correspondence automatically, not requiring any user intervention.

Work-.CreateandProcessCorr Sets address details.

Work-.CorrAddressPopulate Copies address details from page pyAddress


(for the work party) to the pyCorrPage page.

Assign-Corr.SendCorr Called by the Pega-ProCom agent

Data-Corr-ZZZZ.Send used by the Pega-ProCom agent. Sends messages of


correspondence type ZZZZZ.

Service level rules define three time intervals, known as goal, deadline, and late
intervals. The goal time is the smallest time interval, the deadline time is a longer
interval, and the late interval defines post-deadline times. Service level rules can be
associated with a work object or an assignment. Service level rules are referenced in
the assignment tasks of flow rules. The Pega-Procom agent a background requestor
detects goals and deadlines not met and performs escalation processing.
A service level rule includes
Goal if an assignment remains open when the goal time is reached, the system
adds this value to urgency value of the assignment.
Deadline if an assignment remains open when the deadline time is reached,
the system adds this value to urgency value of the assignment.
Repeating Interval If an assignment remains open when any repeating
interval ends, the system adds this value to urgency value of the assignment, once
for each repeating interval.
The Standard service level rules are:
Advanceflow: Push the assignment along a flow action automatically.
Default: Imposes a goal of two days and a deadline of five days.
NotifyAssignee: Sends an e-mail reminder to assignee upon reaching goal time or
deadline time.
NotifyManager: Sends e-mail to the assignee's manager upon reaching the
deadline time.
TransferToManager: Transfer assignment to manager upon reaching the
deadline.

62

NotifyandTransferToManager: Notifies manager when the assignment remains


open after one full day (goal time). Transfers the assignment to a manager after
three days
TransferToWorkbasket: Transfer assignment to a workbasket when it is open at
deadline time.

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. Work Parties
rules are part of the Process category. A work parties rule is an instance of the RuleObj-WorkParties rule type. Work parties rules are referenced implicitly by harness
rules. A work object may identify no work parties, one, or many 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 DataAdmin-Operator ID instance)
Data-Party-Org For nonprofit organizations
Data-Party-Person for people who may not be Process Commander Users
with Operator IDs.
A work object is the primary unit of work completion in an application, and the
primary collection of data that a flow operates on Work Status specifies the current
work objects completion details. The important property Work-.pyStatusWork
defines whether the work object is open or resolved. Values for this property are
restricted to a set defined by field value rules, and changes to this property value
convey important information about the progress of the work object towards
completion.
The standard work statuses are:
New Not yet reviewed or qualified
Open Responsibility for processing is with the processing organization
Pending Responsibility for processing is currently with an external
organization
Pending-PolicyOverride Work is suspended pending a review of a potential
violation of policy
Resolved-Duplicate Resolved, as this work object is judged to be a duplicate
of another work object
Resolved-Rejected Resolved, not accepted
Resolved-Revoked Resolved, reviewer has ended processing
Resolved-Completed Resolved, work completed.
In an activity, don't use the Property-Set method in an activity to change a work
object status. Call the standard activity Work-.UpdateStatus, which changes the

63

status directly, and calls standard activities RecalculateAndSave and Resolve as


appropriate. This activity is of type Utility.
The status may also change when your flow uses these two standard activities:
Work-.WorkBasket Places the assignment in a workbasket and calls Work.UpdateStatus. This activity is of type Assign.
Work-.Worklist Places the assignment on a worklist and calls Work.UpdateStatus. This activity is of type Assign.

A flow action rule controls how users interact with work object forms to complete
assignments. After selecting one flow action, users may fill in a section of the form to
complete (perform) the assignment. Flow action rules are part of the User Interface
category. A flow action rule is an instance of the Rule-Obj-FlowAction rule type.
There are two types of Flow actions
Connector flow actions appear as lines on Visio presentation in the Diagram tab
of a flow rule. At runtime, users choose a connector flow action, complete the
assignment, and advances the work object along the connector to the next task.
Flow actions of the other type, known as connector flow actions, appear above the
horizontal line. Unlike connector flow actions, local flow actions are not visible
on the Visio diagram of the flow rule. They are recorded in Assignment Properties
panel.
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. Local flow actions always are optional. Users may
perform none, one, or multiple local flow actions. A developer can mark a flow
action rule as local on the Flow Action form. On standard work object forms,
local flow actions appear below a horizontal line in the Take Action selection box.

Process Commander generates HTML code, including JSP tags and directives, for
this flow action. In unusual cases, you can author the HTML code directly. In most
cases, the system generates the source HTML automatically.

64

Methods used to define HTML:


Reference HTML to use an HTML rule that defines the presentation.
Define Form to record the source HTML directly in this rule using open
authoring, or to have the system generate the HTML from the Form tab.
Reference Section to use a section rule that defines the presentation. This
approach is often suitable to present an embedded list view to users.
No HTML to indicate that this connector flow action requires no user input.

Use activities in Flow action to do certain preprocessing and post processing when
users select this flow action. Associate activities with the flow action, and to control
operation of the Perform harness form.

Run an activity before this flow action is used to perform some pre processing before
this flow action is getting executed from an assignment. After flow action enter the
name of an activity to run after other successful processing of this flow action.

Questions:
1. The Smart Shape used for showing a harness to the customer:
a. Assignment
b. Connector
c. Integrator
d. Flow Action
2. Flow without human interaction is
a. Screen Flow
b. Straight through processing
c. Sub Flow
d. Starter Flow
3. Which harness screen will succeed New Harness?
a) Perform harness.

65

b) Confirm harness.
c) Review harness.
d) Reopen harness.
4. Identify standard local actions
a) AttachANote
b) AttacAURL
c) AttachAFile
d) AttachADocument
5. The Smart Shape is used to skip certain steps of a flow without affecting the flow
is:__________
6. Rules like Notify,Utility,Route belongs
a) Rule-HTML-Property
b) Rule-Obj-Activity
c) Rule-Obj-Flow
d) Rule-Declare-OnChange
7. List at least 3 PRPC predefined data classes that serve the purpose of work parties
8. Where can we specify new work object harness?
a) NewDefaults
b) Model.
c) FlowRule.
d) Harness.
9. What are the possible fields we can give in an assignment properties
a) Flow name
b) Assign Activity
c) Routing Activity
d) SLA
e) Local Action
10. When a Flow is in Draft mode.(Choose 2)
a) You cannot add smart shapes
b) You cannot run the Flow
c) It is not visible to Rule resolution
d) You cannot create Work Objects
11. Agent activity of assignment flow rule is used to ------------ purpose.
a) Sends the assignment to background process rather than to a person.
b) starts the directed web accesses feature
c) Causes the assignment to be placed in a work basket, determined by an
associated router shape.
d) Causes the assignment to be placed on the worklist of the current operator.
12. Which shape is used to start a different flow parallel to the current flow?
a) Split-join
b) Fork
c) Spin-off
d) Swim lane

66

6. Case Management

67

Case Management
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, status
(property pyStatusWork), and that contains the default prefix W-.
Work object ID will create automatically as a work object is created. The standard
utility activity named Work-.GenerateID uses the standard properties
pyWorkIDPrefix and pyWorkIDSuffix in its computation. The work object ID is
required to contain either a prefix or suffix. For example, the prefix of work object Q1432 is Q. The prefix of the work object MORT-763-K4 is MORT. The suffix of
work object MORT-763-K4 is K4.
The Work- base class, one of thirteen standard top level abstract classes, is a super
class to all the classes that define work objects. A work object is the fundamental unit
that records processed work in an application.
Ordinary work objects, typically belonging to the class derived from the standard

abstract class Work-Object-.


A cover object is also a work object in a concrete class that inherits from WorkCover-. A cover object can consist of many work objects and those work objects are
inherited from work-object- class and those work objects are known as covered work
objects and the work object derived from work-cover- is known as the cover work
object.
A cover work object provides a means to coordinate processing of related work
objects. By default, the system prevents the resolution of a cover work object unless
all of its "member" covered work objects are resolved.
Cover Work Objects will maintain the parent child relationship and those cover
objects will contain the prefix ID as C-
Covers are used to maintain the parent child relationship. For example if there is a
necessity of resolving five work objects to process a request, then we use the concept
of Covers and Covered work objects. The class that is derived from Work-Cover- is
known as the cover work object and the five work objects related to that cover object
are known as the covered work objects. In covers if the covered objects are resolved
then the cover objects get resolved automatically.
A folder object is a work object in a concrete class that inherits from Work-Folder-.
A folder object holds a collection of one or more other work objects which

68

themselves may be basic work objects other folders and cover objects. Folder Objects
will have the prefix ID as F-.
The main purpose of folders is to maintain the Parent child relationship between the
Folders, Covers and Covered work objects. For example if we have five work objects
that are dependent on each other then we use the concept of covers and if those work
objects are independent then we use the concept of folders. The folders can contain
the folders, Cover objects and covered objects and those all work objects can be
created processed and resolved in the cover itself.
In Process Commander Work objects capture and process evolving information
about individual units of work.
Covers are intended to coordinate processing on multiple distinct but closely related
work objects.
Folders provide a structure for more loosely associating multiple related work
objects.
The main differences are:
Covers can be resolved automatically when all their constituent ("member") work
objects are resolved.
A standard harness rule is available that displays a cover and lists its member
work objects.
Folders offer a vehicle for keeping track of one or more commonalities among
otherwise disparate work objects.
One work object may be associated with multiple folders, but only with one
cover.
Members of a folder can belong to different work types, which need not belong
all in a single work pool.
The relationships between folder work objects and their contents may be many-tomany.
Relation ship between Work object, covers and Folders:

69

Work objects from the cover itself. The work objects that are related to the cover are
known as covered work objects.
These Covered work objects are created, processed and resolved with in the cover
itself. From the cover we can go to any work object that is covered work object
associated with the cover object and we can create process and resolve it. In case of
the covers, when all the work objects associated with the cover object get resolved
that is the when all the covered objects are resolved then the Cover objects will be
resolved automatically.
Steps for creating a Folder Object:
Create a class group and it is derived from work-.
Create a work type in the class group and the work type belongs to the class group
and name that work type as Folder that inherits from Work-Folder-.
Create a flow for generating folder objects named as Folder.
While creating the folder object there is an option called view folder contents and
by this we can view the folder contents, create the work objects and also we can
add the work objects, covers and folders to the current folder.
Now we can resolve the current folder based on the flow designed.
Steps for Creating Cover objects:

Create a Concrete class named cover that inherits from work-cover-.


This class should belong to a class group which is derived from work-.
Create a basic flow for generating the cover object named cover
If the cover object is created then it will ask to create any work objects associated
in it. Here the work object name is work object that is associated with cover.
When all the work objects are resolved then the cover objects get resolved
automatically.

Steps for Creating Covered Work Objects:


Create a concrete class named work object that is derived from work-object-.
Create a basic flow for generating the work object. Named work object
Mention the name of the cover class in the process tab of work object flow named
work object.
Then execute the flow. So that the works object is created by executing the flow.
Hence the work object is processed and the work object is resolved.

70

Work object locking:


The purpose of locking items before making changes is to prevent data loss. Locking
may be more important in some situations than in others.
Work object locking is mainly used to prevent others to open the same work object
and to prevent them from make the changes.
A Process Commander requestor can lock an open instance if the instance belongs to
a class that has Allow Locking? Selected in the class rule and it has ever been saved
and committed to the PegaRULES database. Locks are retained until a Commit
method occurs.

To view object locks held by your own requestor session, select View > System >
Locks > My Locks.

Questions:
1. Which will be used to Generated work Object ID in New Release?
a.
Work- ObjectID
b.
Work- GenerateID
c.
Work Object
d.
Work New
2. Folders can contain:
a. Only work objects
b. Work objects or covers
c. Work objects, covers, or other folders

71

3. What are the properties used to set the prefix and suffix for a work object?
a. pyWorkIDPrefix and pyWorkIDSuffix respectively
b. pyPrefix only
c. pyWorkIDSuffix only
d. none of the above
4. Covered work object will be stored in which page?
a. pyWorkPage
b. pyWorkCover
c. Step Page
d. pyWork
5. Covers have some automatic behavior
a. Whenever all of the covered work objects are Resolved-Complete, the Cover
is automatically Resolved
b. Whenever all of the covered work objects are Resolved, the Cover is
automatically Resolved
c. Whenever all of the covered work objects are Resolved, the
AllCoveredResolved Ticket is raised
6. Cover work object is currently on the UI screen. Where can you view the details about
cover?
a. pyWorkCover
b. pyCoveredWork
c. pyWorkPage
d. pyCurrentPage
7. A covered work object is currently opened on the screen. Where can you see the cover
details?
a. pyWorkCover
b. pyCoveredWork
c. pyWorkPage
d. pyCoverPage

72

7. Activities

73

ACTIVITIES
An activity is similar to an instance method. A property is similar to an instance
variable in Java or C++. An activity is an instance of the Rule-Obj-Activity rule type.
An activity when defined consists of a sequence of steps, each of which can contain a
method or an instruction. As an activity form is saved, the system converts
information in the form into server-side Java source code. At runtime, this Java code
is compiled and executed to perform processing, analysis, and decision making.
An activity consists of one or more steps. Each step can call a Process Commander
method, can transfer control to another activity, or execute custom inline Java. The
Run icon executes an activity. The activity must be saved and valid for the Run icon
to be visible. The following are the Fields of the Activity Rule Form
Label (optional) Enter a one- or two-character step label name which will be
used for reference.
Description (optional) Description about the functionality of the step
Step page (optional) The name of the clipboard page that this step operates on.
Method (required) The name of one of 86 predefined methods to call to work
on the step page.
Use a precondition to conditionally skip execution of a step. The system evaluates
whether specified conditions are met before it executes the method or instruction
referenced in the step. If false, the rest of the step is skipped. Different options
available for a Pre condition are,
Continue Whens- Next When Condition is validated
Skip Step- Current Step is skipped and control goes to next step
Skip Whens- The Control goes to the method or instruction referenced in that
step
Exit Activity- Control exits the current activity and goes to the calling activity
Exit Iteration- For the current iteration the step is skipped and the control goes to
next iteration
Jump to Later Step: The Control goes to the step referenced.

74

The Transition step defines any post condition that needs to be validated and based
on the validation, transition of some sort can be done. The significant functionality of
transition step is that it is used for error handling in activities. When ever there is an
exception, the transition step can be used to make the control shift to a later step
which handles the exception. The transition step also has the same options as pre
conditions for the transition to take place.

Iterations are used to repeat a step a number of times or until a condition is met. This
provides a limited form of enumeration or looping. The different options available for
looping are as follows
For each page-option to sequence through all pages of a specified class

75

For each embedded page-apply a method or instruction to each embedded page


in a Page List or Page Group property
For each element in a value list-to repeat the step for each element in a Value
List property.
For each element in a value group-to repeat the step for each element in a Value
Group property.
For Loop-to repeat the step a number of times determined by the values of
integer constants or integer properties.

CALLING AN A FROM ANOTHER ACTIVITY:


Call: Call instruction to cause the current activity find another specified activity
and executes it. When that activity completes, control returns to the calling
activity.
The calling activity can provide input parameters to the called activity, or it can
share its own parameter page with the called activity, an approach known as callby-reference
Branch: Branch instruction to cause the current activity to find another specified
activity and branch to it without a return. When the system executes a Branch
step, control transfers to another activity found through rule resolution.
In addition to these two ways, an activity can call through an inline Java step
which calls the required activity.
Parameters are variables that can be passed from an activity or to an activity. The
former is termed as Out Parameter and the later is termed as In Parameter. Parameters
generally have a global scope. The Parameter can be any one of the data types
specified and whether it is mandatory or not can also be mentioned. Local variables
are properties that are used inside an activity and these variables will have only a local

76

scope and it cannot be used out side the declared activity. The Local Variable can also
be any one of the mentioned data type.

Step Pages are the pages that are defined for the activity to work on it. In Pages &
Classes tab, we define the step pages that are to be used in the activity. When it is
defined, the step method works on the appropriate step page and has the same
visibility characteristics as its class.
A step page specified for a Page-New method indicates the name (and class) of
the page to be created.
A step page specified for a Property-Set method indicates to set the properties of
the page defined
A step page specified for a Show-Page method indicates the XML for the
specified named page

Different types of keywords as pages available are

77

local Not a page, a keyword indicating that the name that follows the word
"local" and the period is a local variable, not a property.
Locate A prefix to a page name (in lowercase), indicates that this page is
retrieved or located at runtime through an activity of type Locate.
Mode identifies an indirect page reference.
Param identifies the parameter page for an activity. This page structure is not
part of the clipboard.
Parent in the context of an embedded page, identifies the immediately
containing page to which the embedded page belongs. This keyword may appear
more than once in a property reference. This keyword is used in Declare Index,
decision table, decision tree, and map value rules.
Prompt as a prefix portion of a page name, not a keyword identifies an
indirect page reference in a Call or Branch. The called activity identifies an
indirect page by selecting prompt as the Mode field in the Pages & Classes tab,
and refers to these pages using the syntax "Prompt.pagename".
Top identifies the top-level page to which the current embedded page belongs.
The concept of primary page is a relative term. When an activity is called, two things
are specified: the name of the activity being called and the page it is called to work
on. In the clipboard, the called activity exists within the page on which it is called;
this is referred to as the activitys PRIMARY page. The PRIMARY page of an
activity is determined by the activity that called it, not by the activity itself.
A Process Commander method is a primitive, atomic operation that can be performed
by one step of an activity (Rule-Obj-Activity rule type) or a Parse Structured rule
(Rule-Parse-Structured rule type). Internally, a method is an instance of the RuleMethod rule type. These methods cant be altered or new methods can be added. The
below table consists of all the methods that can be used in an activity.
S.No

Methods for entire clipboard


pages

1
2
3
4
5
6
7
8
9
10

11
12

Page-Change-Class
Page-Clear-Messages
Page-Copy
Page-Merge-Into
Page-New
Page-Remove
Page-Rename
Page-Set-Messages
Page-Unlock
Page-Validate
Methods for persistent
instances
Commit
Obj-Browse

13

Obj-Delete

Description
Change the class of a page.
Remove page messages from the step page.
Copy contents of one page to another page
Merge two or more pages into one page.
Create a page.
Delete a page from the clipboard.
Rename a page or name a primary page
Associate a message with a page.
Release a lock held after Commit.
Validates all properties on a page.

Commit all database changes in the Thread.


Search through and select instances of a class based
on tests of values of exposed columns.
Delete an instance from the database, or mark it for
later deletion with the Commit method

78

14

Obj-Delete-By-Handle

15

Obj-Filter

16

Obj-List

17

Obj-List-View

18

Obj-Open

19
20
21

Obj-Open-by-Handle
Obj-Refresh-and-Lock
Obj-Save

22

Obj-Save-Cancel

23
24

Obj-Sort
Obj-Validate

25

26
27
28
29
30

Rollback
Control methods and
instructions
Activity-Clear-Status
Activity-Set-Status
Activity-End
Activity-List-Add
Branching to another activity

31

Calling another activity

32

Collect

Use the Collect instruction to begin execution of a


collection rule (Rule-Declare-Collection rule type).
This rule can execute additional rules of several
types, including activities and other collection rules.

33
34
35
36

End the current activity.


Stop processing of the requestor.
Clear the thread page.
Pause a Thread for a specified time interval.

37

Exit-Activity
Requestor-Stop
Thread-Clear
Wait
Methods for HTML and XML
streams
Show-HTML

38

Show-Page

39
40

Show-Property
Show-Stream

Use the Obj-Delete-by-Handle method to delete an


instance identified by its handle
Remove embedded pages of a Code-Pega-List
results page that fail to meet criteria specified in a
when condition rule.
Search through instances of a class and extract
selected properties.
Execute the retrieval and sorting operations of a list
view rule, but with no formatting or HTML display.
Open an instance stored in the PegaRULES
database or in certain cases an external database.
Open an instance using a permanent unique key.
Open an instance and acquire a lock.
Save page data to the database, or mark it for saving
(commit) later.
Reverse a previous Obj-Save or Obj-Delete method,
not yet committed to the database.
Sort the values of a property of mode Page List.
Run a Validate rule on a set of properties, typically
representing user input.
Cancel any uncommitted database save operations.

Reset the method status from the previous method.


Set a return value.
End the current activity and calling activities.
Add an activity to an internal dispatch list.
Use the Branch instruction to cause the current
activity to find another specified activity and branch
to it without a return
Use the Call instruction to cause the current activity
find another specified activity and executes it.
When that activity completes, control returns to the
calling activity.

Assemble and send an HTML page to a user's


browser.
Send an XML representation of a page to the
browser.
Send a single property value to the browser.
Apply stream processing to a JSP, HTML,
correspondence, or XML rule.

Property methods

79

41

Apply-Model

42
43
44
45
46

Obj-Sort
Property-Remove
Property-Seek-Value
Property-Set
Property-Set-Corr

47

Property-Set-HTML

48

Property-Set-Messages

49

Property-Set-Stream

50

Property-Set-XML

51
52
53
54

Property-Validate
Flow-related methods
Flow-End
Flow-New
Obj-Set-Tickets

55

TaskStatus-Set

58

History methods
History-Add
History-List
Methods for connectors
Connect-dotNet

59

Connect-EJB

60

Connect-File

61
62

Connect-HTTP
Connect-Java

63

Connect-JCA

64

Connect-JMS

65

Connect-MSMQ

66
67
68

Connect-MQ
Connect-SOAP
Connect-Wait

69
70
71

RDB-Delete
RDB-List
RDB-Open

56
57

Use the Apply-Model method to execute a model


rule to update an existing clipboard page.
Sort the values of a property of mode Page List.
Delete a property from a page.
Use backward chaining to obtain a value.
Set the value of one or more specified properties
Save the contents of a correspondence stream as the
value of a property.
Save the contents of an HTML stream as the value
of a property.
Associate a literal text message with a property or a
step page.
Save the contents of a JSP, XML, or HTML stream
as the value of a property.
Save the contents of an XML stream as the value of
a property.
Apply an edit validate rule to test user input.
End a flow execution.
Start a flow execution.
Set or reset tickets, interrupting the normal
sequential processing of a flow.
Convey results of activity processing to a calling
flow.
Record your changes to work objects or activities
List instances of a class.
Start a connector to a Web service based on the
Microsoft .NET framework.
Start a connector to an external Enterprise
JavaBean.
Use the Connect-File method to invoke a Connect
File rule (Rule-File-Connect rule type). The rule can
create, add contents to, or close an output file.
Start a connector to an external system using HTTP.
Start a connector to call an external Java class or
JavaBean.
Start a connector to an external system through a
JCA resource adapter.
Start a connector to an external system using the
Java Message Service application programmer
interface.
Use the Connect-MSMQ method to invoke a
connector to an external system that uses Microsoft
MQ (MSMQ) messaging services.
Start a connector for a WebSphere MQ connection.
Start a connector to invoke a Web service.
Block (pause) for a time interval to synchronize
with a child requestor.
Delete an instance from a relational database.
Retrieve rows from an external relational database.
Open an instance from an external relational

80

72

RDB-Save

73
74
75
76

Structured parsing
Apply-Parse-Delimited
Apply-Parse-Structured
Apply-Parse-XML
Map-Structured

77

Parse-Byte-Pos

78

Parse-Char-Pos

79
80
81
82

Parse-Fixed-Binary
Parse-Packed-Decimal
Text-Infer
Text-Normalize

database.
Save the contents of a clipboard page to a relational
database.
Execute a Parse Delimited rule in an activity.
Execute a Parse Structured rule in an activity.
Execute a XML parse rule in an activity.
Use the Map-Structured method to invoke a map
structured rule
Used only in Parse Structured rules for parsing by
byte positions.
Used only in Parse Structured rules for parsing by
char positions
Used only in Parse Structured rules.
Used only in Parse Structured rules.
Evaluate a parse infer rule.
Evaluate a parse normalize rule.

83

Local variables
StringBuffer-Append

84

StringBuffer-Insert

85

StringBuffer-Reset

86
87

Other
Assert-No-Invocation
Connect-FTP

88

Link-Objects

89

Log-Message

90

Privilege-Check

91

Property-Map-DecisionTable

92

Property-Map-DecisionTree

93

Property-Map-Value

Manipulate string buffer containing local variables.


This method appends a text string to the current
contents of the buffer
Manipulate string buffer containing local variables.
This method inserts a string into the buffer at a
specific byte offset position.
Manipulate string buffer containing local variables.
Use this method to clear a local variable of type
String Buffer of an activity
Reserved. Do not use this method.
Use this method to copy a file from one file system
to another file system using File Transfer Protocol
Use this method to create an instance of a concrete
class derived from the Link- base class. A link
functions as a bidirectional cross reference to
associate two objects together.
Use the Log-Message method to append a message
to the Pega log when the step is reached.
Use this method to determine whether the current
requestor has access to a specific privilege
Use the Property-Map-DecisionTable method to
evaluate a decision table rule and save the result as
the value of a property.
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.
The Property-Map-Value method evaluates a onedimensional map value (Rule-Obj-MapValue rule
type) defined in the parameter. The method sets the
result as a value for a Single Value property.

81

94

Property-Map-ValuePair

95

Queue-for-Agent

96

Queue instruction

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.
Use this method when constructing the application
logic that queues items such as work objects or
assignments to be processed in the background by
an agent.
Use the Queue instruction to start asynchronous
execution of a second activity.

Advanced

97

Java

98

Start-Validate

99

End-Validate

To include inline java into the activity


Use this method only when building custom rule
types, to start the internal processing that develops
rule references
This method is used only for custom rule types, to
end the processing that develops rule references

STANDARD METHODS
Use the Obj-Open method to open an instance stored in the PegaRULES database or
in an external database linked to an external class, and save it as a clipboard page. The
system uses the specified class and key fields to find and open the object and place its
data into the specified step page.
Parameter
Description
OpenClass

Optional. Identify the concrete class of the instance


to be opened. If left blank, the class is obtained
from the Pages & Classes tab of the activity based
on the property references in the parameter array.

Lock

Select this box to acquire a lock.

ReleaseonCommit

Select this box if the Lock box is selected and want


the system to release the lock when the next
Commit method occurs for this instance.

LockInfoPage

Optional. As a debugging aid, identify the name of


a page to be created by this method to hold the
results of the locking attempt, when it fails.

PropertyName

Enter in this array the name of each property or


properties and the associated values that together
make up the key of the instance to be opened. Enter
at least one property name.

PropertyValue

For the value, specify either a literal value or a


property reference.

Use Obj-Save method to request that the system save a clipboard page to the
PegaRULES database

82

Parameter

Description

WriteNow

Normally, leave this box cleared

WithErrors

Select this box if the instance is to be saved even when it


contains messages, indicating validation errors.

Use the Obj-Browse method to search instances of one class and copy the entire
instances, or specified properties, to the clipboard as an array of embedded pages.
Only properties exposed as columns can be used as selection criteria. However,
values of properties that are not exposed as columns, including embedded properties,
can be returned. Use the Obj-Browse method optionally followed by the Obj-Filter
method to create a list of search results. The Obj-Browse method has five base
parameters and an optional array of selection criteria.
Parameter

Description

PageName

Enter the name of the destination page to contain search


results. The system uses Code-Pega-List as the class of this
page.

ObjClass

Identify a class to search.

MaxRecords

Optional. Enter the maximum number of instances to be


returned at runtime. If left blank, the default is no limit.

ReadOnly

Marking the embedded pages as read-only with this check


box prevents changes to the values of properties on the
embedded pages

Logic

Optional. Enter a boolean statement that defines how the


rows of the parameter array are to be combined

Label

Enter a unique letter or identifier for this row, referenced in


the Logic field.

Select

Select to return the value of this property on each embedded


page.

Field

Enter a property reference.

Condition

To filter the value in the list based on a condition

Value

Enter a constant value, a property reference or other


expression for the comparison for each instance of the class.

Sort

Select No Sorting, Ascending, or Descending to control the


sorting of results by this field.

Use Obj-Sort 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.

83

Parameter

Description

PageListProperty

Enter a property reference that identifies a target property of


mode Page List to be sorted.

Class

Optional. Leave blank in most.

SortProperty

Identify in rows of this array a property reference (starting


with a period or a page name) on each page of the Page List
property that is the basis of sorting. Each property reference
most identifies a Single Value mode property or a single
text string.

Descending

Select to cause the method to sort in descending order for


the property. Clear the box to sort in ascending order.
Use the Obj-Delete method to delete a database instance corresponding to a clipboard
page and optionally to delete the clipboard page too. The deletion can occur
immediately, or (more commonly) defer deletion until a later execution of a Commit
method. 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. To use the
Obj-Delete method in an activity with Activity Type of Trigger, do not check the
immediate check box.
Parameter

Description

Remove

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.

Immediate

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.

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 ObjBrowse methods) based on one or more when condition rules. For example, if each
embedded page on results page contains a Page List property Child and each Child
page contains a Single Value property FirstName, you can use the Obj-Filter method
to remove all embedded pages where no value of FirstName is "Robert".
Parameter

Description

List Page

Name of the results page, of class Code-Pega-List.

84

ResultClass

Select the Applies To key part of one or more when


condition rules (Rule-Obj-When) to be used to test each
result. Must match or be an ancestor class of the class of the
embedded pages in the ListPage page.

When

Complete at least one row of this array, specifying a when


condition rule. Enter the second key part (When Name) of a
when condition rule. Typically, the comparisons and
expressions in the when condition rule involve one or more
aggregate properties or unexposed properties.

Use the Obj-List method to retrieve data to the clipboard as an array of embedded
pages. The Obj-List method searches sequentially through instances of the
PegaRULES database or an external database and retrieves specified data to pages in
the clipboard.
Parameter

Description

PageName*

Enter the name of the destination page to


contain search results. The system uses CodePega-List as the class of this page.

ObjClass*

Identify the concrete class to search. When


this method references a list rule, it uses this
value as the Applies To field (first key part)
with rule resolution to find the list rule.

RuleObjList

Optional. Identify the second key part List


Name name of a list

MaxRecords

Optional. Enter the maximum number of


instances want to be returned in the list at
runtime.

SelectionProperty

Optional. Enter one or more properties to


select and return from each instance of the
class to be searched.

SelectFrom

Optional. Enter a literal, case-sensitive start


value for this property

SelectTo

Optional. Enter a literal, case-sensitive end


value for this property

Like

Optional. To include in SQL query

Lightweight Results

Select to cause results from this Obj-List method to


be returned in a special format consistent with a
lightweight table in SQL rather than the standard
pxResults pages.

85

Use Property-Set method to set the value of one or more specified properties. The
Property-Set method uses an array of parameters. Each row of the array contains a
property name or reference (the destination), and a value (the source). Order is
significant.
Parameter
Description
PropertiesName

Enter one or more target property references. If the


Step Page field for this step is blank, the system uses the
primary page of the activity.
This method cant be used to set the value of a property
that is the target property of a Declare Expression rule.

PropertiesValue

Enter an expression to compute a value for each


property. For example. you can enter:
A literal constant
A reference to the value of another property
A reference to the value of a parameter variable
defined on the current activity's parameter page
An arithmetic operation
A function call
A reference to the value of a local variable defined on
the parameter page

Use Property-Set-HTML 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. This method sets the results of stream
processing on an HTML rule, after all directives are processed, as the value of the
property specified.
Parameter
Description
PropertyName

Enter a Single Value target property reference.


Identify the property that to receive its value from
stream processing.

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.

Use Property-Set-XML method to save the contents of an XML rule after stream
processing completes as the value of a Single Value property. The property value can
then be mapped as output and conveyed to an external system.
Parameter
Description
PropertyName

Identify a Single Value target property to receive


the value produced by stream processing.
If the property is on the step page, precede the

86

property name with a period.


If this property is on a different page, include the
page name in the reference and ensure that this
page appears on the Pages & Classes tab of the
Activity form.
XMLStream

Enter the Stream Name key part of an XML rule to


process.

XMLType

Enter the third key part of an XML rule to process.

Use Property-Set-Messages 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.
Parameter
Description
Category

Optional. Leave blank unless when the message text is


displayed the output is intended to be localized based on
field value rules in a language-specific RuleSet.
Identify a localization category. Accept the default value
pyMessageLabel except in advanced cases.

Message

Enter one of the following:


A message rule key, with no quotes.
A literal text string in double quotes.
The third key part of a field value rule where
@baseclass is the first key part and the Category
value is the second key part, to support localization.
Use this only when the Category field is not blank

Field

Identify the property on which the message is set.

Use the Page-New method to create a page on the clipboard. The new page may be a
top-level page or an embedded page.
Parameter
Description
Model

Optional. Enter a model (an instance of the Rule-ObjModel rule type) to apply to the new page.

PageList

Optional. To save the name of the new page as the final


element in a list, identify a Value List property (not a
Page List property).

NewClass

Optional. Identify a class in most cases concrete


class for the new page.

Use Page-Copy method to copy the contents of a source clipboard page to a new or
previously created destination clipboard page. The source page is not altered.
Parameters
Description
CopyFrom

Optional. Enter the name of the source page from


87

which to obtain property values to copy. If blank, the


system uses the Step Page of the current step or the
primary page of the activity if the Step Page field is
blank.
CopyInto*

Enter the name of the destination page, which may or


may not already exist. If it exists, it must have the
same class as the source page. The current contents of
the destination page are erased before the copy
operation occurs.

Model

Optional. Identify a model to be applied to the


destination page before copying data from the source
page.

PageList

Optional. To save the name of the new page as the


final element in a list, identify a Value List property
(not a Page List property). Use the notation
pagename.propertyname.

Use the Page-Clear-Messages method to remove all property messages and all page
messages from the page identified in the Step Page column of the current step.
Use Page-Remove method to delete one or more pages from the clipboard. The
contents of the database are not affected.
Parameter Description
Page

Optional. Enter the name of a top-level or embedded


clipboard page to delete.

HOW TO TEST AN ACTIVITY:


If the activity requires only a few parameters, it can be tested easily using the Run
toolbar button, as described below. However, if the activity requires extensive setup
and is more appropriately tested in context rather than through unit testing, trigger the
Tracer to start only when the activity is reached.
In-context testing To test an activity in the context of other activities and rules that
produces the needed initial conditions:
Open the activity in the workspace.
Select Run > Trace Open Rule. The Tracer tool starts.
Optionally, click to open the Trace Options panel, and deselect the RuleSet
containing the activity. This eliminates Tracer output from other rules in the
RuleSet. Exit from the Tracer.
Begin other processing that eventually calls the activity in your own requestor
session. Tracer output begins when the activity starts.

88

Unit testing
Optional. Using the Clipboard tool or other means, set up clipboard pages,
property values, and other initial conditions.
Next, start the Tracer tool to monitor activity execution. Set Tracer options.
Click the Run toolbar button ( ) or the equivalent keyboard shortcut CTRL + R.
A pop-up form appears.
If the text requires a test page, select the Create a Test Page radio button. Click
Run Rule.
Complete the Test Page area. If the activity uses parameters, the system presents
an input form for parameters. Enter constants for input parameters as prompted.
(Some input parameters may be optional.)
Click Execute to start the activity in your requestor session.
As the activity runs, it may update the clipboard, open and alter instances, display
HTML forms, and so on. It uses the current RuleSet list and access roles.
If the execution causes errors, an error form appears.
Use the Clipboard tool and the Tracer tool to uncover errors and view processing
details.
Clipboard contents
Testing with the Run button can create one or more clipboard pages, including copies
of named pages identified on this form. The system retains these pages when the form
is closed; properties on these pages remain available for later tests of this or another
rule tested with the Run button.

Questions
1. What is the class of the top level clipboard page created by the Obj-List method?
(a) Code-Pega-List
(b) Rule-Pega-Obj
(c) pxResults
(d) The same class as the returned instance
2. Which of the following is true about step pages? (Choose 2)
f) Steppages define the default pagecontext during the step execution.
g) Step pages are removed when the activity ended
h) Steppage class is always equal to AppliesTo Key.
i) StepPage is not required on each step of an activity.
3. Which of the following method is used for viewing any step pages info in XML
format (especially for the purpose of debugging?)
a. Show-XML
b. Show-Html
89

c. Show-Page
d. Show-Step-Page
e. Show-Property
4. The following method is used to make Obj-Save method not be effective and hence not
to be taken up by subsequent Commit method
a. Obj- Save-Cancel
b. Obj-Save-Rollback
c. Obj-Save-Drop
d. Obj-All-Rollback
5. ----------- Check box in Obj-Save method and ---------- Check box in Obj-Delete
method facilitate immediate write into database, without actually waiting for Commit
method
a. Immediate, Write-Now
b. Write-Now, Immediate
c. Save-Now, Immediate
d. Immediate, Save-Now
6. Both Assign and Utility activities can not use which of the following methods
a. Show-Html
b. Obj-Save
c. Obj-Open
d. Commit
7. Explain in single line difference between Activity-End and Exit-Activity methods
The Exit-Activity method ends the current activity and returns control to the
calling activity.
If one activity calls another activity that contains the Activity-End method, both
activities end, and the system does not return to the calling activity.
8. To create a work object from an activity:
a. Create a step page of the class of the work object
b. Call the Add activity
c. Enter the name of a starting harness
d. All of the above
e. None of the above; activities cannot create work objects
9. Obj-Open methods open an instance of a class into a step page. Which of the
following statements is true?
a. Before Obj-Open, the step page has to be created using Page-New
b. The step page can be classless if it is temporary
c. An instance of a step page with the same name can be reused and the data must be
cleared using Page-Reset
d. An instance of a step page with the same name can be reused and the data is
cleared automatically

90

10. You can use Activity Parameters to set:


a) The work object status
b) The assignment status
c) Both
d) Neither

11. Which statement about Local Variables is true?


a. They are stored on the clipboard as temporary variables
b. They exist only within the context of an activity
c. They can be stored in the database
d. They are stored in a named page that is created automatically
12. To create a work object from an activity:
a. Create a step page of the class of the work object
b. Call the Add activity
c. Enter the name of a starting harness
d. All of the above
e. None of the above; activities cannot create work objects
13. Which statement best describe Preconditions and Post transitions:
a. They use WHEN statements or IF statements that evaluate to true or false
b. They can direct the logic to another point in the activity
c. They can end activity processing based upon the status
d. All of the above
e. A and C
14. Which statement is not true?
a. A parameter page is used to pass parameters between activities
b. A parameter page is a classless
c. A parameter page must contain one literal value, the page key
d. A parameter page can contain references to properties on the primary page
15. Which of the following keywords are used in place of an explicit page name?
a. local
b. global
c. primary
d. top
16. Which method is used to retrieve rows from a database and place the results as
embedded pages in a clipboard?
a. Obj-List
b. RDB-Open
c. Work-Open
d. RDB-Retrieve

91

8. User Interface

92

Introduction
Process Commander includes portals and work object forms that allow application
users to enter, update, and resolve work objects.
Work object forms are HTML based, so can create and change them in place as
needed, without any compiling code. First define layout and Process Commander
generates the basic HTML to display the form.
The User Interface category contains six rule types that control the presentation of
work object forms and other aspects of the user experience:
1. Harness
2. Section
3. Flow Action
4. Paragraph
5. Portal
6. Skin
Harness rule defines an HTML form that supports application users as they enter,
review, update, and resolve work objects. Harness rules are instances of the RuleHTML-Harness class. Harnesses are also called work object forms.
Use harness rules to define the appearance and processing of work object forms used
in application to create work objects and process assignments. Together with 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.
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-HTML-Section rule type). Section rules are instances of the Rule-HTMLSection class.
Section rules are referenced in:
Harness rules
Other section rules
Flow action rules
Paragraph rules with SmartInfo pop-ups
A flow action rule is an instance of the Rule-Obj-FlowAction class. A flow action is
a choice available to users as an interim or final disposition of an assignment they are
processing.

93

A flow action rule controls how users interact with work object forms to complete
assignments. After selecting one flow action, users may fill in a section of the form to
complete (perform) the assignment.
There are two types of flow actions:
1. 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 causes the work object to progress along the connector to the
next task. A connector flow action is an instance of the Rule-Obj-FlowAction rule
type.
2. 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.
A Paragraph flow action rule is an instance of the Rule-HTML-Paragraph class.
Paragraph rule to provide read-only text for a cell in a work object form that can
include bold, italics, colored text, images, and other rich text.
A portal rule is an instance of the Rule-Portal class. The Process Commander portals
support two user communities:
1. The Developer portal provides an integrated work, test, and development
environment to support application developers. Customization of the Developer
portal is typically not necessary and ordinarily limited to menus and skins.
2. User portals support managers and users of applications workers, as they enter,
update, and resolve work objects. User portals may be customized to reflect the
terminology, layout, facilities, and styles appropriate to each user community.
Developer portal provides quick access to dozens of tools, wizards, reports, and other
capabilities.
The appearance and function of your Process Commander portal depends on
information in your access group, which references a portal rule (Rule-Portal rule
type).
A skin rule is an instance of the Rule-PortalSkin rule type. A skin rule defines four
Cascading Style Sheet (CSS) files, stored as text file rules, that together determine the
colors, fonts, images, and layout of portal, work object, rule forms, and report
displays.
Use the Style Viewer tool to identify and preview the appearance of styles in a CSS
file. Skin rules are referenced in portal rules.

94

How the Harness would work in your application?


The flows are used to define the tasks and sequences of the business process,
including connections to associate process and practices rules. They also provide
the initial connection between the harness and to the application. When creating
the class structure, the standard NewWork flow is used as a starting point to
create a basic flow.
The harness rule is used to create a new work object of the associated class on the
Process tab of the flow form (See Figure 2). This value defaults to the standard
New harness, although a different harness can be created

Figure 2 Connecting the Harnesses to Flow


Flows can contain assignments that represent a required user or external system
interaction with existing work objects. Assignments have this property set to the
standard Perform harness (Figure: 3). However, a different harness rule can be
specified.

95

Figure 3 Connecting the Perform harness to an Assignment


Process Commander comes with standard harness rules (of type Rule-HTMLHarness) for each object, as shown below.
The harness rules specifies how to assemble the appropriate form consisting of the
specified sections, streams, and fragments, as well as action icons and buttons. The
elements are included based on user or object state. For example, the Perform and
Review harness displayed covered and non-covered work objects differently.
Object Type
Work Object

Defined in class
Work-

Cover

Work-Cover-

Folder

Work-Folder-

Harness Rules
New
NewCovered
Perform
Confirm
Review
Reopen
Perform
Review
Perform
Review
ReviewForExplore

Standard Harness Rules


The name of the harness rules & its purpose:
Name of the harness
New
NewCovered

Purpose
Creating new objects
Allows a user to create both a cover work object (for
example, in the Work-Cover-General class) and in
the same form create one or more covered work
objects

96

Perform
Confirm
Review
Reopen

Performing assignments on existing objects


Confirming Object resolution
Reviewing the closed objects
Reopening closed objects

Harness form Completing the Layout tab


Layout Controls
Controls

Description
Add an accordion to the harness
Add a container to the harness form.
Add a layout to the harness
Add a panel set to this harness, to support a composite portal.
Add a section rule into this harness
Add a tab to a harness.

Basic Controls
Controls

Description
Place a button into a cell or to the bottom of the form.
Add a text box containing a Date or DateTime value.
Add a check box representing a property value.
Add an icon to the form, in a cell or on a header.
Include an image in the form.
Add an Input Box
Add a static read-only text label into a cell
Add a radio button group representing a property value.
Add a Select control that presents a fixed list of values
Add a TextArea, which can contain more than one line of text.
Place blue, underscored text in a cell. When clicked at runtime, the link
starts an activity

Advanced
Controls

Description
Use an autocomplete text box to present a drop-down list of dynamic
choices computed by an activity.
Add a red label that opens a pop-up SmartInfo section when the user hovers
the mouse pointer over the label.
Adding a Work Area to a composite portal
Add a dynamic drop-down list
For harnesses that are part of a composite application built with Internet
Application Composer only. Add a hidden field to expose a property value,

97

making it available to the external page that displays the composite


application.
Adding a List View display
Adding a list-to-list control.
Add a dynamic menu to a composite portal.
Reference, in a cell, a paragraph rule that presents only read-only text and
images using rich text

The Rules Inspector tool provides a quick and interactive way for you to identify and
inspect a forms underlying harness, section, flow action, styles and property rules as
well as the associated HTML and property dependency networks.
Use the Rules Inspector tool to:
Learn the name of the top-level harness rule or HTML rule (Rule-Obj-HTML rule
type) that produced any window or form you are viewing.
Learn the names of section rules, flow action rules, paragraph rules and HTML
rules that the top-level rule incorporates through the pega:include JSP tag, the
HTML-based rules referenced by these and so on.
Learn the name of properties referenced in any of these rules.
Identify properties displayed that are computed automatically by Declare
Expression rules.
Find labels and other elements on harness, section, and flow action rules marked
for localization, for which field value rules are defined.
Start the Style Discovery tool, to identify and experiment with changes to the CSS
styles that are applied to a part of a form.
To turn on rules inspection
Four menu settings set or remove rules inspection. When these menu items are
set, a check mark appears before the menu item. Select:
Run > Rules Inspector > HTML Rules to turn on marking of harness, section,
and flow action rules with an
icon. The icon appears above the visible
presentation of the HTML in the rule. This menu selection also marks HTML
rules with an icon. The keyboard shortcut is CTRL+ALT+Y.
Run > Rules Inspector > Property Rules to turn on the marking of visible
properties. A small red
identifies each property reference. The keyboard
shortcut is CTRL+ALT+X.
98

Run > Rules Inspector > Declarative Rules to turn on the marking of
properties computed by Declare Expression rules. A small red
identifies
such properties. The keyboard shortcut is CTRL+ALT+V.
Run > Rules Inspector > Field Value Rules to turn on the marking of portal,
harness, section, and flow action elements that are marked for localization and
supported by field value rules (Rule-Obj-FieldValue rule types). This option is
most useful when testing a localized application. See Localizing with the Field
Values Inspector. The keyboard shortcut is CTRL+ALT+w.
Run > Rules Inspector > Styles to turn on the Style Inspector, allowing you to
determine which CSS styles apply to elements of a form, and experiment with
style changes
Rules Inspector settings affect all forms presented after you turn on the settings. The
enhanced display contains up to four types of icons
Understanding the H, P, D, and A icons
identifies the harness rule. Additional
icons
A top-left yellow icon
identify the start of the visible presentation of a section rule or flow action rule.
A small identifies the visible presentation of an HTML rule or HTML fragment
rule.
A small red identifies a property reference.
identifies a property computed by a Declare Expression rule.
A small red
Any of the following four globe icons may appear at points on a harness, section, or
flow action rule for which the Localized check box (on the HTML tab) is selected and
a language-specific RuleSet is in use:

Working with the Style Discovery tool


The Style Discovery toolbar (
) appears whenever the Styles option is
checked and a report display or work object form is visible. Select Run > Rules
Inspector > Styles again to disable the Style Discovery toolbar.

99

Icons & Purpose

Select and slowly drag the grab area to move the Style Inspector toolbar to
another location within the portal. Drop the toolbar in a location away from the work
object form elements of interest.

Style Explorer
Click to open a pop-up window that starts the Style Explorer. The window lists all
style sheets currently in force for your session, in cascading order; the last CSS to be
applied appears at the bottom of the list.

Search tool
Click to open a pop-up window that support searching for styles using text matching.
You can search through the selectors (style "names") or through the style definitions.
Enter a text string in the Search Styles input box; then check the By Selector box or
the By Definition box (or both). Click Search.

Click to list the styles that you have temporarily altered or


redefine with this tool. If you have altered a style more than once, it appears multiple
times in the list, with the latest change appearing last.

pop-up toggle
Click to disable SmartInfo display of CSS styles and properties. Click again to enable
the display.
Understand the benefit of automatically generating HTML and the
consequences of overriding this feature/ Section rules/ FlowAction not autogenerated: advantages and risks
Auto Generated
The preferred approach for section rules (Rule-HTML-Section rule type) and
flow actions (Rule-Obj-FlowAction) is to use auto-generated HTML and
create the display interactively using the Layout tab (or Format tab).

100

When the Auto-Generate HTML? check box on the HTML tab is selected,
Process Commander generates HTML code each time you save a Section
form or Flow Action form.
This approach generates correct HTML code, conforms to the guardrails and
poses the least risk.
Non Auto-Generated
For special situations involving customized displays, it may be necessary to
clear this check box and enter custom HTML code. This should be used
sparingly and with great care.
The best practice is to create as much of the HTML infrastructure with autogenerated sections and flow actions and use hand-crafted HTML code in small
custom spots. When a non-auto generated section is needed, follow the
guidelines below to allow the browser to correctly render the HTML and to
allow the Harness, Section, and Flow Action forms to correctly incorporate
these hand-crafted section
Complete HTML Element Structure
When creating small HTML snippets, do not code incomplete HTML structures. This
makes it hard for the browser to correctly render these in different contexts and may
cause the rule form to show script errors and/or cause an unrecoverable error.
Illegal HTML Tags
The following HTML tags should not appear in a hand-crafted section rule.
Remember that a section is part of a larger form, not a complete HTML document
itself.
1. <HTML>
The <HTML >tag cannot appear within the scope of another <HTML> tag. The
<HTML> tag is part of the harness rule.
2. <body>
Similarly, an HTML document can have only one <body> tag. The <body> tag is
part of the harness rule
3. <Head>
All sections reside inside the <body> tag of a harness rule.
4. <Link>
According to the definition, <link> tags can only be inside of a <head>. Because
the <head> tag is part of the harness, you cannot include your own <link> tag.
A flow action rule controls how users interact with work object forms to complete
assignments. After selecting one flow action, users may fill in a section of the form to
complete (perform) the assignment.

101

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-ObjFlowAction 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.
Note: Users can select one of these flow actions at runtime only if they hold the
AllFlowActions privilege or the ActionZzzzz privilege, where Zzzzz is the name of
the standard flow action.
Standard Flow Actions (Local only)
This table shows selected standard flow actions that can be used only as local flow
actions, those that do not complete an assignment.
Flow Action
AddAttachments
Work-Cover.AddCovered
AddFlow
AddMultipleAttachments
AddParty
AddToCover

AddtoFolder
AttachAFile
ApproveSample

AttachANote
AttachAScreenShot

Purpose
Add a file attachment and assign it to an attachment category.
Adds a covered work object to the current (covering) object.
Override this standard flow action to specify the work type of the
covered work object.
Start a new flow execution for this work object.
Add multiple file attachments, with a category for each, in a single
action.
Add a party to a work object, as controlled by the associated work
parties rule.
Include this work object as belonging to a cover, another work
object in a Work-Cover- class. This flow action supports a search
for the appropriate cover and selection from search results. By
default, not eligible for bulk processing.
Create a Link-Folder instance associating this work object with a
folder. Select the work pool, then select the folder work object.
Attach a file to the work object, including an explanatory note but
no attachment category. Supports browsing for the file to be
attached. Uses HTTP (or HTTPS) to upload the file
Enter a text note (property .pyDetail) and an actual effort value
(property .pyEffortActual). Does not alter work object status. This
action used in applications created by the (basic) Application
Accelerator.
Type in a text note that becomes an attachment to the work object.
Select one window from a list of windows on the Windows
desktop, and then capture and attach a screen shot JPG image to

102

AttachAUrl
AttachFromScanner
ChangeAssignmentSLA

ChangeOwnerOrg
ChangeSatisfaction
ChangeWorkSLA
EditAttachment

Flows
RequestAssistance
RejectSample
RemoveFromCover
RemoveFromFolder
Save
SelectRecipients
AndAttachments
SendCorrespondence
Transfer
TransferAdvanced
TransferToManager
UrgencyUpdate
VerifyProperty

VerifyPropertywithListing

the work object history, with an explanatory note.


Attach a URL reference to the work object with an explanatory
note.
Starts the Image Viewer tool to view or update a TIFF file from a
scanner.
Select a service level rule to apply to this assignment instance only.
Does not change the service level rule associated with this
assignment in the flow rule. By default, not eligible for bulk
processing.
Change the ownership of the work object organization, division,
or unit. By default, not eligible for bulk processing.
Change the value of root cause, customer satisfaction status, and
work object status. By default, not eligible for bulk processing.
Update the service level and related fields (goal and deadline
date/times, urgency adjustments) for work object and current
assignment.
Create a version of a file attachment using a workstation program
based on the file type of an attachment. (For example, if the file
type is XLS, the program is Microsoft Excel.) By default, this flow
action is not eligible for bulk processing.
Presents the Start a new process button, allowing the user to
select and start an additional flow execution on this work object
Allows users to request that a co-worker enter a note attachment.
Enter a text note (property .pyDetail). Does not update work object
status. This action used in applications created by the (basic)
Application Accelerator.
Remove the work object from the cover.
End the association of the work object with a specific folder work
object.
Update the work object without completing the assignment, saving
changes to various property values. Validation occurs.
Select multiple To, CC, and BCC recipients for e-mail
correspondence.
Select the recipient party. The recipient must be a valid choice
when assignments are transferred in bulk. This flow action calls the
BuildCorr flow. By default, not eligible for bulk processing.
Transfer an assignment to another operator or to a workbasket.
(This action must be a valid choice when assignments are
transferred in bulk.) The Short Description is "ReAssign".
Transfer assignment to another by choosing the work group first,
and then an operator within that work group. The Short Description
is "Transfer".
Transfer this assignment to the manager of the current assignee for
clarification, escalation, or other reasons.
Update the work object urgency.
Cause the system to start backward chaining to obtain the value of
property pyResolutionCost. (To experiment with backward
chaining, copy this rule and change the GoalProperty activity
parameter to the property that applies in your situation.)
Similar to VerifyProperty, but can present the user with a listing of
possible values to choose from for the missing property

103

Standard Flow Actions Connector and Connector/Local


The table below lists important standard flow actions that can complete an
assignment, known as connector flow actions, and those that can be either
connector or local flow actions.
A Y in the Use column indicates that this flow action can be used in both Local
and Connector situations.
Flow Action
ActionStub
Approve

Use Description
Placeholder action with no input requirements.
Y
Enter a note, record the user's approval of some previous
Y

Assign

AttachandHold
CancelAssignment

Y
C

ChangeClass

Classify

ConvertAttachment
toPDF

CorrPrompt
CorrVerify
EditCategorized
Attachment
EngageExternal

Y
N
Y

EngageManager

EngageStaffmember

EnterInformation
EnterInformation
External
Finish

Y
Y
N

GetAppointmentList

assignment or question.
Send the assignment to another operator, by selecting first a
work group and then the operator within that work group.
Generate and attach Word correspondence
Complete the current assignment and display the
Confirmation harness.
Change the work type (class) of the work object to a
different type in the same work pool, re-editing property
values as required. This can be used to correct an incorrect
work type. For example, a work object initially recorded
with a SuspendDelivery work type may actually be a
CancelSubscription work type.
Change the work type of the current work object to another
work type in the current application (work pool), by
selecting that work type from a selection box. For example,
a work object initially entered as an Unclassified work type
may, after more information becomes available, be classified
as a Renewal work type.
Converts an existing work object attachment that has a DOC
file type, created by Microsoft Word, into a new work object
attachment with a PDF file type.
Prompt for correspondence fields.
Verify previously created but unsent correspondence.
Create a version of a Microsoft Word file attachment that
has an attachment category.
Start a new flow on this work object that creates an
assignment to an external party.
Initiate new flow on work object that creates an assignment
to the manager of the assignee.
Initiate a new flow execution on work object that creates an
assignment for another user.
Allows the user to enter a note.
Similar to EnterInformation, but allows an external user to
enter a note.
Save a work object without validation; the validate activity
is not called.
Allows users to query the Microsoft Outlook calendars of
other operators. Typically you use GetAppointmentList and

104

@baseclass.
GoBack

Notify

NotifyExternal

NotifyQuick

PickLanguage
PortletAction

Y
Y

Previous
PreviousOperator

Reject

RemoveSLA

Resolve

ResolveAsDuplicate

ResponseVerified

RetryProblemFlow
N
SampleEmailToCustomer Y
SearchForDuplicates
SelectCorrTemplate
SelectCorrType
SendMeetingRequest

Y
Y
Y

SetTicket

StandardTemplate
TakeOwnership

Y
Y

TransferTo
Workbasket
Verify

Y
N

SendMeetingRequest (see below) together. The operators


would use GetAppointmentList first to determine whether
another operator is available at a specific time and then use
SendMeetingRequest to make the appointment
Submits the form immediately, without requiring any user
inputs or confirmation. By default, not eligible for bulk
processing.
Generate correspondence (notifications) to a party in a work
object, allowing the user to select a correspondence rule
from a list that includes only those compatible with the
party's contact preferences
Generate correspondence (notifications) to a party external
to Process Commander.
Initiate correspondence (notifications) using a standard,
quick form for rapid text entry. Can be sent to a party
involved in the work object, or to any e-mail address.
Select a language for the work object.
A template rule for flow action rules for portlets, configured
to generate portlet-compliant HTML.
Jump to the most recent task completed earlier in the flow
execution that is marked as an entry point.
Return to the most recently completed assignment, and
restore that assignment to the worklist of the operator who
last updated the work object, regardless of whether the
assignment was originally on a worklist or in a workbasket.
Reject this work object from further consideration, resolving
it with a status of Resolved-Rejected.
Ends execution of the OverallSLA flow. Not useful in other
flows.
Complete the current assignment, resolving work object with
a status of Resolved-Completed
Complete the current assignment, and resolve the work
object with a status of Resolved-Duplicate
Affirm that the previous response to an information request
is satisfied.
Retry last step of now-fixed problem flow
Sample e-mail message.
Search for potential duplicates. Users can review the search
results to mark any that are truly duplicates. If appropriate,
set a ticket to resolve this current work object as a duplicate.
Select a correspondence rule to be used.
Select a correspondence type, such as e-mail.
Allows users to send Microsoft Outlook meeting requests to
other operators.
Turn on ("raise") a ticket for this object, with an explanatory
note.
Empty flow action rule, used as a template rule.
Change ownership of the work object to the user's
organization, division, and unit
Transfer this assignment into a workbasket.
Record an affirmation by this user that prior work on this
work object is correct.

105

Withdraw

Set (turn on) a ticket on the work object causing the system
to resolve it as withdrawn, including a reason for the
withdrawal.

HTML Property rules are instances of the Rule-HTML-Property class. Use HTML
Property rules to control how properties appear on work object forms,
correspondence, and other HTML forms, for both display and for accepting user
input.
Dynamic Select function in an HTML rule type:
The Dynamic Select control is an optional feature you can add to work object forms
(through HTML rules, harness rules, or section rules) and other HTML forms to
speed user input

The Dynamic Select control displays a drop-down list that contains values returned
from an activity.
This control provides a dynamic alternative to the normal (static) HTML SELECT
element below:
<select Name="name" >
<option Value="red">Red</option>
<option Value="yellow">Yellow</option>
<option Value="green">Green</option>
</select>

Validation
A validate rule is an instance of the Rule-Obj-Validate rule type. To validate a
property or a page means to check its value against certain rules, and add a message
to the property or page if validation fails. An invalid page (a page that has any
associated messages) usually cannot be stored into the database.
Validate rules are part of the Process category. Validate rules test property values,
typically immediately after they are submitted on a browser form.
Rules of four types can reference validate rules:
Flow action rules, to validate user input
Flow rules, to validate user-entered parameter values
Activities, with the Obj-Validate method
Correspondence rules, to validate user responses to prompts

106

Standard validate rules


Name
Work-.OnAdd
Work-.Validate
Work-Cover.OnAdd
Work-Cover.Validate

Purpose
Defines validation for work objects (not covers) when
the work object is created (entered).
Defines validation for work objects when the work object
is updated.
Defines validation for cover work objects when first
created (entered).
Defines validation for cover objects when updated.

A validation rule may reference edit validate rules (Rule-Edit-Validate rule type).
Use the Edit Validate form to define a Java routine that tests the validity of an input
value in an activity that processes user input. The activity calls the Property-Validate
method, which applies the test defined in an Edit Validate rule.
A property rule (of mode Single Value, Value List or Value Group) may reference an
edit validate rule on the Advanced tab. Use the Property-Validate method in an
activity to execute the edit validate rule when a value is submitted through a user
input form.
Process Commander contains more than 60 standard edit validate rules. The table
describes a few of them:
Name
DoesClassExist

Purpose
Checks whether a text string identifies a Process
Commander class.
FileName
Checks whether a text string is a valid Windows file
name.
FileType
Checks whether a text string is a valid Windows file
type.
InternationalPhone Validates the format of an international phone number
IsNonNegative
Checks whether a value is greater than or equal to zero.
NotFutureDate
Expects a string in theValue in the format
YYYYMMDD. This rule returns true if that date is
today's date or a past date, or false if the date is a future
date or not in the expected format.
OperatorPassword
Supports the optional password management facility.
pyMinimumLength- When applied to the value of a property that is associated
Enforce
with the pyMinimumLength property qualifier, compares
the actual length of the value to the minimum and returns
false (with a message) if the value is too short.
SSN
Validates the format of a U.S. Social Security Number.

107

TIN

Validates the format of a U.S. Taxpayer Identification


Number.

Note: Don't confuse validate rules with edit validate rules; the latter require Java
programming skills to develop. Validate rules can call edit validate rules.

Portals
The Process Commander portals support two user communities:
The Developer portal provides an integrated work, test, and development
environment to support application developers. Customization of the Developer
portal is typically not necessary and ordinarily limited to menus and skins.
User portals support managers and users of applications workers, as they enter,
update, and resolve work objects. User portals may be customized to reflect the
terminology, layout, facilities, and styles appropriate to each user community.
The appearance and function of your Process Commander portal depends on
information in your access group which references a portal rule (Rule-Portal rule
type).

108

Field
Default Portal
layout
Secondary Portal
Layouts

Description
Identify a portal rule to indicate which portal
presentation supports those requestors who reference this
access group.
For developers, you can define alternative layouts, to
allow them to quickly switch between layouts; this is
useful in debugging. Enter the name of a portal rule to
make an additional portal presentation available to this
user.

Standard Portal rules


Recommended portal rules:
Owner
Purpose
Developer
Support for Developer
(access to six facilities (Process, User Interface, Monitor
Activity, policy Decisions, Integrations & Cases and
Content), known as slices
Manager
Composite Portals for Manager and Supervisors (introduced
in v5.5)
User
Composite Portals for Worker (introduced in v5.5)
Other standard portal rules:
Owner
Purpose
TabbedWorkSam Sample for Multiple Tasking Portals
ple
Traditional portal rules: These portals support special situations and provide
backward compatibility
Owner
Purpose
WorkManager Supports managers and supervisors, who can use the Monitor
Activity workspace and the Scan Station tool. Supports full
localization and IE 6/7, but not FireFox.
WorkUser
Accesses the Process Work layout only, for application users
who are not managers. Supports full localization and IE 6/7,
but not FireFox
SysAdminDD Supports administrators, providing access to the Version 4.2
Administer and Manage Rules workspaces

Difference between the traditional Portals and composite Portals:


Traditional portals have a fixed layout and are built from HTML rules with DataGadget as the Applies To key part.
Composite portals are built from section rules and harness rules
109

What are the advantages of composite portals over traditional portals?


Broader choice of layouts
Ease of extension and tailoring
Integrated full-text search of work objects Full support of style changes through
the
Application Skin wizard
Multiple work object support
Application-level switching for work object entry
Fully localizable
Support Microsoft Internet Explorer and Firefox 2+ browsers

Application Skin wizard


The Application Skin wizard (sometimes referred to as a "branding" wizard) enables
you to quickly develop and put into production a skin rule that reflects your corporate
or departmental standards.
A skin comprises a set of Cascading Style Sheet (CSS) files stored in your
application.
The wizard contains a wide range of functions and controls that let you create and
edit these files. You can design the color schemes, images, text, and sizing of the
interface components that comprise your User portals, reports, and work forms. The
wizard helps you reduce or eliminate manual CSS coding.
Starting and using the wizard:
Verify that all rules that you are modifying, including the skin, style sheet, and
portal are checked in.
Select Application > New > Skin. The wizard presents this series of steps in the
navigation panel:

110

Step 1 identifies the name and RuleSet version of the skin rule and other associated
rules to be created.
Step 2 displays the Quick Create feature enabling you to, in one-step, create default
fonts, and the main and accent colors for your portals, work forms, and reports. You
can also add a top header logo for traditional portals.
Step 3 defines general appearance of most UI elements including background, fonts,
and links. It also defines the appearance of the panels built into a harness rules (used
for composite portal types), and enables you to add custom styles.
Steps 4A through 4E define the appearance of smart and custom layouts, as well as
bar, tab, accordion, and repeating (tab, row, and column) layouts.
Steps 5A and 5B define the appearance of menus and grids.
Steps 6A through 6C define the appearance of labels, buttons, and error sections.
Steps 7A and 7B define report components including title bars, columns, and headers.
Steps 8A through 8D define the appearance of UI elements that are unique to
traditional (non-composite) user portal rules.

111

Navigation:
You can open any step without proceeding through them sequentially. Click directly
on a step in the navigation panel to open its screen. A check mark appears next to the
step when you go to another step. Alternatively, use the Next >> and << Back buttons
to navigate.
Some steps contain a set of collapsed sections. You can expand them all by selecting
the expand button () at the top- right corner of the wizard screen.
As you work with the wizard, click Preview to open in a new window a rendering of
most UI elements as configured so far. By default, they are displayed individually as
used in composite portals, work forms, or reports.
Some elements do not display in preview mode. In those cases, save the skin to a
composite-type portal and open the section to review the changes (specify the skin in
the Developer's portal preferences section).
Important Points:
Skins produced from this wizard are not suitable for the Developer portal. Use these
skins only with User portals.
The wizard defines an application skin (Rule-PortalSkin rule type) and its associated
CSS style sheet text files (Rule-File-Text rule type). The skin references images as
binary file rules (Rule-File-Binary rule type) and is linked to portal rules (RulePortal rule type).

112

Questions
1. Select the rule which is not under UI category
a.
Rule-HTML-Harness
b.
Rule-HTML-FlowAction
c.
Rule-HTML-Section
d.
Rule-Obj-FlowAction
2. Which one of the tool is used to view the definition of a section in Harness?
a. Image viewer
b. Form Builder
c. Rules Inspector
d. Clipboard
3.
a.
b.
c.
d.
e.

Which of the following rules are not subject to rule resolution (select two)?
Harness
Section
Binary File rules
Text File rules
Fragment rules

4. Using Rules Inspector, which of the following can be identified (Select all that apply)
a. Flow rules
b. HTML rules
c. Property rules
d. When Rules
e. Declarative Rules
f. Field Value Rules
5. The portal layout for group of users can be generally controlled from which of the
flowing
a. Organization
b. Division
c. Unit
d. Access Group
e. Workgroup
6.
a.
b.
c.
d.

The Scripts & Styles in Harness will be of type


Rule-File-Form
Rule-File-Text
Rule-File-CSS & Rule-File-Script
Rule-File-HTML

7. Which of the following are std. skin rules

113

a.
b.
c.
d.
8.

Classic
Metal
Both
None of the above
Which of the std. validate rule defines validation for work objects when the work
object is updated.
a. Work-.OnAdd
b. Work-.Validate
c. Work-Cover-.OnAdd
9.
a.
b.
c.
d.

In an Edit Validate form, how is the property value referred in the java code
this
theValue
Value
propertyName

10. _______________ rules control how properties appear on work object forms
Correspondence, and other HTML forms, for both display & accepting User input.
(HTML Property)
11. Local Flow Actions are added to which task form?
a. Assignment
b. Utility
c. Decision
d. Connector
12. The standard privilege ------------allows a user to apply one flow action to a list of
assignments. (Work-.PerformBulk)

114

9. Decision Rules & Declarative


Rules

115

Decision rules Concepts and terms


Decision rules define computations and comparisons that cause processing to
continue along one path or another.
1. When conditions
2. Decision Tree rules
3. Decision Table rules
4. Map value rules
5. Hierarchy
6. Case Match
A when condition is an instance of Rule-Obj-When rule. This rule evaluates a
particular condition and returns true or false. This can be referenced in a pre condition
or in the Transition step of an activity.
Decision Tree is an instance of Rule-Declare-DecisionTree.Use a decision tree rule
to record if then logic that calculates a value in a table format based on rows of
property values, computations, and comparisons.Decision tree rules contain a list of
one or more input properties, and can return a property value as a result.
For example, a decision tree rule can compute and return "today's order cutoff time"
as 5 P.M. on most business days, but 2 P.M. if today is a Friday before a Monday
business holiday.
Rules of four other types can reference decision tree rules:
In a flow rule, you can reference a decision tree rule in a decision task, identified
by the Decision shape (
).
In an activity, you can evaluate a decision tree using the Property-MapDecisionTree method.
A Declare Expression rule can call a decision tree rule.
A collection rule can call a decision table rule.
Decision Table is an instance of Rule-Declare-DecisionTable. Use a decision table
to derive a value that has one of a few possible outcomes, where each outcome can be
detected by a test condition. A decision table rule lists two or more rows, each
containing test conditions and a result.
The decision table execution happens in the following way:
If any of the conditions in a row evaluate to false, processing continues with the
next row. The Actions columns and Return column for that row are ignored.

116

If all the conditions in a row evaluate to true, then the Actions and Return
columns of that row are processed. What happens next depends on the Evaluate
All Rows check box (on the Results tab).
If the Evaluate All Rows check box is not selected, processing ends and the
system returns the value in the Return column as the value of the entire rule. If
Evaluate All Rows box is selected, processing continues through all remaining
rows, performing the Actions and Return calculations for any rows for which the
conditions are all true.
If for no rows in the table do all conditions evaluate to true, the system returns a
default result.
Rules of four other types can reference decision table rules:
In a flow rule, you can reference a decision table rule in a decision task,
).
identified by the Decision shape (
In an activity, you can evaluate a decision tree using the Property-MapDecisionTable method.
A Declare Expression rule can call a decision table rule.
A collection rule can call a decision table rule.
Map Value is an instance of Rule-Obj-MapValue. Use a map value rule to convert
one or two input values (text, numbers, or dates) into a single resulting value, where
the decision criteria fit a table or matrix structure. This is a straightforward way to
present decisions and computations that depend on ranges of the input values.
Example: "If the test score falls between 91 and 100, assign a grade of A. If the test
score falls between 81 and 90, assign a B. Assign C for 71 to 80."
Cascading Map Value: Through cascading where one map value calls
another map value rules can provide an output value based on three, four, or
more inputs. One map value cell can reference another map value rule as the
source of its value. Type the word call followed by the name (the second key part)
of another map value rule with the same first key part. SmartPrompt is available.
Click the pencil icon ( ) to open the other map value rule.
Complete the Input tab before the Matrix tab. Optionally, to restrict the possible
results to one of a small known list of literal constants, complete the Results tab
before the Matrix tab.
Rules of five types can reference map value rules:
In a flow rule, you can reference a map value rule in a decision task, identified
by the Decision shape (
).
In an activity, you can evaluate a map value rule using the Property-MapValue method or Property-Map-ValuePair method.
A Declare Expression rule can call a map value rule.
A map value rule can call another map value rule.
A collection rule can call a map value rule.
117

Hierarchy: Hierarchy rules are instances of the Rule-Define-Hierarchy class. They


are part of the Decision category. Create a hierarchy rule to define relationships
among text values. Each rule can define an entire hierarchy, or a branch (subtree) of a
larger hierarchy.
At runtime, an activity can use standard functions to load the entire hierarchy,
consisting of the root rule plus all branch rules. Other standard functions can navigate
through the hierarchy to locate nodes, determine which nodes are immediate children
of a specified node, and so on.
Case Match: A case match rule (Rule-Declare-CaseMatch rule type) supports casebased reasoning. Use case match rules to compare one object (a page) to a series of
"cases" (in a Page List property), and to rank the results by closeness of fit. The rule
specifies how the case data is obtained and the criteria for matching.
A case match rule receives as input a page that becomes the source page to be
compared against a set of cases (pages).As output, the rule constructs a Code-PegaList page comprised of either a list of matches, or a single match. To evaluate a case
match rule, call one of two standard activities: baseclass.SeekFirstCase and
@baseclass.SeekCases.
Which Decision to Use at what point of time?
Decision Tree
Accepts one input property value, but can evaluate numerous properties
For business logic currently stored in written documents
Best used for complex if/then/else statements
Map Value
Can convert one or two property values into a single result
For computations based on ranges
Also for substitution of values
Decision Table
Can convert multiple property values into a range of return values
Based on same property inputs with varying values
When
Evaluates relationship among one or more
property values and returns true or false
Based on simple if/then/else constructs

118

Use the fork shape ( ) to represent a point where the flow execution chooses one of
a few different paths (connectors) based on tests on the work object. At runtime, the
system evaluates the conditions on each outgoing connector, starting with the
connector assigned the highest likelihood. The flow execution continues along the
first connector that evaluates to True.
) to reference a map value rule, decision table rule,
Use the Decision task (
decision tree rule or a Boolean expression that when evaluated produces a value that
is the basis of branching in the flow.
At runtime, the system evaluates the decision rule based on inputs from the flow and
the work object, and chooses one of the outgoing connectors based on the result. No
user interaction or input is required.
Choose a decision rule
Type: Map Value or Decision Tree or Decision Table or Boolean Expression.
Rule: Select a map value rule, identified by the second key part.

Declarative Rules:
Declarative processing: It simplifies the application and reduces the number of
activities that needs to be created. The declarative processing facilities support
operation of six rule types:

Constraints rules (Rule-Declare-Constraints rule type)


Declare Expression rules (Rule-Declare-Expressions rule type)
Declare Index rules (Rule-Declare-Index rule type)
Declare OnChange rules (Rule-Declare-OnChange rule type)
Declare Trigger rules (Rule-Declare-Trigger rule types)
Declare Pages rules (Rule-Declare-Pages rules type)

Difference Between Procedural And Declarative Program Models:


Process Commander supports both a procedural and declarative program model. In
programs that use a procedural model, the developer decides when a piece of
processing needs to happen, writes the code, and then explicitly calls it in the
appropriate
situation
to
invoke
that
processing.
In programs that support a declarative model, you define or declare what
processing to perform in a declarative rule. Process Commander automatically
invokes that rule whenever appropriate, depending on the rule type. Because the
Process Commander rules engine is change-oriented, it detects changes in property
values and uses them with rule resolution to automatically determine which rules
apply.

119

Dependency Network Analysis (DNA) :


The Declarative Network Analysis tool provides the below facilities:
Brings visibility to the path that led to a decision.
Convenient way to test varying inputs and conduct what-if analysis of rule
decisions
Provides an easy way to test rule firing within a rule network
Easily detect dependencies of other rules and the impact they have on your
application
Types of Declarative Rules:
A Declare Expression rule defines a computational relationship among properties.
For example: Area is computed as Length multiplied by Width. After a Declare
Expression rule is saved, the value of the Area property, when accessed on the
clipboard, is equal to the product of the values in the Length and Width properties.
Any change to a Length or Width value, regardless of how the change occurs, causes
immediate recompilation of the value of the Area property. This works even if the
update to Length happens indirectly.
A Constraints rule records an expected relationship between property values, such
as: ActualExpense ("December") is never greater than BudgetExpense ("December").
As with expressions, the system monitors whether the constraint is met each time
either value changes. If the constraint becomes false, the system adds a message on
the page containing the left-hand property (ActualExpense (), in this case), marking
the page as not valid. Pages that are not valid cannot be saved to the database.
A Declare Trigger rule identifies processing to occur automatically when an instance
of a specific class is saved or deleted. (An activity with an Activity Type of Trigger
performs the processing.) For example, you can maintain the total month-to-date
dollar value of new work objects with a Declare Trigger rule. Each time a new object
is resolved, the trigger rule executes; the trigger activity runs and updates the total.
(Because this processing occurs in the current user requestor, make sure that the
design saves the total in a separate object, and that locking ensures that only one user
can update the total at a time.)
A Declare OnChange rule causes computation to occur when the value of certain
"watched" properties change. This may cause more frequent updating than a Declare
Expression rule. A Declare OnChange rule starts an activity that can perform more
complex or comprehensive computations than can be defined by expressions.
A Declare Index rule creates or deletes new objects in concrete classes derived from
the Index- base class. Like other declarative rules, the rule operates automatically and
as needed. However, index objects support specific data-access needs rather than
computation. Accordingly, Declare Index rules are best designed by database

120

administrators or Process Commander developers with database experience. Unlike


the other rule types described here, Declare Index rules are part of the SysAdmin
category.
Forward chaining provides the automatic propagation of changes in one property
value to cause recompilations of another property's value. For those Declare
Expression rules with Whenever inputs change in the Calculate Value field, the
system creates an internal dependency network, identifying which properties have
values that may depend on which other properties.
For example, if the Area property depends on the Length and Width property, and the
Volume depends on the Area and Depth property, forward chaining causes the
Volume property to be recomputed each time Length, or Width, or Depth changes
value.
Backward chaining executes Declare Expression rules when a value is needed for a
property, rather than when inputs change. For example, a value may be needed
because the property appears as a source in a Property-Set method or as an input to a
computation.
Backward chaining applies to Declare Expression rules with the Calculate Value field
set to one of the following:
When used if no value present
When used, if property is missing
Whenever used
If the formula Area = Length times Width is set up for backward chaining with the
Whenever used option, then each time the system accesses the Area property for a
value the Declare Expression rule recomputed. This recompilation may occur more
often, or less often, than the inputs Length and Width change values.
Declarative Pages: Thread and Node Level pages
Page Scope defines the scope of the declarative page. There are two options to
Choose from: Thread and Node.
Thread scope pages are individually loaded and maintained in each thread that
references that page name. If a requestor has multiple threads, each thread will
have its own instance of the page. The rules used to define and load the page are
subject to rule resolution based on the loading requestors RuleSet list.
Note: Thread pages persist in the system until the requestor session that created them
ends.
Node scope pages are loaded into a common area in the PegaRULES application
server or node, and can be shared across all requestors. The rules used to define
and load the page are subject to rule resolution based on the RuleSet list defined

121

by the Access Group referenced in the Declare Pages rule, not by the RuleSet list
of individual requestors. The associated access group is defined on this tab.
Note: In a multi node system, each node has its own copy of the clipboard pages
created by this declare pages rule. For each node, the first user to reference the
declare pages rule causes the load activity to run on that node to create the page on
the clipboard.
Refreshing Declare Pages:
The first Refresh Strategy is common to all types of Declare Page types, that is
both thread and node scoped pages. Quite simply, define a period of time in Days,
Hour, Minutes, and Seconds in the appropriate fields. When the page is
referenced, this value is used to check that the page is stale. If the page is older
than the specified time, the Load Activity is executed to recreate it, otherwise, its
classed as fresh.
For Thread Scope pages, there is an additional, optional feature allowing you to
add a When rule. The When rule answers the question Is the Declare Page
fresh? When your declared page is referenced by a rule, if the When rule
evaluates as True, the Load Activity will not be executed because the page is
deemed fresh. If the When rule evaluates as False, the page is deemed stale and
the load activity will be executed.
Function Alias rules are instances of the Rule-Alias-Function class. They belong to
the Technical category. Use an alias function rule to define prompting for a function
rule for users who maintain decision rules. The alias rule provides an optional naturallanguage description and prompting that supports certain selection lists on decision
rule forms.
Complete and test the function rule itself before defining a function alias rule that
references it.
Cannot define an alias for a function rule that returns a complex Java type (that is,
a type other than a Java.lang. String type or a primitive type such as int).
Where referenced
Alias function rules are useful for functions that managers or less technical
developers may use frequently in decision tree rule, when condition rules, Declare
Expression rules, and constraints rules.
Rule Delegation:
A delegated rule is a link to a rule or data instance that provides a quick shortcut.
Click the link to open the form. For managers who use the standard WorkManager
portal, these links appear on the My Business Rules area in the Dashboard workspace.
Depending on access roles and privileges, the manager can update the entire rule form
or only fields in the leftmost tab of the rule form.

122

Developers can see rules delegated to them by


selecting View > My Rules. A rule can be
delegated to a single user, to multiple users, or
to all users who are associated with a specific
access group. You can delegate a rule to
yourself if you need frequent easy access to it.

To mark a rule as delegated, open the rule form and click the Favorites toolbar button
(

). Complete the dialog box:

1. Select My Access Group, My Personal, Other Access Groups, or Other User


Personal for the Add To value.
2. If Other Access Group or Other User Personal is selected, an additional text box
appears. Enter the other access group or Operator ID, or use the search button
to select a value.
3. Enter a text label for this rule, to appear on the My Rules list on the Dashboard
workspace. The system defaults the Short Description of the rule. Keep the Label
value short.
4. Select Open the Highest Version if the system is expected to find the rule using
the rule resolution algorithm. Select Always Open This Version box selected if
the exact version, in this exact RuleSet, is to be delegated.
5. Click OK, then click done.

Questions:
1. In a Declare-Expression rule, If I want to use an expression, which contains
expressions, function calls constants etc. Which of the following to be used.
a)
b)
c)
d)

Expressions that calls themselves and contains constants


Expressions that calls Circular expressions
Expressions that calls Rule-Utility-Function
Both a and b

2. In Rule-Declare-Expressions which of these types of computational expressions are


allowed
a) Self-referential or circular expression
b) Expression with target properties of types: Time and Password
c) Nested expression
d) Expression that references a Function rule (Rule-Utility-Function)

3. Which of the followings are true about Rule-Declare-Index?


a) Sometimes called Secondary Keys

123

b) Indexing reduces the search performance


c) Index processing automatically deletes old instance that are no longer
accurate
d) System saves indexes as instance of concrete classes derived from the Declarebase class
4. Which of the following cannot be used with declarative rules
a) Circumstances
b) Rule Resolution
c) Backward Chaining
d) Forward Chaining
5. If I want to do a operation on the Saving or Updation of the database, which of the
following rule to use
a) Data-Declare-Expression rule
b) Data-Declare-Constraints rule
c) Data-Declare-Trigger rule
d) Data-Declare-CaseMatch
e) Both a and b
6. Which of the following decision corresponds to IF-THEN ELSE statements?
a) Decision Tree
b) Decision Table
c) Hierarchy Rules
d) When conditions
7. Through cascading (where one rule calls another), this rule can provide an output
based on three, four or more inputs.
a) When Condition
b) Decision Tree
c) Map value
d) When Directive
8. What is the purpose of Allowed to take actions in the results tab of a decision tree?
a) A decision tree can be called if this option is checked.
b) A decision table can be called if this option is checked.
c) The value for a property can be set.
d) The value for constants can only be changed.
9. Is it possible to call a decision table using this function DecisionTable.ObtainValue ()
Yes
10. Which of the following decision rules can be used to conditionalize a segment of
HTML or XML stream processing?
a) Decision Tree
b) Map value

124

c) When directives
d) Decision Table
11. Which of the following returns a boolean value?
a) When rule
b) Decision tree
c) Decision table
d) Decision Map
12. Examination questions if answered 90-100 Grade A, 70-90 Grade B, 50 -70
Grade C. What are the possible rules which can be used to achieve this?
a) Decision Table
b) Map value
c) When
d) Declarative Expression

13. ______________ Shape in flow can be used to call a Map value.


Ans: Decision

125

10. Rule Management/Security

126

RuleSets and Versions


A Rule is a named business object that defines behavior of part of an application.
There are two parts in a Ruleset
Ruleset Name
Ruleset Version
A RuleSet name is an instance of the Rule-RuleSet-Name rule type. RuleSet name is
a major aspect in:
Access control
Grouping interrelated rules
Managing the rules
Moving applications - sets of rules - from one Process Commander System
another.
The Rule-.pyRuleSet property, present in every rule instance, records the RuleSet
name to which the instance belongs
Process Commander consists of six standard RuleSets:
RuleSet Name
Description
Pega-AppDefinition Standard rules supporting Direct Capture of Objectives
features
Standard rules that support business process management
Pega-ProCom
(BPM) applications
Standard rules that support integration
Pega-IntSvcs
Standard rules that support the portal infrastructure
Pega-WB
Standard rules that support business rules engine and rule
Pega-RULES
resolution
CheckInCandidates Optional. Empty, used by rule check-in processing.
Version 01-01-01 is not locked.
Naming Conventions of a Ruleset
The following conventions represent best practice when naming RuleSet rules:
RuleSet names cannot exceed 64 characters. For ease of management, use names
that are short and easy to remember.
Always begin a RuleSet name with a prefix that uniquely identifies your company
and the business purpose. This convention also prevents potential RuleSet
collisions at a customer site.

127

Do not use Pega or Pega- as a prefix for your RuleSet names. This usage is
restricted for use by Pegasystems and can cause unexpected behavior.

For legibility, use single-word names with significant letters in uppercase (also
referred to as title case). For example, CandyOrders is easier to read than
candyorders.
Avoid using special characters such as dashes (-), underscores (_), plus signs (+),
or quotation marks (").
Use names that make sense, avoiding obscure acronyms. A name should clearly
describe the RuleSet. For example, QuadStateMortgage is better than QSGMLS
(as an acronym for Quad State Group Mortgage Loan System).
For a test RuleSet, use a name that contains Test or Sample.
A RuleSet version is the process of assigning unique version numbers A RuleSet
version is an instance of the Rule-RuleSet-Version rule type.
The version number in the form NN-NN-NN, defines six digits in three groups that
characterize the evolution and development of a rule instance, and of the application
it belongs with. The three segments are known as the major version, minor version,
and patch version.
In every rule instance, the pyRuleSetVersion property records the version number
(without the name and colon) of that rule.
A few rule types are not versioned:
Application
Class Has a version for File > Export and migration purposes only.
RuleSet
RuleSet Version
Access of Role to Object
Access Deny
Library

Rule Resolution
Rule resolution is the sophisticated internal search algorithm that the system uses to
find the best or most appropriate rule instance to apply in a situation. Rule resolution
applies to most, but not all, classes derived from the Rule- base class.
Rule resolution does not apply to instances of classes derived from the Work-, Data-,
or any other base class.

128

While the rule resolution algorithm is fast and invisible, it is important to understand
how it operates. As you create applications, make your choices of values for key parts
based on how you want rules to be found by rule resolution.

Benefits:
Rules can be shared across applications and organizations. Sharing and reuse is a
major benefit of object-oriented software.
Rules defined at a higher level can be overridden by more specific rules defined at a
lower level. While this dilutes the sharing benefit, it provides often-needed flexibility
while bringing visibility to exceptions.
Rules can have multiple versions, even within one RuleSet, and security rules control
which users see and execute which versions. This facilitates application evolution,
testing, and patching.
One Process Commander system can host multiple applications, multiple
organizations, and multiple versions of one application with minimal concern for
conflicts and interference.
Applications can be developed independently from other applications, yet all can
depend on common rules that are locked (and so won't change)
Rule resolution uses as input values:

The name of the rule needed (one or more key parts)


A starting location in the class hierarchy, often determined by context
Your RuleSet list
The current date and time, which may cause time-qualified rules to take
precedence
Circumstance property and value
The value of the as-of date property
When to use directed inheritance and when to use pattern inheritance

129

How the system finds rules through rule resolution:

Different Phase
Phase 0 (Purpose)
Phase 1 (Product)
Phase 2 (User)
Phase 3 (Timing)
Phase 4 (Customer)
Phase 5 (Security)

Description
Match rule type and name
Search up the class hierarchy as necessary
Filter by RuleSet list and availability
Filter based on date and time
Qualify on Circumstance
Enforce Access Roles and Privileges

Execute the survivor rule


If no rule instances survive the above five phases, the user process is notified of
the "no rule found" condition. If only one rule instance survives, it selected and
executes. If more than one is found, the one lowest in the class hierarchy
closest to the Applies To class is performed.
Execution of one rule may naturally call for other rules to be found and executed.
The same rule resolution search process finds each of the referenced rules.

130

RuleSet Locking:

Select to lock this RuleSet version. If selected, no one can save new rule instances to
this RuleSet version, or update or delete existing instances.
Clear this box to allow developers to save rules associated with this RuleSet version.
You may be prompted for a password upon saving.
Important Points:
Changes made to this box take effect immediately after you save the Version
form, except for rules that a user has open at that moment or that a user has
checked out from this version.
Locking a RuleSet version does not prevent later changes to class rules in the
RuleSet, as a class belongs to a RuleSet but not to a version. To prohibit changes
to class rules, complete the Security tab of the RuleSet form.
As a best practice, compile each library that contains functions in this RuleSet
version once more before locking the version. If a needed function fails to
compile, you won't be able to correct the function rule later, without unlocking the
version.
As a best practice, lock a RuleSet version only at a time when no rules are
checked out from that version. To confirm this, select View > Rules > All
Checkouts by RuleSet, Version and scan the resulting report for rules from this
RuleSet.
131

Reusability and Specialization


Reusability is the ability for PRPC to share the same instance of a rule, RuleSet,
and/or service so that it can be reused by other portions of the same application and/or
other applications.
Some examples of reuse that we see in PRPC are:
The Add activity defined at Work- that can be can be reused by many applications
as-is without customization
Utility functions that are defined in a shared RuleSet so that they can be reused by
multiple applications
Activities and flows that are defined at a generic application layer of a class
hierarchy so that they can be used without customization by implementation of
that application
The PRPC recommended class structure design pattern offers flexibility in your
design and provides for more levels of reuse. There are four distinct layers in the
PRPC best practice class structure design pattern:
PRPC Shared Product: The PRPC Shared Product represents the out-of-the-box
Process Commander classes such as Work-, Work-Object-, Work-Folder-, WorkCover-, and Data Enterprise Shared Product Layer: The Enterprise Shared Product Layer is a
library of extensions to the PRPC base functionality. You should always include
this layer. It is rare, but this layer may be omitted in some very small one-off
applications.
Generalized Application Layer: The Generalized Application Layer represents
a generic base application to use as a framework for application instances. Here
you will define most of the rules for your base application.
Organizational and Specialized Application Layer: The Organizational and
Specialized Application Layer represents an organizational application instance.
Specialization, on the other hand, is the ability for PRPC to differentiate a
component and/or some portion of that component based on some characteristic for
use within or across applications. These components could be a single rule or many
different rules based on specific criteria. Some common specialization characteristics
are:
Locale Rules that will differ by state and/or country
Business line Rules that differ by business line, such as personal and
commercial lines
Product lines Rules that differ by product, such as mortgage products that offer
fixed versus adjustable-rate mortgages
Client Rules that differ by client, such as MyCo and YourCo. This is common
in ASP models where different clients will have different rules

132

Date Rules that differ depending on the current date or the submission date of a
loan or policy.
Personal RuleSet:
The private RuleSet is sometimes called the personal RuleSet.
Users who have the Allow Rule Check Out? Check box (on their Operator ID
instance) selected can place copies of rule instances into a private RuleSet. The name
of this RuleSet is the same as their Operator ID, such as john_sawyer@abc.com.
The system creates a private RuleSet automatically when needed.
No instance of the Rule-RuleSet-Name class exists for a private RuleSet.
Private RuleSets are used in with check-in and check-out, part of the rule
management facility. When an application developer checks out a rule, it enters his
private RuleSet.
A private RuleSet is always topmost in a user's RuleSet list. Rules in a private
RuleSet are never executed by other users.
As you develop rules, a memory cache similar to, but separate from, the rule cache
contains rules in your private RuleSet. The maximum size of this cache (for all
developers combined) is determined by elements in the fua node of the prconfig.xml
file.
On the requestor page, the standard property pxRequestor.pxSecuritySnapshot.
pxPersonalRuleSetName identifies the private RuleSet; if this is blank, the requestor
cannot check out rules.
Application Rule
An application rule defines a set of RuleSet versions to be added as a unit to a user's
RuleSet list. An application rule is an instance of the Rule-Application rule type,
which is part of the Security category
In some situations, your application RuleSets may include rules that you do not
consider part of the application, or may exclude others you expect.
The application RuleSets does not include your private RuleSet, which contains
rules checked out to you
The application RuleSet does not include rules in RuleSets listed in the Production
RuleSets array of the Access tab.

133

Rules from RuleSet versions listed in the Requestor Type data instance,
Organization data instance, or Division data instance are not included unless these
RuleSets also appear in the application rule.
Ordering of RuleSets in Application Rules:
Order
1st

2nd
3rd
4th

5th

RuleSet Type
Personal RuleSets

Production
RuleSets
Application
RuleSets
Pega Rule Sets

Pega-RULES
RuleSet

Description
The RuleSet that contains rules that are
checked out to a user. Rule resolution
automatically checks this RuleSet first.
RuleSets that are unlocked to allow rule
changes.
RuleSets that are deployed in a production
system; they are usually locked.
1. Pega-ProCom
2. Pega-IntSvcs
3. Pega-WB
Pega-RULES

Note:
This is a collection of RuleSets, not a collection of RuleSet versions
An operator's full RuleSet list in contrast to the Application RuleSets list is
an ordered list of RuleSet versions not RuleSets. Your RuleSet list often
contains additional RuleSets not present on the Application RuleSets list.

The RuleSet list is an internal data structure that the system uses to determine which
rule instances that a requestor can execute. Click the link containing your name at the
top of the navigation panel to review your RuleSet list, presented on the profile
display.
How a RuleSet list is compiled?
Your RuleSet list is assembled bottom-up
The RuleSet list has file sub-lists in two layers

134

A completed RuleSet list contains up to five sub-lists of RuleSet versions,


arranged in two layers. Order is significant at the layer, sub-list level, and within
each sub-list:

The top layer contains one sub-list, of override RuleSet versions (if any). This
sub-list is assembled from those listed in the Override RuleSets area of the
Advanced tab of an application rule that is directly referenced by an access
group listed in one of the five data instances described below in this topic.
(The contents of the Override area of application rules referenced through the
Built on Application field are ignored.) At runtime, rules found by rule
resolution among the RuleSet versions in the top layer supercede all rules
located anywhere in the second layer, unless the rule found in the second layer
has an availability of Final.

The second (bottom) layer may contain four sub-lists: one private RuleSet,
application RuleSet Versions, shared and component RuleSet Versions, and
the locked Pega- RuleSet Versions that define Process Commander.
Note:
Don't confuse the RuleSet list with application RuleSets, a subset of the RuleSet
list relevant to developers who are using the Application Explorer and other
developer tools. The RuleSet list is an ordered set of RuleSet versions. The
application RuleSet is a collection of RuleSets, with no versions.
The standard function rule IsInRuleSetList(RuleSet) tests whether a RuleSet is
included in your own current RuleSet list.

Multivariate Circumstancing
A circumstance is an optional qualification available for all rules. Using a
circumstance allows your application to support multiple variants of a rule. For
example, variations of an ordinary rule instance can be created for different customer
status levels or for different geographic locations.
Circumstance qualified rules
A circumstance-qualified rule instance (often referred to as a "circumstanced
rule") is always based upon an unqualified rule instance (base rule). You can
circumstance a base rule with a single property and its value, or with multiple
properties and their values (called multivariate circumstancing). The
circumstanced rule is selected by rule resolution if the value of the circumstance
property on the rule matches that property's value on the clipboard at runtime.
icon identifies a circumstance-qualified rule instance. A
On many displays, an
icon identifies a base rule instance that has one or more circumstanced
instances. The rule form for a circumstance-qualified rule displays the property

135

and its value next to the Circumstance label located in the top right area of the
form
If you use a single circumstance property, you define the property name and its value
directly in the Save As form. If you use multivariate circumstancing, there are two
rules in the Save As form:
Circumstance Templates (Rule-Circumstance-Template rule type)
Circumstance Definitions (Rule-Circumstance-Definition rule type)
Multivariate circumstancing enable you to specialize a rule by more than one feature.
For example, an insurance company may be required to collect, for every state, claims
that exceed a specific amount and the method by which the claims were conveyed
(letter, phone, email, and so on). Another example may be the need for a rule that is
specialized by an age range and not an absolute value.
Note:
1. Circumstances are available only for certain rule types those with the Allow
Selection based on Property Rules? box selected on the Class form defining the
rule type. As of Version 5.4, you can circumstance-qualify Declare-Constraints,
Declare-Expression, and Declare-OnChange rules.
2. You cannot use circumstances with a final rule
3. If a circumstance-qualified stream rule contains JSP tags (rather than directives),
the base rule must also contain JSP tags rather than directives. Conversely, if the
time-qualified rule contains directives, the base rule must contain directives.
4. If two rules with the same Applies To key part and family name are both
unqualified and each has one or more associated property circumstance-qualified
rules, the same circumstance property must be used. For example, if activity
MyClass. Alpha has an associated circumstance-qualified rule using property
.State, then another activity MyClass. Alpha cannot have a circumstance rule with
any property other than .State.
Database software supporting your Process Commander system limits the number of
columns that can occur in any database table. When creating a Circumstance
Definition rule, you may not exceed this limit.
In releases before V5.2, circumstance-qualified rules with a RuleSet version number
lower than the RuleSet version of a base rule were ignored (never selected) during
rule resolution. Starting with version V5.2, this is not the default rule resolution
behavior: you can copy a base rule to a higher version without the need to also copy
each of the (possibly many) qualified rules associated with the base rule into that
higher version. If desired, you can revert in specific cases to pre-5.2 behavior by

136

selecting the Base Rule check box on the form produced by the Availability toolbar
button (

).

Use the Circumstance Property Issues report (a link in the Rule Reports area of the
Monitor Activity slice) to identify single circumstance-qualified rules that incorrectly
use two or more different properties. Such conflicts can arise when rules are imported
into a RuleSet that already contains some circumstanced rules.

Access Groups
Access groups bind the many aspects of an application. In addition, they determine
which applications and which parts of those applications users can access.
An access group is an instance of the Data-Admin-Operator-AccessGroup class.
Access groups make a set of RuleSet versions available to requestors.
Developers define access groups and associate an access group with each user (each
Data-Admin-Operator-ID instance). Typically, multiple users are associated with or
belong to one access group.
An access group is associated with a user (or other requestor) through the Operator ID
data instance. The access group determines:
Their portal layout
Which work pools are available
The types of work objects they can enter
Which RuleSets appear at the top of their RuleSet list
Which access roles and privileges they hold
The initially displayed RuleSet and version for rules they create with New or Save
As.
The system uses access groups identified in up to four data instances to assemble a
user's RuleSet list during sign-on:
Operator ID
Organization
Division
Requestor type
When referenced in the following, access groups determine the RuleSets and
Versions available to external systems when they request services from a Process
Commander application.
Service package data instances
Listener data instances
Service rules

137

Various sections in an access group instance and their functions


1. Access Group form completing the Layout tab

Complete this tab to identify the class groups, RuleSets, and access roles available to
the Operator IDs or requestors that reference this access group.
Field

Description

Application Fields
To update this RuleSet Name rule, a user enters the same
Name
password in this field as the one you specify in the field of the
same name in the Define Passwords section above.

Version

(Leave blank in legacy configurations only.)


Identify the second key part of an application rule.

Work Pools array


Optional. List all class groups for work pools in which users
Work Pools
associated with this access group are permitted to enter new
work objects. Each class group defines a work pool, a named
collection of work types
Leave blank if users associated with this work object do not
enter new work.
Roles Array
Roles

Identify one or more access roles (Rule-Access-Role-Name


rule type) that members of this access group are to acquire at
login, in addition to access roles they may acquire from other
sources.
For a development Process Commander system, commonly
assigned access role names are the three standards:

138

For a worker, use PegaRULES:User4


For a work manager, use PegaRULES:WorkMgr4
For all developers, use PegaRULES:SysAdm4
Enter an access role that is consistent with the value you
entered in the Default Portal Layout field in the Settings tab.
Order is not significant; the access roles available to a user act
as a collection of capabilities granted, not a hierarchy.
Production RuleSets array
Optional. Enter the RuleSets and Versions specific to this
Production
access group.
RuleSets
Leave blank except for developers and others who modify
rules
Optional. Enter the RuleSets and Versions specific to this
access group.
At login, the system appends these entries to the top of your
RuleSet list, but starting at the bottom of this array. The order
of rows in this array becomes the order they appear in the
RuleSet list.

2. Access Group form completing the Setting tab

139

Use this tab to define the home directory, portal layout, and other capabilities for
users or other requestors who reference this access group.
Field
Login Setting
Default Portal
layout

Description

Identify a portal rule to indicate which portal presentation


supports those requestors who reference this access group.
Click the pencil icon () to open the portal rule
Select a portal layout that works with the Roles array on the
Access tab. Typical choices referencing standard portal rules
are:
For a worker, select the traditional portal WorkUser or
composite portal User. For a manager, select the traditional
portal WorkManager, or composite portal Manager.

For all developers, select Developer.


* The Developer portal is designed to support application
developers who have the PegaRULES:SysAdm4 access role.
Do not choose Developer unless PegaRULES: SysAdm4
appears in the Roles array on the Access tab and Allow rule
check out? is selected on the Security tab.
Authentication Enter a number of seconds after which the system challenges
timeout (secs) idle browser sessions (for users of this access group), asking
users to re-enter their Operator ID and password. This timeout
event does not cause session context or clipboard contents to
be lost.
Note:
Typically, set the authentication timeout value in this field to a
period that is much shorter than the requestor timeout set in
the timeout/browser value in the prconfig.xml file. See
timeouts.
Through a prconfig.xml setting, you can disable the
authentication challenge that normally appears after this timeout occurs:
<env
name="Initialization/noAuthenticateOnActivate"
value="true" />

HTTP/HTTPS

The default setting is false.


Typically, accept the default of /webwb. Directories within

140

this directory hold important static XML forms, JavaScripts,


Home
style sheets, and images.
directory
Secondary Portal Layouts
Portal Layout Optional. For developers, you can define alternative layouts,
to allow them to quickly switch between layouts; this is useful
in debugging. Enter the name of a portal rule to make an
additional portal presentation available to this user.

Local
Customization

As a best practice, if the Default Portal Layout field identifies


a traditional portal, leave this array blank or list only other
traditional portals here. Similarly, if the Default Portal Layout
field identifies a composite portal, leave this array blank or list
only other composite portals here. Do not mix the two kinds of
portals.
Leave these fields blank for an access group that supports
logging on to Process Commander from external systems, or
that supports workers or managers who never create rules.
RuleSet
Select a RuleSet from those listed in the Production RuleSets
array on the Access tab, or from those listed in application
rules referenced on that tab, that the system suggests as a
destination RuleSet when users associated with this access
groups create a rule.
If this access group is to support application developers
users who can create rules select a RuleSet that the
developers usually work in and add rules to.
For managers who are to customize reports, select a
RuleSet that is not intended to be moved to other Process
Commander systems.
For language specialists involved in internationalization,
select a language-specific RuleSet.
Version
Optional; required if RuleSet is not blank.

3. Access Group form completing the Setting tab

141

Use this read-only tab to review or quickly access Operator ID instances that
reference this access group.
Field

Description

Application Fields
Full Name Full name of an operator, from the Operator Full Name field
on the Operator tab of the Operator ID form. Click to open the
Operator ID form.
Key of an Operator ID instance that references this access
Operator
group on the Operator tab of the Operator ID form. Click to
ID
open the Operator ID form.
When first installed, your system contains the following access groups, each linked to
the standard application rule PegaRULES.05.05.01.
Name
PegaRULES:Administrators
PegaRULES:Agents

Purpose
For developers, users of the Developer portal.
For all Batch requestors. Supports all agents,
listeners, and services, including the PegaProCom agent, which enforces service level
rules. Update this access group to reference
any application RuleSet Versions that contain
service level rules.
For JSR-168-compliant portlet access.
PegaRULES:PortalUsers
PegaRULES:Unauthenticated For guest users. If your organization
implements
the
optional
password
management facility, update this access group
to make the restrictions of the PegaPwdControl
RuleSet apply during login.
PegaRULES:WorkManagers For managers. This is a sample; create access
groups for managers that provide access to the
portal, RuleSets, and privileges appropriate to
their needs.
For users who are not managers. This is a
PegaRULES:WorkUsers
sample; create access groups for managers that
provide access to the portal, RuleSets, and
privileges appropriate to their needs.

142

Deprecated access groups


These are retained to support applications created in Version 4.2 systems. They are
deprecated and not recommended for continued use.
Name
Purpose
PegaRULES:ProcessArchitects Deprecated. Use PegaRULES:Administrators.
PegaRULES:SystemArchitects Deprecated. Use PegaRULES:Administrators

Security
Rule types and data classes are organized into categories as a learning and navigation
aid. The Security category contains seven rule types and four data classes respectively

Rule types
Access Deny
Access of Role to Object
Access Role
Access When
Attachment Category
Privilege
Setting

Data classes
Access Group
Application ID
Keystore
WS Security Profile

1. Access Deny rules

Access Deny rules are instances of the Rule-Access-Deny-Obj rule type


Use an Access Deny rule to restrict users who have a specified access role
from accessing instances of specific classes under certain conditions.

Denial of access to the class can depend on the production level value (1 to
5) of your system or whether certain Access When rules evaluate to true.
By default, Process Commander denies all access to a class except when
explicitly granted by an Access of Role to Object rule.

2. Access of Role to Object

Access of Role to Object rules are instances of the Rule-Access-Role-Obj


class.
Create or modify an Access of Role to Object rule for each class on which
you want to set new or additional access permissions based on access role
(Rule-Access-Role-Name rule type).
To specify new or different access to a class than provided by standard
Access of Role to Object rules, create an access role (Rule-Access-Role-

143

Name rule type) and then create an Access of Role to Object rule for the
appropriate classes.
3. Access Role

Access Role Name rules are instances of the Rule-Access-Role-Name class.


An access role rule defines a name for a role, and represents a set of
capabilities. To deliver the capabilities to users, you reference the access role
name in other rule types to assign the access role to users and to provide, or
restrict, access to certain classes.
Create access role names using the format application name: role name,
where application name is the name of your application and role name is the
name of a role that uses the application.
Access role names form the first key part of Access of Role to Object rules
(Rule-Access-Role-Obj rule type) and Access Deny Obj rules (Rule-AccessDeny-Obj rule type).
Access roles are conveyed to users through access groups.

4. Access When
Access When rules are instances of the Rule-Access-When class.
An Access When rule defines a test that the system performs to allow, or
disallow, a requestor to perform an operation on an instance of a specific
class.
You can reference Access When rules in Access of Role to Object rules and
Access Deny rules, as an alternative to a system production level number.
Don't confuse the Rule-Access-When rule type referenced only to control
user access to a class with the more widely used Rule-Obj-When rule
type. The forms are similar, but the purpose and references are different.
Note:
1. For each of the eight categories in the array, you can enter an Access When
rule name, or a numeric value between 0 and 5.
2. Enter 0 or leave blank to prohibit all access. Enter a value between 1 and 5 to
provide access. If, at runtime, the production level of your Process
Commander system is not greater than the numeric value, then users with the
specified access role can perform the operation (on objects of that class). If an
Access When rule evaluates to True at runtime, the users with the specified
access role can perform the operation.
5. Attachment Category
a. Attachment Category are instances of the Rule-Obj-AttachmentCategory rule
type.

144

b. Define an attachment category rule in your application to control the security


of attachments on a work object. The rule restricts operations that can be
performed including create, edit, review, or delete. Access can depend on
none, one, or all of these factors:
Privileges Held by the operator (or other requestor)
When rules Runtime true-false tests
Attachment type File, note, screen shot, scanned document, or URL
Work group To which the operator belongs
c. Attachment category rules are referenced by the standard activities Work.ProcessAddMultipleAttachments, Work-.AttachConvertedPDF, and Work.ActionAddAttachment plus these standard flow actions (typically used as
local actions):
Work-.AddAttachment
Work-.AddAttachmentFromMail
Work-.AddMultipleAttachments
Work-.AttachAFile
Work-.AttachANote
Work-.AttachAScreenShot
Work-.AttachAURL
Work-.ConvertAttachmentToPDF
Work-.EditAttachments
Work-.AttachFromScanner
Work-.AttachAScannedDocument
Work-.EditCategorizedAttachments
6. Privilege
a. A privilege rule is an instance of a Rule-Access-Privilege rule type.
b. Privileges complement the security and access control features provided by
access roles and RuleSet lists, by restricting access to specific rules rather than
to entire classes or RuleSet versions.
c. Use privileges to differentiate the capabilities of different groups of users
within your application.
d. As users (or other requestors) work with your application, the system
compares the privileges they hold with the privileges required. Users who
hold any of the privileges listed may use the rule.
e. To convey privileges to a requestor, associate the privileges with access roles.
Every requestor holds one or more access roles, identified in the access group
referenced in the Operator ID data instance.

145

f. To require privileges for use of a rule, reference privileges in that rule within
your application. This option is available for selected rule types only
d. After a privilege is defined, you can associate it with specific rules in eight
rule types. One type conveys access and seven types restrict access:
1. Activities To limit use of the rule to users who hold a privilege
2. Attachment category rules To limit operations that can be performed
on an attachment
3. Correspondence To limit use of the rule to users who hold a privilege
4. Flows To limit starting the flow to users who hold a privilege
5. Flow actions To limit selection of the action to users who hold a
privilege
6. List view rules To limit which users can produce the list view report
7. Summary view rules To limit which users can produce the summary
view report or chart
8. The association between access roles and privileges is defined by
instances of the Rule-Access-Role-Obj rule type.
e. Access of Role to Object rules To convey privileges to those users who
hold an access role
7. Setting rules

Access Setting rules are instances of the Rule-Access-Setting class

Use a setting rule to define a name and data type for a setting that your
application's activities can use for finely tuned access control. You assign
values to a setting when you reference it in Access of Role to Object rules
for various class/role combinations. This lets you specify different access to
certain capabilities for different access roles based on the value of a setting.

8. Keystore

A keystore is a file that contains encryption keys. You can attach a keystore
file to a data instance of the class Data-Admin-Security-Keystore, to support
Web
Services
Security.

9. WS Security Profile

The Data-Admin-Security-WSSecurityProfile class contains WS Security


Profile data instances.

146

Enable Web Services Security (WS-Security) on a SOAP connection to


securely move messages to and from your application. Once enabled, any
SOAP message moving through a connection will do so securely

Authentication
Authentication is the process of determining the identity of a user or other requestor.
Process Commander authenticates users by matching submitted user names and
passwords to those that are stored in Operator ID instances. If the submitted user
credentials match those in an Operator ID, the user is authenticated. A requestor or
user who is not authenticated is known as a guest.
Process Commander supports several types (or schemes) of authentication:
PRBasic Based on passwords in Operator ID data instances and the log-in
form (defined by the HTML rule @baseclass. Web-Login, which your application
can override).
PRSecuredBasic Similar to PRBasic but passes credentials using Secure
Sockets Layer (SSL) using Basic HTTP authentication The log-in form is defined
by the HTML rule @baseclass.Web-Login-SecuredBasic, which your application
can override.
PRCustom Supports access to an external LDAP directory or a custom
authentication scheme.
PRExtAssign Supports external assignments (Directed Web Access).
J2EEContext specifies that the application server in which Process
Commander is deployed use JAAS to authenticate users.

Authorization
Authorization, on the other hand, defines the realm of actions that you are allowed to
perform, and the data and resources you are allowed to access.
Authorization follows authentication (i.e., you must first prove who you are before
the system can determine the list of actions you're authorized to perform and the
resources you are authorized to access).

Enterprise Class Structure


Security and Encryption

147

Questions:
1. What is the purpose of locking a RuleSet version?
a) To restrict the access of rules belonging to the RuleSet version
b) To activate the export feature
c) To restrict new instances being added to the RuleSet version
d) To restrict the creation of new RuleSet versions for the RuleSet
2. The best way to create a new Major RuleSet version is to use:
a) Export Rules
b) Load Rules
c) Skim Rules
3. RuleSet versions consist of 3 separate numbers:
a) Patch-Major-Minor
b) Minor-Patch-Major
c) Major-Minor-Patch
d) Minor-Patch-Major-SubMajor
4. Which of the statements below is NOT one of the main purposes of a Rule set?
a) To act as a container for rules.
b) To facilitate migration & shipping (application deployment).
c) To play an important role in rule resolution.
d) To define security for rules

5. Which of the following can be used to implement security?:


a. When Rules
b. Access Groups
c. Requestor Types
d. All of the Above
e. None of the above
6. Access Roles
a. Are used only in defining Work Parties
b. Control the workpools that you can access
c. Represent a persons authority level relative to part of the work process
d. Are seldom required since you can simply use the ones that come with
PRPC
7. Which defines the work portal and application access for a group of people tat
perform the same job function?
a) Organization

148

b) Division
c) Unit
d) Access group
8. An Access group is associated with a user through the _______ data instance.
(operator id)
9. Access group is not referenced in the following rule(s)
a) Requestor type
b) Unit
c) Operator ID
d) Work Group
10. Access Groups control (Choose 3)
a. Access Role
b. Password
c. Portal Layout
d. WorkPools
e. Operator ID
11. Users of the PegaRULES Process Commander system are defined by:
a. access groups, access roles and operatorIDs
b. access groups, security groups and operatorIDs
c. a user class
d. security groups and access roles
12. The Ruleset list is assembled in which of the following order
a. Alphabetical
b. Chronological
c. Generalized followed by Specialized ruleset
d. Specialized followed by Generalized ruleset
13. The Circumstance feature is defined by:
a. Circumstance Property and Circumstance Level
b. Circumstance Value and Circumstance Level
c. Circumstance Property and Circumstance Value
14. Declarative rules such as Rule-Declare-Expressions and Rule-Declare-Constraints
can be specialized using circumstances. (TRUE/FALSE)
15. Rule resolution applies to all the classes that are derived from Rule- base class.
(True/False)
16. Rule resolution dynamically selects the right rule by searching your profile RuleSet
list across multiple dimensions, including purpose, class, ruleset and version, date and
time range, circumstance and security. (YES/NO)

149

11. Integration

150

Services:
A service receives input from an external system and can respond in some way. For
example, a service can reply with data that the external system requested and it can
process the incoming data to determine that it needs to create a work object and
initiate a workflow.
The following is a high-level description of how a service works:
An external client or system assembles and delivers a message or request to a
Process Commander Service. The message identifies the service package that
contains the service rule or method to invoke.
The service package locates a service rule.
The service rule, in turn, invokes the appropriate rules to map the incoming
parameters to Process Commander Properties.
The service rule invokes an activity. The activity processes the input
Properties and completes the task of the service. As mentioned, perhaps the
service extracts data from the Process Commander database or delivers a work
item to Process Commander. The data mapping for the service rule then maps
appropriate values into output properties.
The service assembles a response message from the output properties and sends
the response.

151

The Process Commander services are based on industry-standard technologies.


Process Commander provides the following standard types of services:
1. EJB service rules expose functions in a Process Commander application as
though they were methods of an Enterprise JavaBean.
2. JSR 94 service rules receive and respond to requests from external applications
through JSR 94 invocations. A JSR 94 service is used when a part or all of a
Process Commander application is embedded in another Java-based application.
3. Java service rules expose functions in a Process Commander application as
though they were public methods of a Java class.
4. SOAP service rules provide Web services to SOAP (Simple Object Access
Protocol) clients.
5. .NET service rules provide Web services to Microsoft .NET clients (external
systems based on the Microsoft .NET Framework).
6. HTTP service rules process and respond to HTTP requests that contain XML or
other string data (text) or HTML POST data. Use HTTP rules when you want to
send XML or string data using a messaging protocol like SOAP.
7. JMS service rules respond to messages sent by Java Message Service clients to a
queue or topic. JMS services read messages from the queue or topic.
8. MQ service rules accept WebSphere MQ (formerly called IBM MQSeries)
messages from external systems and respond to them.
9. Portlet service rules provide the mechanism for displaying Process Commander
features and functions in JSR 168-compliant portlets that are displayed by JSR
168-compliant portal servers. Defined by the Java Community Process, JSR 168
describes a set of Portlet APIs.
10. BPEL service rules act as a container for the SOAP services and connectors that
communicate with the same external Business Process Execution Language
(BPEL) application when the external BPEL application starts a Process
Commander flow.
11. E-mail service rules import and evaluate e-mail messages, including their headers
and attachments.
12. File service rules evaluate the contents of files that are stored outside of Process
Commander.
13. COM service rules support the creation of a custom Windows ActiveX control
that you can integrate with external (desktop or server) Windows applications by
using Microsoft Visual Studio or similar Windows development tools. The
ActiveX control interacts with other parts of the Windows application using
Microsoft Component Object Model (COM) protocols.
14. CORBA service rules let external clients request services of Process Commander
through an Object Request Broker (ORB) that implements the Object
Management Group Common Request Broker Architecture (CORBA) standard.
Process Commander can automatically generate an Interface Definition Language
(IDL) file.

152

15. SnapStart is a lightweight data import facility that conveys data from one
desktop application into Process Commander under the control of a user. Building
a SnapStart interface requires skills in creating HTML forms and writing short
activities. Unlike the other services, the SnapStart service does not rely on a
subclass of Rule-Service.
Service Package: A service begins with a service package data object. A service
package is similar to a container class. A service package represents the service as an
application and the service rules represent individual functions or methods in that
application.
Instance of Data-Admin-ServicePackage
Our SOAP service rules are placed in this package.
The service package has global configuration settings for all the services that belong
to it:
The access group that the service rules use when they run as unauthenticated
users. The service rules must belong to one of the RuleSets listed in the access
group.
Whether the services must run as authenticated users. If so, the incoming message
from the external client application must include the name and password of a
valid Process Commander operator.
Configuration information about the requestor pool when the service rules run as
unauthenticated users and session state is stateless.
Whether the service is stateless or not.
If the service is stateful specify whether to keep the requestor session
open and when to close it in the service rules.
If the service is stateless, the End Requestor option in the service rule does
not apply.
For SOAP, dotNet, BPEL, EJB, Java, Portlet, COM, and CORBA services, use
the service package form to generate deployment files. Process Commander translates
the functions and processing provided by the service rules in that service package into
the appropriate kind of deployment component for a service of that type.

153

154

Service Rule: The service itself is defined by an instance of the appropriate RuleService- subclass. The service rule handles the details for this kind of request; that is,
the service rule maps the input parameters into clipboard properties and then calls an
activity to process the request.
The service rule holds the following types of information:
Class of the primary clipboard page that the service uses
Name of the primary clipboard page that the service uses
Name of the service activity
Information about whether to keep the requestor session open or to close it after
the service rule is finished.
Information about recognizing and reporting exceptions
The list of input and output parameters, their data types, and how their values are
mapped to and from clipboard pages.
A service rule has three key parts:
Name of the service package. The service package must exist before you can
create the service rule.

155

Name of the service class. This name is a string; it is not an instance of Rule-ObjClass. The service package name and service class name are used to group service
rules.
Name of the service method. This name is a string; it is not an instance of RuleMethod. The service method name describes what the service rule does. This is
the only key for an email service rule.
An incoming message must identify the service by specifying all three parts of the
name (package, class, and method) in the message.

156

A service activity evaluates the property values that are stored on clipboard pages
and takes an action. When creating a service rule, designate the service activity by
entering its name in the Activity Name field on the Service tab of the service rule.

Connectors are the mechanism that Process Commander uses to send messages to or
make requests of external systems and then process the results or response.
The following is a high-level description of how connectors work:
A work object triggers an Integrator task in a flow.
The Integrator task calls the connector activity and passes it the appropriate
properties from the clipboard.
The activity calls the connector.
The connector assembles and sends a message or request to the external
system.
The external system replies to the connector with the data the connector
Requested.

157

The connector receives the reply, processes it, and places the data as
PropertyValue pairs on the clipboard. The connector then returns control to the
Integrator task, and the flow resumes.

As are services, connectors are based on industry-standard technologies. Process


Commander provides the following standard types of connectors:
EJB connectors access an Enterprise JavaBean. (EJB) and call its remote
methods. You can also use them to communicate with WebSphere Business
Integration adaptors.
SOAP connectors are SOAP (Simple Object Access Protocol) clients that call
Web services.
SQL connectors send complex SQL statements to an external database.
Java connectors call the Java methods and constructors of Java classes or .jar files
that are located in Process Commanders classpath.
HTTP connectors send message data to external systems through HTTP GET or
POST requests and process the response data.
JCA connectors send requests to external Enterprise Information Systems through
resource adapters that implement the Common Client Interface of the J2EE
Connector Architecture specification.
JMS connectors send request messages to an external system and process
responses through an intermediate server that hosts Java Message Service
middleware.

158

.Net connectors are Microsoft .NET clients that call Web services on external
systems based on the Microsoft .NET Framework.
MQ connectors send request messages to an external system and process
responses through an intermediate server that hosts IBM WebSphere MQ
middleware.
BPEL connectors act as a container for the SOAP services and connectors that
represent Process Commander as a partner of a Business Process Execution
Language (BPEL) process when Process Commander starts the process.
The connector activity is the mechanism that starts the connector. A method in the
activity calls the connector rule. For example, if the connector is a SOAP connector,
the activity uses the Connect-SOAP method to call the connector rule.

The connector itself is defined by an instance of a Rule-Connect-* rule. The


connector rule types encapsulate the appropriate logic for communicating with a
service of that type. For example, a SOAP connector holds the URL of the SOAP
server. An EJB connector holds information about the EJB container that holds the
bean and which of the beans Java methods to use.
The connector rule holds the following kinds of information:
The RuleSet.
The number and type of output and input parameters.
Whether the system it communicates with accepts requests from authenticated
users only, and, if so, the username and password the connector is to use.
Technology-specific information about connecting to a service of that type. For
example, if the request is sent via HTTP (HTTP, SOAP, and dotNet connectors),
the connector rule specifies session and time-out information.

159

With the exception of the SQL connector, a connector rule has two key parts:
Name of the class rule it applies to
Service name, which holds the name of the external service or method that it
connects to.
Connect SQL rules are instances of the Rule-Connect-SQL class. They belong to the
Integration-Connectors category. Connect SQL rules are used when the application
needs to run complex Structured Query Language statements such as joins or stored
procedures to update or extract information from an external database.
To configure an SQL connection to an external database, use the following elements
along with the Connect-SQL rule:
An activity that references one or more of four standard methods for operating on
relational databases RDB-Open, RDB-List, RDB-Delete, and RDB-Save. The
names of the methods match the names of the tabs in the connector rule. An
activity that uses RDB-Open to call a connector rule runs the SQL statement on
that connectors Open tab.
A Database instance and one or more Database Table instances that provide
access to the tables or views of the external database.
A JDBC library that provides access to the external database software.
Special data mapping syntax to associate properties with database columns.

160

Use Open tab to open a single row in the data base. To execute the SQL statement
on this tab, an activity uses the RDB-Open method.
Use the Delete tab to enter the SQL to delete a row or rows from a relational
database. The SQL statement in this tab operates in conjunction with an activity
that uses the RDB-Delete method.
Use the Save tab to enter the SQL to save an instance to the database. The SQL
statement in this tab is executed by an activity that includes the RDB-Save
method.
Use the Browse tab (in conjunction with an activity that includes the RDB-List
method) to create a rules that at runtime searches an external relational database
and returns to Process Commander data from the selected rows.
The HTTP integration interface supports interactions between the Process
Commander applications and other systems through Hypertext Transport Protocol.
Use HTTP connector rules when the application wants to send XML or string data
(text) as messages to an external system without the need to comply with messaging
standards or protocols like SOAP.
There are two types of HTTP method which is GET and POST. "GET" is basically
for just getting (retrieving) data whereas "POST" may involve anything, like storing
or updating data, or ordering a product, or sending E-mail. A Connect HTTP is
created which is inherited from Integration-Connectors.
Service tab: Used to identify the external system with which this connector rule
communicates.
Endpoint URL: Enter the URL of the external system to which this rule
connects.
HTTP method: Select which HTTP method to use to send the string: GET or
POST.
Request only: When the HTTP Method is set to POST, select to indicate that
Process Commander is to send the message and close the connection without
waiting for a response.

161

Request tab: Used to map data for the request message.


Query String Parameters: When the HTTP method specified on the Service tab
is GET, use the fields in this section to specify name/value pairs to append as a
query string to the URL of the target system.
Name: Enter the name to use for the parameter. The data type of a query string
parameter is String.
Description: Enter a short description of the parameter.
Map From: Specify the source or the type of source of the value.
Clipboard - Map from the page name or property on the clipboard specified by
the Map From Key field.
Constant - The data is a fixed value that does not change.
Map From key: Specify the key to locating the property or rule in the source
specified in the Map From field.
If the Map From value is Clipboard, enter the property name from which
the data is mapped at runtime.
If the Map From value is a Rule-Utility-Function from a MapFrom library,
either select the property that holds the value to be processed by the
function at runtime or leave this field blank, as appropriate for the
function. If the Map From value is Constant, enter the value of the constant
surrounded by double quote characters.
MessageData: Used to specify the data to include in the POST message.
Description: The data type of the message data is String. Enter a short description
of the string in the response.
Map From: Specify the source or the type of source of the value:
Map From Key: Specify the key to locating the property or rule in the
162

source specified in the Map From field:


If the Map From value is Clipboard, enter the reference to the property
from which the data is mapped at runtime.
If the Map From value is Constant, enter a literal text string.
If the Map From value is XML Stream, enter either the Stream Name (second
key) of the appropriate XML rule or a page name and stream name using the
syntax PageName.StreamName. (The page must be present on the clipboard
when the connector rule runs for rule resolution to find the rule.) If you specify
the stream name only, the system uses the Applies To class of this connector rule
as the first key part of the XML rule.
If the Map From value is HTML Stream, enter either the Stream Name (second
key) of the appropriate HTML rule or a page name and stream name using the
syntax PageName.StreamName. (The page must be present on the clipboard
when the service rule runs for rule resolution to find the rule.) If you specify the
stream name only, the system uses the Applies To class of this connector rule as
the first key part of the HTML rule.
If the Map From value is a Rule-Utility-Function from a MapFrom library, enter
or select the property that holds the value to pass to the custom function at
runtime.

Response tab: Used to map the data from the response.


MessageData: Used to map the response data from the message.
Description: The data type of the message data is String. Enter a short description
of the incoming string.
Map To: Specify the destination or the type of destination for the value in
Process Commander.
Clipboard: Map to the page name or property on the clipboard specified by
the Map To Key field.

163

XML ParseRule: The incoming data is a stream of XML that must be parsed
using the actions defined in a parse XML rule (an instance of Rule-Parse-XML).
Delimited ParseRule: The incoming data is in a delimited format that must be
processed by a Parse Delimited rule (an instance of Rule-Parse-Delimited).
Structured Parserule: The incoming data has a fixed format with fixedlength fields and must be processed by a structured parse rule (an instance of
Rule-Parse-Structured).
Map To Key: Specify the key to locating the property or the rule in the
destination specified in the Map To field.
If the Map To value is Clipboard, enter the property name to which the data is
to be mapped.
If the Map To value is XML Parse Rule, enter the Namespace name
(secondkey part) and the Element Name - third key part - of the appropriate
XML parse rule. Separate the Namespace from the Element name with a space
using
the
syntax
NamespaceName
ElementName"
rather
than
"NamespaceName.ElementName." The system uses the Applies to class of this
connector rule as the first key part of the parse rule.
If the Map To value is Delimited ParseRule, enter the Namespace and
Record Type names (second and third key parts) of the appropriate delimited
parse rule. The system uses the Applies To class of this service rule as the first
key part of the parse rule.
If the Map To value is Structured ParseRule, enter the Record Type (third key
part) of a structured parse rule. The system uses the Applies To class of this
service rule as the first key part of the parse rule.
If the Map To value is a Rule-Utility-Function function from a MapTo library,
either select a property to hold the results of the function or leave this field blank,
as appropriate for the function.

164

Mapping Connect-HTTP method to the Activity: Specify the name of the method
to be used as Connect-HTTP. In Connect-HTTP method in the activity specify the
name of the Service (name of the Connect HTTP method).Specify the name of
another method as Show Property. Enter the value of the property to which the
MessageData has been mapped.

File Listener
File Listener

A file listener monitors the file directory and calls the file service when files arrive.
The file service uses a parse rule (XML, structured, or delimited) to open and read the
file, evaluate each input record, divide the records into fields, and then write the fields
to the clipboard. The service activity can then process the data pass the data to
another rule, or start a flow and create a work object based on the data.

Both the file listener and the file service have a part in processing the files. When the
listener starts, it creates subdirectories in the file directory it is monitoring. When files
that match the pattern the listener is listening for arrive, the listener moves the files
into a subdirectory named work_<name of listener> and calls the file service.
When the file service finishes processing the file, the listener either deletes the file or
moves it to the work_<name of listener>/completed subdirectory, depending on how
the listener is configured. The listener also creates a reports subdirectory to hold
report files that contain the results of the processing.

165

How to set up a file service (and file listener)

Use the File Listener form in conjunction with Service File rules to import data from
a file or files into your Process Commander system.

Use the Rules by Type Explorer to review or create file listener data instances, or
click the File Listeners link on the Resources area of the Integration slice ( ). As an
alternative to updating this form directly, you can create a File Listener data instance
through the Service accelerator.

The Data-Admin-Connect-FileListener class contains file listener data instances.


This class is part of the Integration-Resources category.

Use file services to read in and process the data in files. The data files may be
exported from another system, or created by users as text files in any of a wide
variety of formats. Before setting up a file service, determine the following:
The target directory, that is the location of the files to be processed
How the listener identifies the files should it process every file it finds, only
those files with a specific file extension or some other distinguishing characteristics,
and so on
How the files are arranged is there one record in each file or multiple records in
each file, what is the data structure of the records, and so on

Note: Verify that it has these access rights, because the listener moves and sometimes
renames files, the Process Commander server must have read and write access to the
file system where the input files arrive. Verify that it has these access rights.

Configure the data mapping rules and service activity


What is the file service meant to do? Is it supposed to create work objects? Perhaps it
provides the incoming data to existing work objects? Determine what the service is
supposed to do and then create the rules that implement its purpose that is, create or
identify the parse rules (XML, structured, or delimited) that map the data from the
input files to the clipboard and the activity that performs the service processing. As
with any service implementation, you may also need to create additional properties to
hold data before or after it is processed.
For an example for this article, say that you are creating a file service for an insurance
claim application. Each file contains a single XML record that describes the claim
and the file service must create a work object for each claim. This section describes
one way to set up the data mapping rules and service activity for this example.

166

Use the Import XSD/DTD wizard to generate data mapping rules


Obtain the XML schema definition (.xsd file) that describes the XML used in the
input files (records).
Run the Import XSD/DTD wizard and upload the XSD file. The wizard creates
class rules for each complex element or type defined in the schema document and
creates properties for each element or attribute in the complex element or type. It also
creates XML parse and/or stream rules.
The XSD file used for this example describes one complex element named Claim.
Here are the results after importing it with the wizard:

Create properties that support data mapping


Determine how to connect the data represented by the generated rules to the work
class. You can either configure the service activity to copy individual property values
from the clipboard to individual work object properties that you create for this
purpose, or, you can link the entire generated data model to the work object through
an embedded page property.
Because the work objects created from the example used in this article need all the
data from the incoming files, you would determine the top-level class rule of the
generated data model and link it to the work object by creating an embedded page
property for the claim work class. The page class of the embedded page property
would be the top-level class rule generated from the imported XSD file, DataSample-File-Claim:

167

When you create the service rule in a later task, you will set the service's page class to
that of the work class, and not the class generated from the XSD file. For that reason,
you cannot call the generated XML parse rule directly from the service rule. Instead,
you'll map the incoming file data to a placeholder property and then call the parse rule
from the service activity. Create a single value text property to use to as a temporary
storage place for the incoming data until the XML parse rule can be called from the
service activity.
For example:

Create the service activity


Create an activity for the file service and specify that it applies to class is the work
class in the example, this is the work class of the claim object.
On the Pages and Classes tab, create a page entry for the applies to class of the
XML parse rule.

168

On the Steps tab, configure a step that creates the page you defined on the Pages
and Classes tab. In the next step, set the Step Page to that page and use the ApplyParse-XML activity method to invoke the XML parse rule. The first key to the rule is
the page class of the step page. Provide values for the methods parameters as
follows:
NameSpace the second key part of the XML parse rule name
ElementName the third key part of the XML parse rule name
SourceProperty the name of the placeholder property that holds the input
record at runtime (the property you created in step 2 of the previous
procedure)

At runtime, the XML parse rule specified parses the data located in the
SourceProperty and puts it on the step page in the clipboard.
In the next step, configure a step that uses Page-Copy to copy the contents of the
Step Page clipboard page to the embedded page property that you created in step 1 of
the previous procedure.

Then configure a step that calls the standard activity Work-.createWorkProcess to


create a work object from the clipboard data on the primary page. Be sure to provide
values for the activitys input parameters, flowType and organization:

169

Create the service package and service file rule


Use the Service Accelerator to generate the service package, service rule, and file
listener, but most likely you will have to edit the generated items because file
listeners and file service rules have many options to consider.
Service Package
To create a service package without using the Service Accelerator, click the
Integration button on the Developer portal home page to open the Integration page.
Then, under Resources, select Service Packages and then click New. Be sure to assign
the appropriate access group.

File Service Rule


Verify that the service package, service activity, and data mapping rules exist. Then
complete the following steps:
From the Rules by Type explorer, select Integration-Services > Service File.
Then click New.
2. In the New form, enter the name of the service package you created for this
service in the Customer Package Name field. Then enter appropriate names in the
Customer Class and Customer Method fields.
3. In the Service Rule form, on the Service tab, identify the page class of the service
activity (or activities) that you will specify on the Requestor tab. Depending on
how you configured the service activity, you may need to also specify a model
rule and/or a page name. For the example used in this article, you would set the
Page Class field to the name of the claim work class and leave the Page Model
and Page Name fields blank.
1.

170

4.

On the Method tab, describe how the contents of the files are organized. To
continue with the example, you would set Processing Method to file at a time,
specify text only in the Data Mode field, and leave the Character Encoding field
set to Default.

Note that if the files contain multiple records and records of different types need
to be processed differently, you select either record at a time or by record
type. Then you describe how the service rule can determine where one record
ends and another record begins with the fields in the Record Layout and Record
Type Identifier sections.
5.

On the Request tab, use the Parse Segments section to map the data from the file
to the clipboard or a parse rule and to specify the service activity that is to process
the data. Continuing with the example, you would configure one row that maps
the incoming data to the single-value placeholder property you created and
specifies the name of the service activity in the Activity field:

171

Note that if the files contain multiple records and records of different types need
to be processed differently, you create as many rows as you need in the Parse
Segments section. If the records can be identified by type, you use the Record
Type field to indicate which processing definition to use for records of each type.
If the different records always appear in the same sequence but there is no type
indicator, you use the order of the processing definitions to specify which activity
or parse rule to use for each record type.
6.

Save the rule and then test it. Click the Run toolbar button, provide some
representative data for the service rule to process, and click Execute. Do not
continue to the next task until you see a success message similar to this one:

Create the File Listener


The file service must exist before you can create the file listener. Verify that the
service rule exists, and then complete the following steps:
From the Integration page, under Resources, select File Listeners. Then click
New.
2. In the New form, enter a descriptive name for the listener.
3. In the File Listener form, on the Properties tab, identify the location of the files.
Remember that Process Commander needs read and write access to the directory
you specify. If files of various types are located in the directory and the listener
should not call the service to process all of them, specify selection criteria with
the Source Name Mask field. For example, if you enter *.xml the listener
notifies the service about files with .xml extensions only.
4. Specify the file service rule that the listener routes the files to in the Service
Package, Service Class, and Service Method fields. Set Concurrent Threads to 1
and run the listener on a single node only, unless multiple qualifying input files
are available at one time. (Each thread operates on a single file.)
1.

172

If the file listener and service must run as an authenticated requestor, specify the
credential of a valid operator in the User ID and Password fields.
6. On the Process tab, specify how frequently the listener should check the directory
for files, in seconds.
7. Use the Reporting section if you want to keep a record of the results from the file
service processing. For example, perhaps youd like to keep a record of the IDs of
the work object created from the processed files. Specify the page and property
where the information is located in the Source Page Name and Source Property
fields.
5.

173

Optional. On the Error tab, specify how many times the file listener and service
should attempt to process the same file if there are processing errors and what to
do with files that cannot be processed.
9. Save the listener, and then return to the Properties tab. Click Test Connectivity.
Do not continue to the next task until you see a success message similar to this
one:
8.

Start the Listener


Open the System Management application (Tools > System Management) and select
the node on which the file listener should run. Then go to the Listener Management
page. Click in the List of Available Listeners, select the listener you just created, and
click Start.
When the listener starts, it creates subdirectories like these in the directory it is
monitoring:

Test the File Service


When you finish creating the file service and you have started the new listener, test
the configuration as follows.
1. Open the file service rule.
2. Select Run > Trace Open Rule.
3. Put a file in the input directory and wait for the listener to wake up and check the
directory.
4. Watch the Tracer as it adds new rows of information.

174

5.

Examine the results and verify that the file service worked the way you expected
it to.

Files and folders


The listener creates three folders (subdirectories) within the original input directory:
Work Copies of input files. The original file is deleted to prevent double
processing by this or other listeners.
2. Completed Input files for which all processing has completed successfully.
May also contain input files for which processing failed.
3. Report Files with an RPT file type, output reports created by Service File rule
processing.
1.

Where, when, and whether listeners start


If desired, you can edit the prconfig.xml file to prevent file listener from starting
when the system starts (on an eligible server node). Locate the initServices/initFile
element and set the associated value to false. Thereafter, you can use the System
Management application to start and stop specific listeners on specific nodes.
The listener is a data instance, so it has no associated RuleSet or Version. However,
to process an input file, a requestor based on this listener needs access to the RuleSet
and version that contains the referenced Service File rule.
Three settings affect how Email Listener requestors run. They control whether the
listeners can run, when the listeners start, and where the listeners can run:
1. Whether Controlled by the Blocked check box on the Properties tab of this
form.
2. When Controlled by the initServices/initFile setting in the prconfig.xml file
(enabled by default)
3. Where Controlled by the Startup Option property on the Properties tab of
this form.

175

Controlling whether listeners start


The Blocked check box on the Properties tab determines whether the listener
requestors defined by this File Listener data instance start. If this box is cleared, these
listeners start when Process Commander starts (on eligible nodes). You can also stop
and restart them using the Listener Management menu item of the System
Management application.
If the Blocked box is selected, they do not start when a Process Commander node
starts and you cannot start them in the System Management application until you
clear the Blocked option and save the listener instance.
Controlling when listeners start
Settings in the prconfig.xml file control when file listeners start. To start unblocked
file listeners when Process Commander starts, edit this file to add or update the
initFile element within the initServices section:
<env name="initServices/initFile" value="true"/>
If this entry is not present in the file or the value is not "true," "y," or "yes," you can
start unblocked file listeners only from the System Management application.
Controlling where listeners run
The options listed in the Startup Options property on the on the Properties tab
determine where the listener starts. The following options are available.
1. Run on all nodes The listener is run on all nodes all servers in a cluster.
2. Node based startup The listener is started only on specified nodes.
3. Server based startup The listener is started on a specified number of nodes on
specific servers within the cluster.

Using remote logging to debug listeners


The remote logging feature is often helpful when debugging file listeners. To set up
remote logging:
1. On the Properties tab, identify a workstation to receive logging output and a
TCP/IP port (port 8887 by convention).
2. Select the Remote Logging check box on the Service File form for each Service
File rule you want to debug.
3. Start the listener using the System Management application.

176

Debugging
To include the clipboard results of service file processing in the Pega log, temporarily
add the Log-Message method at an appropriate place in the service activity. Set the
LoggingLevel parameter to InfoForced and the Message parameter to: Contents of
page:\n" + myStepPage.getXML());

Troubleshooting: java.lang.Exception after file listener processing


Symptom
When processing a file with file listener, the following error message appears in Log
file:
1. Failed to create PRFile: java.lang.Exception: Caught exception while executing
Interaction Function, javax.resource.ResourceException: Failed to create new file,
IOResourceManager could not find reference to parent file
This error appears even though the file listener processed the file successfully. This
error occurs in all 5.x versions, except for 5.4+, when Process Commander is
deployed in the Enterprise tier (prweb.ear file).
Solution:
You can ignore this error as it has no impact on file listener or overall Process
Commander processing. If you want to eliminate this message, you can re-deploy the
application in the web tier (prweb.war).

1. Rule-Connect-SQL is used for? (choose 2)


a. create a data base
b. delete a data base
c. Add a single row
d. Add multiple rows
2. What do you need to connect to an external database (activity, assign, flow action etc?)
a. Rule-Connect-SQL
b. Data-Admin-DB-Name
c. Activity
d. all the above
3. PRPC has the ability to access data from an external database using:
a. Services
b. Connectors
c. Both

177

d. Neither
4. COM, CORBA, SOAP and JSR-94 are protocols that can be used with:
a. Services
b. Connectors
c. Both
d. Neither
5. The container that holds all the components of a service is of which class:
a. Data-Service-Requestor
b. Data-Admin-ServicePackage
c. Rule-Admin-Services
d. Rule-Service-Package
6. To prevent the file listener from starting when the PRPC system starts, which must
be edited?
a. prconfig.xml
b. prresources.jar.
c. config.xml
d. resources.jar
7. _____________ is defined as programmatic components that implement an
interface that is defined by an external system. With the Process Commander
application acting as the client and the external system acts as the server.
ANS: Connectors
8. SOAP is a protocol that can be used with:
a. Services
b. Connectors
c. Both a and b
d. Neither a or b

178

12. Implementation and


Performance Tools

179

Preflight Tool
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 ( ). The Application Preflight tool summarizes these warnings.
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.
We 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. Warnings appear only
when a rule is saved in a V4.2SP6 or later system. Rules saved in earlier versions and
not yet resaved in a newer system do not include warnings.

Using the Application Preflight tool


Use the Application Preflight tool to list each rule in an application that contains a
warning message. Warning messages suggest that the rule is at variance with
guardrails and other best practices. You can also check for browser compatibility of
visual elements. To start the tool we need to select Application > Preflight to start the
Application Preflight tool.
Performance and DataIntegrity warning types are considered to be high priority.
They can degrade system reliability by slowing performance (for instance, a list view
that retrieves embedded properties) or by violating data integrity (for example, an
activity that uses the Commit method incorrectly). Eliminating high priority warning
conditions before putting the rules into production is strongly recommended.
After Clicking the Preflight tool the following window will appear and there we can
select the type of warnings and reports which we want to see. It consists of the
following items.
1. Download and high priority warnings
2. All warnings by rule type
3. Performance warnings by rule type
4. Percent of rules with warnings by rule type
5. Pie chart of warnings by severity
6. Browser compatibility report
7. Accessibility report

180

If we Click Download High Priority Warnings, the Download warnings for <your
application> dialog appears. Click Download to obtain a list report of high priority
warnings for the RuleSets in your current access group and download it as an Excel
spreadsheet. The File Download dialog appears. Click Open to download the file
and open it in Excel.
The all warnings by rule type display the number of rule instances for each rule type
that contains a warning. You can change the rule type range in the display using the
slider widget at the top of the chart.

181

The summary report specifies, for each rule type, the number of rule instances that
do and do not have warnings. Click a Rule Type name in the summary for a list of the
rules with warnings. Click a list item to open the rule form.
Click the open icon ( ) next to the RuleSet Name field. Select one or more
RuleSets from the list (only RuleSets that contain warnings are included). Click
Apply. Click the Run button (

) to generate the report.

182

Displays a bar chart and summary report of rule instances that have warnings. The
chart shows the number of rules within each rule set as a percentage of all the rules in
the RuleSet. The summary 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. Hover your cursor over each section of the chart to display
number of warnings at each level and the percentage each level represents of the total.
The summary and Criteria functionality are the same as described above for the All
Warnings by Rule Type report.

183

Tracer
The Tracer is a tool that monitors an individual requestor session, tracking the
execution of rules. The Tracer tool provides full debugging facilities, the Tracer tool
to debug flows, activities, services, parse rules, and declarative rules. Including stepby-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.
How to start the Tracer tool?
1. Select Run > Tracer to trace your current session and Thread.
2. Select Run > Trace Open Rule when a service rule or activity rule is open in the n
workspace. You can start the rule with the Run toolbar tool ( ).
3. Type the keyboard shortcut CTRL + T.

184

The following are the controls in the Tracer tool

Function

Button

Choose a requestor session other than your own. Wait a few seconds
until the Tracer connects.
Connection
Select which RuleSets, rules, and events are to be traced.
Options
Set or change breakpoints.
Breakpoints
Watch

Save

Set or change watch variables

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

Erase the displayed events.

Page 185 of 224

Clear
Pause the session being traced at the next possible moment.
Pause
Resume processing after a Pause button click, or after a breakpoint
Continue event. Appears only after a pause.

Save

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.
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.)

By default, the Tracer displays the 500 most recent trace lines. You can set a
higher value and this requires additional workstation memory.

Pega Logs and alert


Pega 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.
How to view or download the Pega Log?
Select Tools > Log Files to view or download the current Pega log from the
server to your workstation. By default, to reduce the demand on system resources,
the system first writes log output to a memory buffer that is 8 kilobytes in size. As
a result, the contents on the disk log file may not yet contain output written
minutes ago or even in some cases hours ago, depending on volume.
In an activity, use the Log-Message method to add a message to the Pega log.
The prlogging.xml file contains settings that can cause the system to create a new
Pega log daily or on a periodic basis, rather than only at startup.
If two or more Process Commander servers are installed in a single application
server instance, they write lines to a common Pega log file. If this is not desirable,
you can change the name or path of the Pega log for a node by modifying the
prlogging.xml file. In this example the log file name starts with PEGABLUE:
<param name="FileNamePattern"
value="C:\LOGS\PEGABLUE-'yyyy-MMM-dd'.log" />

Page 186 of 224

During application processing, Process Commander writes to the performance


alert log a sequence of text entries called alert messages that identify mainly
performance-related issues or errors. The performance alert log is usually named
PegaRULES-ALERT-YYYY-MMM-DD log.
Each performance alert message is named "PEGAnnnn" where nnnn is the
message ID, which represents the system event that generated the alert. The
message describes the event and contains other information such as the value that
exceeded the threshold, the type of requestor (for instance, browser), the activity
or stream that triggered the alert, and so on.
Security alerts are generated in the security alert log when security to a Process
Commander web node server is at risk. The security alert log is usually named
PegaRULES-ALERTSECURITY-YYYY-MMM-DD log. These alerts are named
"SECUnnnn."
The PegaRULES Log Analyzer (PLA) is a Java program that can parse,
consolidate and summarize Process Commander logs of all three types Pega
log (also known as the system log or console log), Alert log, and JVM. You can
use PLA results to identify, diagnose, and help remediate issues that may affect
performance, stability, or scalability.

The alert logs contain the following alerts.


1) HTTP interaction time exceeds limit: This alert is generated when the
elapsed time for an HTTP interaction time exceeds the threshold setting.
Alert message description: The browser interaction time has exceeded the
specified threshold (in milliseconds).
Example of message text
HTTP interaction has exceeded the elapsed time "alert" threshold of
1000
ms:
2066852
ms.
request:
http://sdevrulesb3:9081/prweb/PRServlet/ksjNgaBVLyUBsr9UytBwWg%5B%5B*
/!Developer?pyActivity=WBSave

2) Quantity of data received by database query exceeds limit: This alert is


triggered when a query to the PegaRULES database loads into memory a
quantity of data (bytes) that exceeds a per-interaction threshold
(interactionByteThreshold). This alert can take the form of a warning or an
error. Monitoring this database activity helps you recognize when queries are
inefficiently designed or when data is being loaded indiscriminately.
Alert message description: Number of bytes received from the database has
exceeded per-interaction threshold (bytes).

Page 187 of 224

Example of message text (warning)


The number of database bytes input for this interaction has exceeded
the "warning" level for Requestor HF940FD8761E5A3A67F32F892CD68954B,
operator theDeveloper@pegasystems.com, Maximum bytes:
100
Actual
bytes: 600

3) PegaRULES engine started: This alert message occurs each time the
PegaRULES engine starts successfully. This alert is included in V5.1+.
Reason for alert: Process Commander System adds this alert when
initialization completes. The message indicates that the PegaRULES engine
started successfully. In a development environment, this alert may appear
many times in an Alert log, due to developers restarting server nodes.
The prlogging.xml file is a control file for the Process Commander logging
facility, a modified version of the Apache log4j facility. Entries in the
prlogging.xml file follow the syntax of Apache log4j xml configuration entries.
For example, the following settings cause INFO-level logging for every agent,
activity, model, and when rule:
<category name="com.pega.pegarules.engine.context.Agent">
<priority value="info"/>
</category>
<category name="Rule_Obj_Activity">

Log4j
Process Commander includes a central file named prlogging.xml on each node to
control the contents of the server console output and Pega log files. You can
temporarily override settings in this file using the Logging Level Settings tool.
The logging facility is based in part on the log4j facility (v1.2.14) from the
Apache Software Foundation, and operates similarly to that facility. By editing
the prlogging.xml file and incorporating appenders, you can affect the format and
level of detail in the log file as an aid to debugging.

Refactoring tools
We can use the Refactor Rules tool to move rules to a different Applies To class,
RuleSet, or RuleSet version. After selecting the class in your Application
Explorer, you specify the new class, RuleSet, and RuleSet version, and the
individual rules you want to move. The rules are saved to the target class and
removed from the original class.
For example, if the work class MyCo-Mortgage-West- has 200 applicable rules
200 rules which apply to that class in RuleSet version MyCo:03-04-07,
you can move them all into class YourCo-Mortgage-East- and RuleSet version
YourCo:01-01-01 with this tool.

Page 188 of 224

Prerequisites and limitations to move the Rules are as follows


1. The RuleSet version or versions currently containing the rules to be copied
must not be locked
2. Rules that are checked out are not moved
3. The class must allow rules in the target RuleSet
4. Only rules that have an Applies To key part matching the single source class
are moved. Rules with no Applies To key part are not affected by this tool
5. The rule to be moved must not have the same class, other keys, and RuleSet
Version as an existing rule.
How to start the tool?
1. From the Application Explorer, right-click on the class that contains the
rules. Select Refactor from the context menu.

2. The Refactor Rules page displays the below screen and use this page to
specify the criteria for the refactoring, and to select the rules you want to move.

Page 189 of 224

Steps to be followed to move the Rules


1. Use the Move items to ... dropdown to select the destination class. The class
you select becomes the Applies To class for the rules after they are moved.
2. Use the Same them into RuleSet . . . dropdown to select the RuleSet to contain
the rules after they are moved.
3. Use the Version dropdown to select the version of the selected RuleSet for the
refactored rules.
4. From the list of applicable rules, select the checkbox next to each rule that you
want to refactor or select the checkbox at the top of the column next to Rule
Type to select all the rules.
5. When your criteria are correct, click Save As to begin the refactoring. The
rules are saved to the target class and removed from the original class.
6. When the process completes, the status of each rule will be displayed.

1. A check mark indicates success, and an 'X' indicates an error. Hover over the
error status to display a tool-tip describing the problem.

Page 190 of 224

13. Reporting

Page 191 of 224

Reports:
Rule types in the Reports category define reports that support the Monitor Activity
workspace, the Explorer tools, and other facilities. This category includes two rule
types list view rules and summary view rules.
Any developer can create and maintain these two rule types. Managers who create
reports using the Report Wizard also indirectly create rules of these types.
Managers can define reports in four categories, covering work objects,
assignments, and work object history.
Developers can define reports on any concrete class derived from the Assign-,
Data-, History-, Index-, Log-, Rule-, or System- base classes.
Reports on assignments and work objects operate as in the Monitor Activity
workspace of the WorkManager portal, reflecting only the assignments and work
objects in one currently selected work pool.
In Monitor activity slice you can have the contents of reports and charts you can
access in this area. The Main categories in this slice are

Monitor Assignments reports gather and present information about the open
assignments in one application (work pool). They list assignments that are past
their goals and deadlines, and show assignments by organization.These reports
can also show you the contents of work lists and workbaskets.

Monitor Processes reports provide information about the open (unresolved)


work objects being processed by one application. They show counts of the
work grouped by status; they compare the number of open items today with
the number a week ago, and so on.

Analyze Quality reports summarize data about the resolved work objects
from one application. These reports display data about how many items were
resolved according to the service level agreements configured for the process,
the operators who resolve the most items, and the number of work objects that
were created in a specific time period, and so on.

Analyze Performance reports present performance information in terms of


tasks how often was each kind of flow action selected by assignment, and
how long it takes operator to complete that action.

Operators with the SysAdmin role and using the Developer portal see two
categories in addition to the four listed above:

Rule Reports tally and list the rules in your system. The data included in
these reports is system-wide the data does not depend on the RuleSets or
work pools you have access to.

Page 192 of 224

Data Reports. There are no standard data reports. Application developers may
determine a need to report on instances of classes that inherit from the Database class.

Reports and the Report Wizard


The Monitor Activity page in the Developer or Work Manager portals provides
access to the standard reports and the Report Wizard. To open the Monitor
Activity page, click the Monitor Activity slice in the home page.
The Monitory Activity page lists a subset of the standard reports, organized by
category, and provides a toolbar with three buttons for each category:

To see all the reports from a category, click the Browse button on the toolbar
in that section.

To start the Report Wizard, click the Create Custom Report button on the
toolbar of the appropriate category.

To see a list of your custom reports, click the Custom Reports button on the
toolbar of the appropriate category.

Most reports display data from a single application (work pool). If you have
access to more than one application, be sure to select the application you are
interested in before running the report.

List View:
A list view rule, an instance of the Rule-Obj-ListView rule type, defines a report.
Users can personalize list view reports easily and interact with them.
In an activity, the Obj-List-View can execute a list view rule to provide searching
and sorting with no display.
Both developers and managers can create and update list view rules.
List reports display lists of data that match selection criteria. For example, an
operators work list is a report of this type. The following report is a workbasket
list.
Three sets of standard list view rules support the Monitor Activity workspace:

Several standard list view rules with an Assign- class as the Applies To key
part support the Monitor Process Assignments group.

Several standard list view reports with Work- as the Applies To key part that
report on open (unresolved) work objects support the Monitor Process group
of reports
Page 193 of 224

Several standard list view reports with History-Work- as the Applies To key
part support the Analyze Process Performance group of reports.

Summary view:
Summaries present the data that match selection criteria as an aggregate that is,
summarized lists that are organized by data point. This report shows open work,
summarized by work status.

To drill down to the individual records, expand the section in the summary report.
For example, a click on the Status: New category in the preceding example makes
the report display a list of those work objects in a separate window.

Page 194 of 224

Interactive charts display the data from a summary report as a pie, bar, column,
area, or line chart. For information about creating charts.
Reports are implemented through list view rules and summary view rules, which
the Report Wizard can generate for you. If you have a system administrator access
role, you can share the reports you create with other users and embed links to them
on the Monitor Activity page.

Report Wizard:
The Report Wizard presents a series of forms that prompt you to enter the
information it needs to define a report selection criteria and which fields to
display.
Work objects, assignments, rules, and data classes have a set of standard
properties whose values are stored both in the blob and in separate columns.
These properties work status, create operator, goal time, for example are
said to be "exposed" and they are what you use as selection criteria for your
reports.
Because reports can select records based only the values of exposed properties, the
application developers considered your reporting needs while planning and
implementing the data design for your applications.
If you determine that you need additional properties to use for selection criteria,
consider the following guidelines:
To expose single value, non-embedded properties, you can directly change the
schema of the existing pc_work tables or other storage tables by adding new
columns for the properties.
To expose complex or embedded properties, you must use declarative
indexing.
To see the columns of the tables in the PegaRULES database, use either the
View/Modify Database Schema Wizard or the database schema reference,
which is located on the installation media.

Creating a list report:


From the Monitor Activity page, click the Create Custom Reports button in the
appropriate category.
In the Select View Type form, select List View and click Next.

Page 195 of 224

In the Data Source form, select the appropriate class or work type. The options
that appear depend on the category you started the Report Wizard from. If you
started it from Monitor Processes, the form displays work types.

In the Define Criteria form, specify the selection criteria that is, the fields and
their values to use as the selection criteria for the records to include in the
report. The picture below shows the criteria for a report about open work.

Page 196 of 224

When you are finished with the selection criteria, verify there are records that
match the criteria with the preview count link. Then click Next.

In the Select Fields form, specify the fields you want displayed as columns in the
list report. For example:

Page 197 of 224

In the End form, specify which buttons to display when an operator generates this
report, and then click Next.

Page 198 of 224

In the Preview form, examine the results. Is this what you wanted? If not, click <<
Back and fine-tune the display fields and/or selection criteria until you are
satisfied. When you are finished, click Save View.

In the Save form, name and describe the list view rule that holds your report
definition. The Purpose field holds the report name and the Title field holds the
Short Description. Then click Save.

The wizard saves the report as a list view rule and displays the Delegate View
form.

Creating a summary report:


The Steps to be followed for creating the summary report are same as list report
but the only change is here the reports are Group By.

Page 199 of 224

In the Group By form, specify how you want the data summarized. For example,
for a report about open work objects, you could specify that the data should be
organized by organization unit, division, and organization.

Page 200 of 224

Summary list reports offer the person running the report to drill down to the
individual records. In the Drill Down form, specify the fields you want displayed
as columns in the lists that show the individual records.

In the Chart form, click Next without selecting the chart option
In the End form, specify which buttons to display when an operator generates this
report, and then click Next.

Page 201 of 224

The wizard saves the report as a summary view rule and displays the Delegate
View form.

Questions:
1. Custom reports can be created as all the following rules except:
a. Rule-Obj-Report
b. Rule-Obj-ListView
c. Rule-Obj-SummaryView
2. The first step in the Report Wizard is to:
(a) Indicate source of the data for the report
(b) Select the report layout
(c) Create the SQL to get the data
3. What are the slices available in developer portal (select multiple answers)
a. Cases and Content
b. User Interface
c. Dashboard
d. Monitor Activity
4. The home page of the Developer portal provides rapid access to six facilities,
known as----------.
5. While we are using List report which of the options is not available to Developer?
a. Drill down
b. group by
c. Fields
d. Criteria

Page 202 of 224

14. Application Deployment

Page 203 of 224

Deploying a product
You can create a ZIP archive file from a product rule for use in archive tools such as
the Import Archive tool, the Export Archive tool, or the Migration Wizard.
Different ways of Creating ZIP archives:
These related wizards work with product rules or ZIP files:
Product Migration Wizard Creates a ZIP archive from a product or product
patch rule, migrates the archive, and imports it to one or more destination systems.
Package Work wizard Creates a product rule that (when executed) includes
work objects, work object history, and work object attachments.
Purge/Archive Wizard Removes resolved work objects from your system and
optionally saves them in a ZIP archive.
Basic Navigation:
Access these tools from the File menu. Select:
File > Export Archive To copy rules and data instances from the PegaRULES
database to create a Zip archive file on the server.
File > Migrate Product To create a product rule that packages work objects.
File > Import Archive To upload rules and data instances in a previously
exported ZIP file into the PegaRULES database of the destination Process
Commander system.
About Product Rules
Complete the Product form to define a rule that identifies the RuleSets and versions,
rules and data objects, and other parts of an entire application. This rule supports the
migration and delivery of an application to other Process Commander systems.
After you complete and save a product rule, you can generate a ZIP file containing:
Rules in RuleSets and versions comprising a specific application.
Rules in selected RuleSets and versions.
Instances within any class. These can be filtered using a list view rule, or can be
individually selected from a list.
A post-installation Read Me display.
Product rules are instances of the Rule-Admin-Product class. They belong to the
SysAdmin category.
Procedure (Creating Product Rule):
1. Identify the RuleSets and Versions that comprise your product. As a best practice,
choose View > Rules > All Checkouts to list all rules checked out. Confirm that
none of the rules in these RuleSets are checked out and being worked on. Errors

Page 204 of 224

are reported if you create a ZIP archive at time when any of the rules designated
for it are checked out.
2. Although not required, you may want to review these RuleSet Version rules to
confirm that each RuleSet version is locked. (RuleSet Version Form Locking
Enable the Lock this Version?)
3. Create a product rule by selecting Application > New > Rule > SysAdmin >
Product from the menu.
4. Identify and Select the Application RuleSets
In the RuleSets to Include section, enter the RuleSets and the appropriate RuleSet
versions. Order the RuleSets in the list as they would appear on a RuleSet hierarchy as
shown in this example:

5. Identify the Application Data


Identify the data classes and instances that you are exporting, including all the data
classes that are part of your application. The classes may include instances for the
organization structure, security (access groups), connections to databases, external
systems, and other Process Commander system-related instances. Consider carefully
any dependencies among data instances or between data instances and your rules.
During import of the ZIP archive on the destination system, data instances that are
already present are not overwritten unless you specify that they should be. The
following provides a categorized checklist of data classes as you build your product
rule.
Access and Portal Gadget Data Classes
Data-Admin-AuthService The authorization Service AuthService is specified
in the Web.xml file.
Data-Admin-Operator-ID Operator IDs if applicable
Data-Admin-Operator-AccessGroup These should be organized by the
specialized types of users of the system that have unique roles, portals, and access
to applications.

Page 205 of 224

System-User-MyRules Instances
Organization Data Classes
Data-Admin-Organization Always set to Your org name
Data-Admin-OrgDivision The Divisions with your company
Data-Admin-OrgUnit Set to Agency or the internal department
Data-Admin-Workgroup Work group name
Data-Admin-Workbasket Workbasket name should identify the function it is
serving
Services/Connectors Data Classes
Data-Admin-ServicePackage Always reference the appropriate service name
Data-Admin-Connect-EmailListener
Data-Admin-Connect-EmailServer
Data-Admin-Connect-FileListener
Data-Admin-Connect-JCAAAdaper
Data-Admin-Connect-JMSListener
Data-Admin-Connect-JMSProducerModel
Data-Admin-Connect-JNDIServer
Data-Admin-Connect-MQListener
Data-Admin-Connect-MQServer
Data-Admin-EmailAccount
Mapping Data Classes
The following classes control where instances of a class are stored. Since many
applications depend on database tables and class groups, it is a best practice to always
include them:
Data-Admin-DB-Name
Data-Admin-DB-ClassGroup
Data-Admin-DB-Table
Other Application Data Classes
Display Data Instances (not shown above that inherit from Data-)
Note: Some concrete Data- classes contain information that is valid only on a
single Process Commander system, or only on one node of a single system. For
example, the system creates a Data-Agent-Queue record automatically on each
node, and the Node ID is part of the key. Listeners and similar data instances
(Data-Admin-Connect-* ) contain port numbers, computer names, and passwords.
Do not include instances of these Data- classes in a product ZIP archive unless
you have carefully confirmed that they are valid on the target system.
5. Select the Application Data (optional: using When Rule)
To ensure that you include the requisite data objects for your application you can
use either when rules or query data instances from data classes.

Page 206 of 224

6. When the product rule form is complete, save it.


7. At any time after you save this rule, click Create Zip File to start the assembly of
a Zip archive. Enter a file name (with no file type). Processing may take several
minutes to complete. Choose a file name that is valid for both the destination
server and the current server; they may be hosted on different Windows or UNIX
platforms. Many special characters are allowed, but you can't include an equals
sign character (=) in the file name.
8. The system places the Zip archive in the ServiceExport directory. Right-click to
download the file to your workstation or a network drive.
9. To confirm correct operation or review errors, open the newest instance of the LogPegaRULESMove class.

Page 207 of 224

About Export Rule/Data


Complete this form on a source Process Commander system, the one that contains the
rules to be extracted. You can copy all rules in a specific RuleSet and version, all
rules in a full RuleSet, or all rules and data instances defined in a product rule or patch
rule.

Don't create a ZIP archive at time when any of the rules designated for the archive
are checked out. An error is reported identifying each checked-out rule. Neither
the original version nor the checked-out version of the rule is included in the ZIP
archive
Export Archive form
1. Select an export mode
Select to determine the scope of the contents of the ZIP file:
By RuleSet/Version To create a ZIP archive containing all rules in a RuleSet and
Version (or all versions).
By Product
To create a ZIP archive containing rules and data defined by
an existing product rule (Rule-Admin-Product rule type).
By Patch
To create a ZIP archive containing rules and data defined by
an existing product page rules (Rule-Admin-Product-Patch
rule type)
ZIP File on Server
To copy a previously created ZIP file from the Process
Commander server to a local directory.

Page 208 of 224

If you selected By RuleSet/Version, select a RuleSet from those on your RuleSet list
for the RuleSet field.
Complete the RuleSet Version field. Select a single version for that RuleSet, or All
Versions.

If you selected By Product, or By Patch, complete these two fields to identify the two
key parts of an existing product or patch rule.
The second key part (Version) of product and patch rule types is not necessarily
related to RuleSet Versions.

File Name
1. Enter a file name for your Zip file in the File Name field. Use a file name that
is valid for both the destination server and the current server; they may be
hosted on different Windows or UNIX platforms. The ".ZIP" suffix is

Page 209 of 224

optional. Many special characters are allowed in the file name, but you can't
include spaces or an equals sign character (=) in the file name.
2. Click Create ZIP File . The system displays the progress of the extraction,
which may require one to several minutes. A progress bar shows the count of
rules extracted.

3. When the export operation completes, the Zip file created link provides access
to the new file, typically placed in the ServiceExport subdirectory of the server.
4. If errors are reported, click the Total Number of Errors link in the lower right
corner of the display form to see the error messages. You can print this for
later analysis.
5. To save the file now to a local directly, click the Zip file created link. Choose
Save in the pop-up window. (You can download the file later using the ZIP
File on Server option.)
6. Click Close.
Note:
If the RuleSet versions you select contain any checked-out rules, neither the
checked-out copy of the rule nor the checked-in rule is included in the ZIP file
created. Each such rule is noted as an error.
Although Process Commander does not restrict the number of records or size of
the ZIP file, some vendor ZIP utilities limit the file size to 2 gigabytes.

Page 210 of 224

About Import Archive wizard


1. Navigation through Import Archive

1. Completing the Form Local ZIP file


Complete the Select Import Mode field. Select:
Zip File on
Server
Local Zip File

if the ZIP file has already been placed in the ServiceExport


directory
if the ZIP file is on your local area network only

2. Navigate to the local directory that contains the ZIP file, select it, and click
Upload file .
In the File Name field, type in the full path and name of the ZIP file to be
uploaded, or click Browse .

If you attempt to upload a ZIP file when the ServiceExport directory already
contains a file of that name, a prompt appears. Click to confirm that you want
to overwrite the existing file.
Using this facility, by default, you can't upload a ZIP file using this facility
that is larger than 25 MB. This is an intentional design restriction on the
HTTP file copy facility, not a limit on the rule import processing. For larger

Page 211 of 224

files, use File Transfer Protocol (FTP) or another means to place the file into
the ServiceExport directory. Alternatively, you can set a higher (or lower)
upload limit on your system by changing the value for the
Initialization/MaximumFileUploadSizeMB parameter in the prconfig.xml file.
3. Completing the form Zip File On Server
Click to select one file in the boxed text area.

Page 212 of 224

2. Navigation through Refactor on Import


You can use the Refactor on Import wizard to rename classes in a RuleSet archive or
product archive as it is imported. This allows you to integrate the imported class
structure into the existing class hierarchy on your system. This tool supports merging
RuleSets developed by Pegasystems or others into your PegaRULES database.
You specify the .jar or .zip file containing a Process Commander archive. The wizard
displays a listing of the classes in the archive and allows you to specify the names of
classes to replace the top-level and Data- classes for rules contained in the *.jar or
*.zip file.
Starting the wizard
Select File > Import > Refactor on Import to start the wizard.
Step 1: Upload A File
The file must be a Pegasystems archive ZIP or JAR file as created in Process
Commander by the Export Archive tool, the Purge/Archive wizard, the Product
Package wizard, or the Product or Patch rule forms; or in the Rulebase Utilities
application (prdbutil.war) by the Export Process Commander Application Instances
utility.

Step 2: Select Import Archive


Use this page to select the archive you want to import. The form lists all the archives
currently uploaded to the Process Commander server ServiceExport directory.
Select the name of the file you want to import, and click Next.

Page 213 of 224

If you do not see the name of the file you want to import, click Back and use the
Upload form to copy the file to the Process Commander server.

Step 3: Provide Refactor Parameter

Page 214 of 224

This page lists the top-level classes and RuleSets in the import archive in the left
column. In the right column, specify the New Class Names and optionally specify
New RuleSet Names that you want to apply to each class or RuleSet as they are
imported. You cannot use a class name or RuleSet name that already exists in the
system.
If the import archive contains a product rule, the Refactor on Import tool looks for a
previous import of the same Rule-Admin-Product name. If there is a previous import
of this product, the tool will provide the refactor parameters used in that import as the
default values for the current import. You only need to confirm that the changes are
still valid.
When the changes are specified correctly, click Next.
Step 5: Verify Classes
This page displays the changes that will be made to the classes and RuleSets.
When you have confirmed that the changes are correct, click Next to continue.
If the changes are not correct, click Back to reset the parameters or Cancel to exit
from the wizard.

Step 4: Display & Refactor


a) Rules That Will be Changed

Page 215 of 224

b) Select Rules to be changed


c) Results
About the Purge/Archive wizards
In a production application, work object data volume can grow to a size where
hundreds of megabytes of database storage is required. The Purge/Archive wizards
enable you to use an agent to automatically delete old work object data from the
respective tables and/or stores them in ZIP archive files. Purging and archiving old
work objects and their related history and attachment records helps maintain system
performance by reducing database-processing demands.
Two wizards comprise the Purge/Archive wizard:
Configuration wizard: Select Application > Purge/Archive > Configure when you
are:
Creating and configuring a purge/archive agent dataset and defining the age of
work objects you want to purge/archive.
Modifying the configuration of a purge/archive agent dataset (change work types
and work object age)
Scheduling wizard: Select Application > Purge/Archive > Schedule when you are:
Creating a purge/archive process schedule for an agent activity configuration
(created in the Configuration wizard)
Reviewing the history of purge/archive activity and modifications to the agent
work object
Modifying the schedule information for a purge/archive configuration
Removing the schedule for a purge/archive configuration

Page 216 of 224

Pega Log Files and Alerts


The PegaRULES Log Analyzer (PLA) is a Java program that can parse, consolidate
and summarize Process Commander logs of all three types Pega log (also known
as the system log or console log), Alert log, and JVM. You can use PLA results to
identify, diagnose, and help remediate issues that may affect performance, stability, or
scalability.
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.

Log messages
In an activity, use the Log-Message method to add a message to the Pega log.
What is the PegaRULES Log Analyzer tool and how does it work?
The PegaRULES Log Analyzer (PLA) tool is a Web application that consolidates and
summarizes three types of logs from individual JVM server nodes in your application
system. The log data provide key information about operational and system health.
Developers and system administrators can use this information to quickly identify,
diagnose, and remediate issues that may be degrading or compromising:

Performance

Stability

Scalability

The Alert log contains diagnostic messages that identify


individual system events that exceed performance
thresholds or failures. Alert messages contain a set of field
values that identify the alert, the conditions that caused it,
and the state of system when it occurred.
The Pega (system) log gathers system errors, exceptions
(with their stack trace statements), debug statements, and
any other messages not specified as alerts. The Pega log
can contain messages created by your activities as well as
messages created by standard rules
The JVM garbage collection (GC) log provides insight
into how a java application makes use of memory.

When to use PLA?


It is strongly recommended that you use PLA to test a new or reconfigured Process
Commander application during UAT performance and stress testing and immediately

Page 217 of 224

after deployment into a production environment. These are the phases when
performance, stability and scaling issues are likely to occur.
Regular monitoring during development and production helps ensure that your
application is operating at its full potential. PLA signals issues that may grow into
major operational problems if not addressed early.
Operational checklist
The results of a PLA import should indicate the following:
Alert log

System log
Garbage collection
log

No critical alerts. These include PEGA0004, PEGA0017,


PEGA0019, PEGA0026, and PEGA0028. If there are
unusually large numbers of warning alerts, they should be
evaluated for their impact before being deemed acceptable
for production
No exceptions, errors, or debugs.
A GC time equal to or less than 2%.

PLA provides an efficient method for diagnosing the issues and locating their root
causes.
Viewing data in PLA
The Home view in the PLA window (shown below) presents a table summarizing the
benchmark metrics in each type of log. For instance, the log for January 23 there were
198 exceptions. The next day there were 116 alerts of which 5 were critical. These are
issues that need immediate remediation. Given the large number of total alerts (which
include non-critical alerts), you should investigate them to assess their impact on
production and remedied if necessary.

Using view options located in the left panel enables you to display the data in
summary and list reports for each log type. Here is an example of an alerts list report
generated when you click Alerts:

Page 218 of 224

You can sort the tables on almost any of the columns. For example, you can sort the
alert list shown above by Severity so that Critical alerts rise to the top of the report.
From this view you can drill down into an alert to display the alert details including
PAL data, trace list, pega stack, and parameter page. Here is an example for a
PEGA0028 alert:

Page 219 of 224

Exporting PLA data to Excel spreadsheets


You can easily export the PLA data to an Excel spreadsheet (assuming it is installed
on your workstation) for further diagnosis and information-sharing among
development team members. Clicking an Excel button in the Home view table
extracts and loads the data for that date and automatically starts Excel .
The spreadsheet is organized into summary and list report pages similar to those used
in the PLA interface. Here is an example of the critical alert data as it is displayed in a
spreadsheet:

Pre-configured Excel PivotTables provide multi-dimensional views of the data so that


you can add or remove fields to suit your requirements.
Performance alerts
Alert
- Category
PEGA0001 - HTTP interaction time exceeds limit Browser Time
PEGA0002 - Commit operation time exceeds limit DB Commit Time
PEGA0003 - Rollback operation time exceeds limit DB Rollback Time
PEGA0004 - Quantity of data received by database query exceeds limit DB Bytes
Read
PEGA0005 - Query time exceeds limit DB Time
PEGA0006 - Update operation time exceeds limit DB Time
PEGA0007 - Database operation time exceeds limit DB Time
PEGA0008 - PegaRULES engine started PRPC Started
PEGA0009 - PegaRULES engine failed to start PRPC Failed Start
PEGA0010 - Agent processing disabled Agent Disabled
PEGA0011 - Total request time exceeds limit Service Total Time
PEGA0012 - Outbound mapping time exceeds limit Service Mapping Time
PEGA0013 - Activity interaction time exceeds limit Service Activity Time
PEGA0014 - Inbound mapping time exceeds limit Service Interaction Time
PEGA0015 - Data parsing time exceeds limit Service Parse Time
PEGA0016 - Cache reduced to target size Cache Reduced
Page 220 of 224

PEGA0017 - Cache exceeds limit Cache Force Reduced


PEGA0018 - Number of PRThreads exceeds limit PRThreads Limit
PEGA0019 - Long-running requestor detected Long Requestor Time
PEGA0020 - Total connect interaction time exceeds limit Connect Total Time
PEGA0021 - Clipboard memory for declarative pages exceeds limit Declarative Page
Memory
PEGA0022 - Rule cache has been disabled Rule Cache Disabled
PEGA0023 - Rule cache has been enabled Rule Cache Enabled
PEGA0024 - Time to load declarative network time exceeds limit Loading
Declarative Network
PEGA0025 - Performing list with blob due to non-exposed columns Reading Blob
Need Columns
PEGA0026 - Time to connect to database exceeds limit Acquire DB Connection
PEGA0027 - Number of rows exceeds database list limit DB List Rows
PEGA0028 - GC cannot reclaim memory from memory pools Memory Pool
Collection
PEGA0029 - HTML stream size exceeds limit HTML Stream Size
PEGA0030 - The number of requestors for the system exceeds limit Requestor Limit
PEGA0031 - Generated stream overwritten and not sent to client Stream Overwritten
PEGA0032 - Rule change invalidated the specified threshold of entries in the Rule
Assembly
cache Invalidated Rules
PEGA0033 - Database query length has exceeded a specified threshold DB Query
Length
PEGA0034 - The number of declare indexes from a single interaction exceeds a
threshold
Declare Index
PEGA0035 -A Page List property has a number of elements that exceed a threshold
Clipboard
List Size
Security alerts
Alert
- Category
SECU0001 - Unexpected properties received in HTTP request Security
SECU0002 - XML received in post data for web node requestor Security
SECU0003 - Attempt to execute a rule failed in web node environment Security
SECU0004 - Attempt to run a stream from URL failed in web node environment
Security

Page 221 of 224

Question & Answers:


1. The best way to move a RuleSet from the development environment into the
productionenvironment is to use (select all that apply):
a. Export Rules
b. Load Rules
c. Skim Rules
2. The best way to create a new Major RuleSet version is to use:
a. Export Rules
b. Load Rules
c. Skim Rules
3. When delivering a PRPC Product, the best practice is to mark the RuleSet as:
(select all that apply):
a. Final
b. Locked
c. Blocked
d. Not Available
4. What is the purpose of locking a RuleSet version?
a. To restrict the access of rules belonging to the RuleSet version
b. To activate the export feature
c. To restrict new instances being added to the RuleSet version
d. To restrict the creation of new RuleSet versions for the RuleSet
5. Java exceptions are written to:
a. system.out and system.err log files
b. java.message.out log files
c. exception.err.out files
d. PegaRULES.log file
6. To change the format and level of detail in the log file as an aid to debugging, the
following file should be edited:
a. log4j.xml
b. logfactor5.xml
c. jvm_log.xml
7. A PRPC product is:
a. The generic name for any PRPC solution.
b. A PRPC solution that can support the business processes of multiple
companies.
c. A PRPC solution that is only used to support the business processes of a single
company
8. Describe the difference between the Move Rules tools and the features in
instances of RuleAdmin-Product?

Page 222 of 224

Rule-Admin-Product: we can add rules and data classes also. In addition, we can
consider more than one ruleset at a time
Move Rules: we can add rules only to zip file. Also we can consider only one
ruleset at a time

Page 223 of 224

ALL THE BEST

Page 224 of 224

You might also like