You are on page 1of 13

Activities

Activities in pega
1)Activity rules provide you with one way to automate the processing of work using a procedural,
program-like approach, without requiring Java skills or manually entering Java code. An activity is
presented as a series of steps, with some of the same features as an object-oriented programming
languagesuch as iterations or conditions.
2)Accordingly, use activities only when there are no other, more appropriate rule types. For example,
instead of using a series of activity steps, use a Declare Expression rule to calculate declaratively,
rather than procedurally. Similarly, use a when rule, decision table, map value rule, decision tree rule,
or parse rule whenever these rule types capture the business requirements well.
4)Dont create an activity in your application when you can call a standard activity to perform the
needed processing.
5) When writing activities, keep the following best practices in mind:
Keep activities short. Limit activities you create to fewer than 25 steps.
Limit hand-coded Java. Avoid Java steps in activities when standard rule types, library functions, or
activity methods are available. Reserve your valuable time and Java skills for implementing things that
do not already exist.
6)In V5.4 and earlier releases, iteration within an activity is limited to a single step. If your processing
need requires two or more steps, you must make a separate activity and include the Call statement in
the original activity.
7) Authenticate? Select this check box for all but those specific activities that guests
need to run. In most cases, clear this check box if the activity is for an agent. Agents are not true
authenticated users and by default cannot run activities that are restricted to authenticated users.
However, this check box is ignored by agents for which the Bypass activity authentication check box
(on the Security tab is checked; they can run activities regardless of the Authenticate? value.
Flows
About flows in pega
1)A flow rule an instance of the Rule-Obj-Flow rule type is a network of shapes representing
tasks and connectors (directed arrows), each with associated parameters and values. Flows govern:
How work objects are created ,How they progress through one or more flow executions ,How they
become resolved (completed)
2)Flows are the fundamental rule instances that represent business processes, identifying who works
on a work object in what sequence, what decisions and processing occur automatically, and many
other aspects of the
business process.
3) Some applications dont require users to interact with work object forms. Flows that
implement straightthrough-processing operate without user input. External portals and systems
can execute flows through Active Server Pages, JavaServer Pages, Service Portlet or Service JSR94
rules, or other means. Informally,
these are known as headless BPM applications. A collection of standard activities known as the
Process Engine API simplifies building such applications.
4) Application developers use Microsoft Visio to create, edit, and evolve a flow. Process Commander
uploads the resulting VSD file, including the Shape Parameters details from the workstation. Both the
diagram image (a JPG file) and the rule details are saved with the flow rule.
5) You cant test a flow rule that has Availability set to No/Draft. You can test the flow rule if the
Availability is set to Yes, even if the
Visio DRAFT mode ( ) is in force, indicating that not all the activities, properties, or other rules are yet
defined.
6)At run time, a user can start the execution of a flow by entering a new work object. The system
examines the property pyFlowName,in the model instance for the class, to determine which flow to
start.
7)We can think of the flow operating on the data (properties) in the work object until the flow finishes
or the work object becomes resolved
8)The system generates a unique work object ID for a new work object. (This occurs for starter flows,
those for which the Creates a new work object? box on the Flow form is selected.)
9) Flow creates assignments for human users reflecting the need for more facts, judgments, and
places the assignment into an appropriate user work list or workbasket. After a user (or in some cases
an agent or external participant) perform an assignment, the work object progresses farther through
the flow.
10)The Process Explorer tool presents for the currently selected application starter flow rules and
the sub flows they call in a graphical form.
a) 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.
b) A flow rule that consists only of assignments or decisions and meets other criteria is
known as a screen flow.
A flow that creates a new work object is called a starter flow.
c) Processing of a subflow is synchronous, meaning that the calling flow execution pauses
for the duration of the subflow. When the
subflow execution reaches a Flow End shape, the calling flow can continue.
11)The Split/Join facility ( ) supports such asynchronous operation, by allowing processing of two or
more subflows to proceed in parallel. For ex: Loan processing: 1) Loan Credit Process
2) Fraud checking .Both are different subflows.
Eg: Standard flow Work-.ParallelWork
12) Use a Split-ForEach ( ) shape to iterate over the pages of a Page List or Page Group property. For
each page, you can conditionally start a flow execution for the work object. Processing can resume
after any one, or all, of the subflows end. Eg:
standard flow Work-.StandardApprovalsAll
13)We cant use the Split-ForEach shape to create work objects. At run time, this shape process the
work objects embedded Page List or Page Group properties; the embedded pages must exist before
the Split-ForEach shape is reached.
14) A Spin-Off task ( ) starts asynchronous execution of a different flow, on the same work object or a
different work object. Processing of the current flow does not pause or wait for results from the other
flow.
15) Use the Flow shape rather than a Spin-off shape to start a synchronous flow execution, in which
the current flow execution pauses
while the sub flow executes.
16)Identify the objects the flow rule is to update. Select:
1) On Current Work Item to continue processing on the current (unresolved) work object in the next
flow.
2) On Another Work Item to start processing on a different work object.
3) On Embedded Page to apply this flow to an embedded page.
17)Users can select the standard flow action Work-.AddFlow, Work-.AddCovered, or Work-.AddtoCover
to start a new flow execution.
18) The integer property @baseclass.pxFlowCount indicates how many flow executions are in process
for the work object.
19) The Page Group property @baseclass.pxFlow contains a page of facts about each execution:
1) pyFlowType Second key part of the flow rule
2) pxAssignmentKey Key of the current assignment instance for this flow execution. typically an
instances of the Assign-Workbasket or Assign-Worklist class.
3) pyLastFlowStep Internal name of the most recent shape or connector processed
4) pyNextFlowStep Internal name of the next shape or connector to be processed
5) pyFlowParameters A classless page containing parameters used to start this flow
20) Flow rules containing too many shapes can introduce complex, difficult-to-debug processing into
your application. As a best practice, SmartBuild guardrails recommend limiting a flow rule to contain
15 or fewer shapes, not counting Notify and Router shapes. If your flow grows to contain more than
15 shapes, revise the flow to call or branch to subflows to handle continuations, special cases, or non-
mainstream processing.
21)You can save and run a flow rule in draft mode in systems where the production level is set to a
value less than 5.
22) After saving a flow rule, review carefully any shapes that turn gray. You can save and execute a
flow rule that contains unreachable shapes, but the tasks corresponding to the unreachable shapes
will never be performed. As a best practice, delete the gray shapes or add a comment as to why they
are present.
23) Include tickets and utility tasks to accommodate cancellations, rollbacks (sometimes called
compensating transactions), errors, and
similar exceptions.
24) Choose likelihood values that are initial guesses. After the flow is in use, click the Flow Analysis
button on the Design tab to obtain statistics for comparison.
Covers

Cover management in pega
A cover is a work object that is also a parent to one or more related work objects. Typically one work
party such as the customer party is present in the cover work object and also present in all of
the covered work objects associated with the cover. The covered work objects are the children in a
parent-child relationship.
1) By default, the system prevents the resolution of a cover work object unless all of its member
covered work objects are resolved.
Ex: Building construction (Cover) -> a) Wood work (WO) b) Plumbing (WO) c) Painting (WO). If all 3
works done (Resolved) then we can say Building (Cover) is ready to join.
2)Cover is a work object that is an instance of a concrete class derived from the Work-Cover- abstract
class. Your system includes harness rules, flow action rules, and activities that support working with
covers. The covered work objects can be of differing work types. However, the work type of the cover
and the work type of the covered objects must all belong to the same work pool.
3) The covered work objects can be of differing work types. However, the work type of the cover and
the work type of the covered objects must all belong to the same work pool.
4)By default, locking a covered work object also locks the cover work object. This is desirable because
the cover work object may contain totals, balances, counts, or other derived values that require
single-threaded access.
5) The standard ticket rule Work-Cover-.AllCoveredResolved alerts a cover flow that all the member
work objects are resolved. If your application is to incorporate this constraint, include this ticket in the
flow rule or rules for the cover work object.
6) The standard list view rule Work-.WorkInACover.ALL displays the urgency (pyUrgencyWork
property), work object ID (pyID), subject (pyLabel), and status (pyStatusWork) fields as columns,
without sorting.
7) The standard local flow actions Work-.AddToCover, Work-.AddCovered, and Work-
.RemoveFromCover allow user management of cover contents.
8) The Work-.NewCovered harness rule supports entry of a new cover and cover members.
9)Activities Work-.AddCoveredWork, Work-.AddCovered, and others support operations with covers.
10)One cover work object may cover multiple other work objects. When any one of the covered work
objects is opened, Process Commander by default uses a conservative approach and acquires locks on
the covered work object and the covering work object. This ensures that data can be updated in both
objects with transaction integrity.
11) Customize the activity DetermineLockString property-set and update it with no locking
Standard BuiltIn flows
Standard Built in Flows in pega
1. Work-Cover-.NewWork
2. Work-. FlowProblems
3. Work-Folder-. NewWork
4. Work-. NewWork
5. Work-.VerifySendCorr
Standard-workparties
Standard Work Parties in pega
a) Data-Party-Gov
b) Data-Party-Operator
c) Data-Party-Com
d) Data-Party-Org
e) Data-Party-Person
Standard-Rulesets
Standard Rulesets in pega
a. Pega-ProCom Supports business Process Management
b. Pega-InvSvcs Supports integration services
c. Pega-WB Supports portal infrastructure
d. Pega-Rules Supports rules engine and rule resolution
Standard Services
Standard Services in pega
1. Rule-Service-COM
2. Rule-Service-CORBA
3. Rule-Service- DOTNET
4. Rule-Service-EJB
5. Rule-Service-Email
6. Rule-Service-JMS
7. Rule-Service-JSR94
8.Rule-Service-MQ

Standard FlowActions
Standard Flow Actions in pega:
1. AddToCover( Local only ) Includes the work object as sub task of cover
2. AddToFloder( Local only ) Adds the work object to the folder
3. Assign ( Local/ Connector ) Assigns the work object to the cover
4. AttachAFile ( Local only) Attaches a file to the work object
5. AttachANote ( Local Only ) Attaches a note to the work object
6. AttachAURL ( Local Only) Attaches the URL to the work object
7. CancelAssignment ( Connector only ) Cancel the current assignment
8. ChangeAssignmentSLA ( Local only ) Update SLA and related( goal, deadline and urgency) fields
for current assignment
9. ChangeWorkSLA ( Local only ) Update SLA and related( goal, deadline and urgency) fields for
current assignment and also for work object
10. Finish ( Local / Connector ) Update the status with notes and then save and close the work
object
11. Notify ( Local / Connector ) Generate correspondence (notifications ) from the list of templates
12. NotifyExternal ( Connector only) Generate correspondence ( Notifications ) to a party external to
process commander
13. NotifyQuick ( Connector only ) Initiate correspondence ( Notifications) using quick template for
rapid text entry
14. Reject (Connector only) Reject work object from further consideration, resolving it with
Rejection status.
15. RemoveFromCover ( Local Only ) Remove work object from cover
16. RemoveFromFolder ( Local Only ) Removes work object from folder
17. Resolve ( Connector only ) Complete current assignment, resolving work object accordingly
18. Save ( Local Only ) Update the work object without resolving it , saving the changes to the field
values
Service-SOAP
About Soap Service
SOAP is an XML based protocol used to exchange information in a disturbed and
decentralized environment. Services implemented using SOAP is often called as web services.
SOAP service is an instance of Rule-Service-SOAP class.
SOAP services generally process service requests synchronously. That is, they
immediately perform their requested processing and return a configured response
while the calling application waits. However, you can configure SOAP services to
process service requests asynchronously, which means the service queues the request for
asynchronous execution and the calling application calls back later for the results In SOAP Service,
under Service Tab -
Activity Name- Specify the name of the activity that provides the processing for this service rule
Called as Service Activity.
Execution Mode Option
Execute synchronously- select this when you want the service to run the request
immediately. Execute Asynchronously- select this when you want the service to queue the request and
the calling application calls back later for the results.
Under Response Tab:
Data mapping of the Incoming SOAP request from an external client app to PRPC.
Request Header-
Name- of the external request header
Description:
Map To: The data type of a request header is String.
Map To Key:
Request Parameter:
Map To: Specify the destination in PRPC
Clipboard
RequestorID
Username
Password
XML ParseRule
Delimited ParseRule
Structured ParseRule
HTML PostData
Faults Tab:
Faults is a fatal processing error in the service, use the faults tab to specify data
returned to the client application when the service encountered a fatal processing error and must
return a SOAP fault message.
Mapping Error- If an error occurs while mapping incoming data from the request
message to clipboard; the system returns an exception with the specified data.
Security Error- authenticating client credentials
Service error- if a valid instance of a service activity is not found
When
Queue
Response Tab: Data mapping for the Reply message will be configured in
Response tab.
Response Header:
Map From: Specify the source of the value in PRPC
Clipboard- The source is a property or a page on the clipboard.
Constant- The source is a fixed value.
XML Stream- The source is a stream of XML data formatted by an XML rule.
HTML Stream- The source is a stream of HTML data formatted by an HTML rule.
HTML Frame- The source is a stream of HTML data generated by the service activity.
Map From Key: Specify the key for locating the property or rule in the source specified in the MAP
From Field
Clipboard- Enter the reference to a property
Constant-enter a literal string
XML Stream-
HTML Frame
HTML Stream
WSDL: web Service Description language is an XML format in which messages
containing either document oriented or procedure oriented information.
A WSDL file describes a SOAP Service. It include XML Schema information that
describes the input parameter values that need to be sent in a SOAP request message,and the output
parameter values that can be extracted from a SOAP response message.
Connectors
About Connectors
Connector is PRPC components that act as a interface between a PRPC acting as a client and an
external system acting as a Server.
A connector is implemented by any of these ten rule types:
1. Rule-Connect-BPEL
2. Rule-Connect-dotNet
3. Rule-Connect-SOAP
4. Rule-Connect-EJB
5. Rule-Connect-HTTP
6. Rule-Connect-Java
7. Rule-Connect-JSM
8. Rule-Connect-JCA
9. Rule-Connect-MQ
10. Rule-Connect-SQL
Connect-SQL:- is a connector rule which is used when any complex SQL queries such as joins or
stored procedures to update or extract information from an external database.
To configure SQL connection to an external database
In an activity use any of the RDB methods- RDB-List, RDB-Open, RDB-Save, RDB-Delete
RDB-Open- is used to retrieve a single record from the external DB and place the retrieved data in the
clipboard page as a property name and values.
RDB-List is used to retrieve multiple records from the external DB and place the retrieved results as
an embedded pages in a specified step page of class Code-Pega-List
RDB-Delete- is a method used to delete a row or multiple records from the external DB using SQL.
Under Delete Tab of connect-SQL rule contains Delete, Truncate, or Drop sql
RDB-SAVE- is used to save the content of the clipboard page into a row of an external database from
the external DB. The system saves the properties on the specified step page to the specified table in
the database. This method operates in conjunction with a Connect SQL rule that contains SQL
statements such as INSERT, UPDATE, and CREATE statements on the Save tab
Connect-MQ:-Use the Connect-MQ method to invoke a connector to an external system that uses
IBM Web Sphere MQ messaging services.
Connect-java:-Use the Connect-Java method to call a public method of an external Java class, using
a Rule-Connect-Java rule
Connect-HTTP:- Use the Connect-HTTP method to start an HTTP request/response
interaction between Process Commander and the external system identified by a Connect HTTP rule
(Rule-Connect-HTTPrule type).
Connect-JMS:-Use the Connect-JMS method to send a JMS message to an external system using the
Java Message Service application programmer interface.
Connect-JCA:-Use the Connect-JCA method to communicate through a JCA resource adapter to an
external System

Declarative Rules

Declarative Rules
Declarative rules provide the necessary capabilities required necessary for declarative processing
Dynamically retrieve the necessary data for the situation
Reduce the need for complex procedural logic and manual exceptional handling
Makes complex processes significantly easier to automate
Deliver time and cost savings for both BPM and BRM solutions
Constraints rules (Rule-Declare-Constraints rule type)
Declare Expression rules (Rule-Declare-Expressions rule type)
Declare Index rules (Rule-Declare-Index rule type)
Declare On Change rules (Rule-Declare-On Change rule type)
Declare Trigger rules (Rule-Declare-Trigger rule types)
These rules belong to the Decision category.
Declarative rules are not referenced explicitly in other rules. Use of a property thats referenced in an
expression or constraint rule causes the expression or constraint rule (and perhaps many other rules)
to run.
Process Commander uses an inference engine and an internal data structure known as the
dependency network to support declarative processing
FORWARD CHAINING
Forward chaining provides the automatic propagation of changes in one property value to cause re
computations of another propertys value
E.g.:- Area = Length * Width
Volume = Area * Depth
The value of Volume is automatically recomputed whenever there is any change in Length,Width and
Depth For those Declare Expression rules that have 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
Delegation
In addition, a Declare Expression rule can be delegated to business managers who have the
PegaRULES:WorkMgr4 access role. The business managers can see and update only fields on the
Expressions tab.
Backward Chaining
Backwards chaining executes Declare Expression rules when a value is needed for a property,rather
than when inputs change
The Process of computing the values of one or more dependent properties in order to calculate the
value of a property is known as GOAL SEEK. Currently available for Declare-Expression rules only.
Backwards chaining applies to Declare Expression rules that have a Calculate Value field set to one of
the following:
When used if no value present
When used, if property is missing
Whenever used
E.g.:- Area= length* Width
If whenever used option is selected in the calculate value field then each time the system accesses the
Area property for a value the Declare Expression rule recomputes
Standard rules support experimentation with backwards chaining. The flow actions attempt
to find a value for the pyResolutionCost property:
VerifyProperty flow action
VerifyPropertywithListing flow action
PromptGoalSeekProperty HTML rule
VerifyProperty activity

Declarative Rules
Declare Expression: is an instance of Rule-Declare-Expressions/ is a declarative
processing which defines auto computation of property values based on expression.
This implements Backward Chaining.
What is Backward Chaining:
Backward chaining: is a technique which allows a computation in advance even the
input value or parameter is not present. BC uses Rule-Declare-Expressionand
Property-Seek-Value method together finds the missing property value by using inter dependency
network such computations are called as Goal Seeking.
Two standard flow actions called VerifyProperty andVerifyPropertyWithListing are examples of
Backward Chaining.

Declare On Change:
Rule-Declare-On Change is a declarative processing which
automatically run an activity when a value of the specified property changes. These
implements Forward Chaining.
Declare Trigger:
Rule-Declare-Trigger is a declarative processing which
automatically run an activity when an instance of specific class are created, updated or deleted in the
DB. These implements Forward Chaining
Declare Constraint:
Rule-Declare-Constraint is a declarative processing which
automatically run validation when a specified property is touched. This implements
Forward Chaining
Listeners
Listeners
Listener is a PRPC background process that waits for arriving messages in the port.
Listeners are defined by Data objects created as follows:
Email Listener forms: (Data-Admin-Connect-EmailListener class)
File Listeners forms: (Data-Admin-Connect-FileListener class)
JMS Listeners forms: (Data-Admin-Connect-JMSListener class)
MQ Listeners forms: (Data-Admin-Connect-MQListener class)
To debug listener processing, you can use the Tracer to connect to the listener
requestor, remote logging, or the System Management application.
SMA
System Management Application
The System Management application (SMA) is a Web application that developers can use to monitor
and control caches, agents, listeners, and other processing in your Process Commander system. The
URL name is prsysmgmt.
Using the System Management application, you can:
1)Review the memory used by the Java Virtual Machine on the server.
2) Review the most recent ServletRequest and HTTPRequest details.
3) Display the prconfig.xml file.
4)Access any requestor and view the clipboard, start the Tracer, examine
performance statistics, and terminate requestor processing.
5) View executing threads and their characteristics.
6) View, stop, cycle, or restart agents and listeners.
7) View open JDBC database connections.
8) View rule cache statistics, and empty the cache.
9)Force extraction and recompilation of the functions in a library.
10)Extract and compile one activity rule or model rule.
11)Start or stop remote logging.
12) Observe the utilization of requestor pools supporting stateless services.
13)Review the status of the Java class loader.
Tools > System Management Application





Userinterface

User Interface
A harness rule defines a run time form that supports application users as they enter, review, update,
and resolve work objects. Harnesses rules support the display of work object forms.
Developers define work object forms through harness rules (Rule-HTML-Harness rule type) and section
rules (Rule-HTML-Section rule type).
standard harness forms are New, Perform, Review, Confirm, Reopen, PrintReview
1)New Support initial entry (creation) of the object.
2)Perform Support users completion of assignments.
3)Review Display the work objects in display-only mode, with no fields changeable.
4)Confirm Accept a text note explaining a users reasoning about a recently
completed assignment.
5)Reopen Support reopening a previously resolved work object.
6) PrintReview Support printing of all the fields.
A section is a portion or area of a standard work object form that is incorporated on a harness form.
Sections may contain other sections, informally called subsections.
The appearance, behavior, and contents of a section are defined by a section rule (Rule-HTML-Section
rule type). Section rules are referenced in:
1) Harness rules
2) Other section rules
3) Flow action rules
4) Paragraph rules with SmartInfo pop-ups
Clipboard

Clipboard
Clipboard: is a tool used for debugging and troubleshooting aid for application developers.
Is an temporary memory area on server. Its an hierarchy structure consisting of nodes known as
pages most of which have a name and an associated class.
Pages act as a buffers or temporary copies of object instance that are copied from, or may later be
stored into, the PRPC DB or another DB.
Clipboard tool is used for developing and debugging to:
Examine property values and messages
Quickly create, update, delete and modify pages using Action menu
Quickly execute activities and start flows using action menu
We can find pages and we can Refresh or only refresh current page.
The clipboard contains three broad categories of top-level pages:
1) User Pages
2)Declared pages
3) System managed pages: requestor page, process page, and application pages, Thread
page,Operator ID, organization, orgDivision.
User Page: is a top level clipboard page that an activity creates pages using the methods like Page-
New. All the user pages will appear here once we log off, all the user pages will be removed from the
memory i.e. will not be saved to Pega DB.
If your requestor session times out, user pages may be lost, or may be saved for up to 3 days
Thread pagepxThread page is a top level clipboard page known as Thread page. The page has a
class of Code-Pega-Thread
Process PagepxProcess page is a top level clipboard page known as Process page. The page has a
class of Code-Pega-Process. This page Contains information from the Data-Admin-System instance.
Declare Page-is a clipboard page created by execution of a declare page rules (Rule-Declare-Pages
rule type. The name of the declarative pages start with Declare_. The content of these pages are
visible but Read-Only to the requestors. Such pages are created and updated only through activities
identified in a Declare Pages rule.
Declarative pages can improve performance and reduce memory requirement issues when all or many
requestors in an application need to access static information or slowly changing information.
Requestor Page- pxRequestor page is a top level clipboard page known as Requestor page. The page
has a class of Code-Pega-Requestor. The system creates a page during at login time and contains
information about our Access roles, Security, Ruleset list and HTTP protocol parameters, Work pools
available details, workbasket that we can access, connection session,Log in Date and Time details and
previous login Date and time details etc.
This page context is useful for troubleshooting and debugging.
Page Context is a property is a page List or Page Group property reference
property has mode Single Value and appears directly on a page of the Applies To class, or if creating a
context-free expression.
Decision Rules

Decision Rules
A decision table is a rule defining a series of tests performed on property values to allow an
automated decision.
Decision table are instances of the Rule-Declare-DecisionTable rule type.
Decision tables can capture and present business logic in the form of one or more if thenelse
conditions.
A decision tree rule defines a series of tests that are performed on property values to allow an
automated decision. Decision trees are instances of the Rule-Declare-DecisionTree rule type.
Decision trees can capture and present business logic in the form of one or more if thenelse
conditions.
A map value rule is a rule that converts one or two input values, such as latitude and longitude
numbers, into a calculated result value, such as a city name. The rule uses ranges for the input value
or values and a matrix to look up the result.
Map value rules are instances of the Rule-Obj-MapValue rule type. This rule type is part of the
Decision category.
When condition rule: When rule defines a true-false test based on comparing on or more property
values with constant values or with other property values. A when condition rule is an instance of the
Rule-Obj-When rule type

You might also like