You are on page 1of 87

PRPC: Bootcamp Exercise

Guide

PRPC Version:
Course ID:

Copyright 2012
Pegasystems Inc., Cambridge, MA
All rights reserved.
This document describes products and services of Pegasystems Inc. It may contain trade secrets and proprietary
information. The document and product are protected by copyright and distributed under licenses restricting their use,
copying distribution, or transmittal in any form without prior written authorization of Pegasystems Inc.
This document is current as of the date of publication only. Changes in the document may be made from time to time at the
discretion of Pegasystems. This document remains the property of Pegasystems and must be returned to it upon request.
This document does not imply any commitment to offer or deliver the products or services described.
This document may include references to Pegasystems product features that have not been licensed by your company. If
you have questions about whether a particular capability is included in your installation, please consult your Pegasystems
service consultant.
For Pegasystems trademarks and registered trademarks, all rights reserved. Other brand or product names are trademarks
of their respective holders.
Although Pegasystems Inc. strives for accuracy in its publications, any publication may contain inaccuracies or
typographical errors. This document or Help System could contain technical inaccuracies or typographical errors. Changes
are periodically added to the information herein. Pegasystems Inc. may make improvements and/or changes in the
information described herein at any time.

This document is the property of:


Pegasystems Inc.
101 Main Street
Cambridge, MA 02142-1590

Phone: (617) 374-9600


Fax: (617) 374-9620

www.pega.com

Document: PRPC: Bootcamp Exercise Guide


Updated: 6/21/2012

Table of Contents
Review the Application Profile

Run the Application Accelerator

Create the Draft Flows

Create the Draft UI

Create the Data Model

17

Capture Baseline Performance Data

21

Collect Customer Information

23

Allow Sales Agents to Select Order Items

31

Review and Submit Orders

37

Route Sales Orders for Manager Approval

39

Conduct Functional Performance Testing

41

Create a Work Party

43

Send Notifications to a Work Party

45

Review and Select Previous Orders

49

Create Sales Order Reports

57

Conduct Final Performance Testing

61

Case Management

63

Submit an Order from the Web

69

Update the Inventory Database

77

Configure an SLA

81

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

iv

Review the Application Profile


Scenario
Business architects (sometimes referred to as business analysts) use the Application Profile (AP) to gather requirements,
capture business objectives, and estimate the scope of work. The Application Profile wizard provides us with tools and
processes to reduce the complexity and time required to capture all relevant aspects of a process, from the discovery of
the business to details such as the resources required for the project.

Tasks
You have been asked to review the application requirements captured in the Application Profile.
Note: When building the application, refer to the specifications in the Application Profile document for in-depth
requirements to complete each development task.

How To Do It
1. Open the existing Application Profile (AP-1) on your system.
2. Use the Actions menu to review the project overview and actors.
3. Step through the profile, reviewing each step, and then complete the Application Profile. Use the Instructions icon
to view the help text associated with the screen.

Reference Materials
l

PRKB-26371 - DCO 6.2 - Creating Application Profiles and Discovery Maps

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

Run the Application Accelerator


Scenario
The Application Accelerator (AA) is used by Senior System Architects (SSAs) and Lead System Architects (LSAs) to
create the class structure and baseline rules for applications. (On some projects, system architects may participate in this
process.) The LSA or SSA uses the Application Profile (AP) as an input, using the information collected by a business
architect during the discovery process to quickly create a starting point for the application.

Tasks
You have been asked to perform the following SSA/LSA tasks:
l
l
l

Run the Application Accelerator, using AP-1 as an input.


Change the organization to ABC.com and the division to Sales.
Create the application starting point.

How To Do It
1. Launch the Application Accelerator, and use the information provided in Application Profile AP-1 as a starting point.
2. Create the following organization structure for the application, then create the test operators.

Name

Organization

Division

ABC.com

Sales

3. Click each tab of the Application Accelerator to review the information that will be used to create the classes and
baseline rules of the application.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

4. When you reach the Review Application tab, review all the rules that will be created, and then click the Class
Structure tab to review the class structure.
5. Build the application starting point. Once the ApplicationAccelerator finishes, switch to the new application.

Reference Materials
l

PRKB-26391 - DCO6.2 - Using the Application Accelerator

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

Create the Draft Flows


Scenario
The first step in building an application is to create draft flows. Draft flows are used to quickly model a process, without
first creating all of the required rules. This allows us to verify the business process with stakeholders and get their buy-in,
before we create individual forms and the data model.
These flows orchestrate our process (in this case, the Sales Order process) by sequencing the presentation of work forms
outlined in the specifications. A draft flow should include all of the steps we anticipate for the process. Each step should be
documented with the appropriate specification collected in the Application Profile.

Tasks
You have been asked to modify (or replace, if necessary) the draft flows created by the Application Profiler and Application
Accelerator.

How To Do It
1. Disable rule check-out on the framework RuleSet.
Best Practice: When developing an application in a multi-developer environment, you should never disable rule
check-out, as this allows developers to overwrite each other's rules. However, in this training environment, you can
disable rule check-out for your convenience.
2. Add the following specifications to the corresponding Subprocess shape in the StartSalesOrder flow.

Subprocess
Agent Collects Order Info
Manager Reviews Order

Specification
AgentCollectsOrderInfo
ManagerReviewsOrder

3. Replace the AgentCollectsOrderInfo flow rule created by the AA with a tabbed screen flow of the same name, to
better allow sales agents to gather information about the sales order. Add the following three assignments to the
flow, and save the flow as a draft flow.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

Assignment
Review Previous
Orders
Select Order Items
Review Order Items

Instructions
Review the customer's previous
orders
Select the items for this order
Review and submit this order

Flow Action

Specification

ReviewPreviousOrders ReviewPreviousOrders
SelectOrderItems
ReviewOrderItems

SelectOrderItems
ReviewOrderItems

4. Modify the ManagerReviewsOrder flow to rename the Approve Sales Order to Review Sales Order. Add Reject
and Approve connectors to this assignment. Add specifications, work statuses and instructions to the assignment,
the connectors, and the Update Status utility shapes.

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

a. Change the name of the Approve Sales Order to Review Sales Order, and set the status to PendingApproval.
b. Reposition the Reject Sales Order connector to start from the Review Sales Order assignment. Delete the
Reject Sales Order assignment.
c. Click the Display Likelihood icon
to view the likelihood on each connector in the flow.
d. Add the standard flow actions Approve and Reject to the connectors leading from the Review Sales Order
assignment (these will be changed later). Add specifications and audit note text for each, and then add a
likelihood of 95% and 5%, respectively.
e. Add the UpdateStatus activity to the two Update Status utilities. Set status work as Resolved-Completed
and Resolved-Rejected as appropriate. Do not add any rules to the other Utility shapes.

f. Save the flow.


Note: When you save the flow for the first time, PRPC prompts you with the following warning about saving
the flow with changes made outside of Visio.

Since you will not use Visio to edit flow rules in this course, click Continue with save and remove Visio
editing for this flow.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

Reference Materials
l
l

PRKB-26373 - Introducing Process Modeler, an alternative to Visio for creating and editing flows
PRKB-26401 - How to create a screen flow

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

Create the Draft UI


Scenario
Developers create a mocked-up, or draft, UI to help verify the sequence of steps in a draft flow. The draft UI is a rapidly
built Proof of Concept (PoC)that a developer can share with business analysts, SMEs, executives and other stakeholders
for review. This review allows the project stakeholders to propose changes if necessary and sign off on the design before
investing significant development effort.
In this exercise, you will create the UIfor each step in your draft flows. Remember the following guidelines when building
the UI:
l
l

Do not create any part of the data model at this time.


Do not format your fields to make them look like the mockups, though you do want to use the appropriate browser
control (text field, drop-down list).
Concentrate on how the UI should look, not how the UI should work. Your goal is to provide enough detail in each
form to obtain approval from the business stakeholders.

Tasks
You have been asked to create draft sections for each work form used in the Sales Order process. Refer to the Application
Profile specifications and the following examples.
Customer Information:

Review Previous Orders:

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

Select Order Items:

Review Order Items:

Manager Reviews Sales Order: (Approve)

10

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

Manager Reviews Sales Order: (Reject)

How To Do It
1. Create a mockup of the Customer Information work form in the class group. Create a section for the Customer
Information screen, and then create the section for each tab.
a. Create the ShippingProfile section in the class group. Add labels and Text Input controls, using the mockup
as a reference. Add a header for the layout, specifying the format as A, the header type of Bar, and a title of
Shipping Information.

b. Repeat step 1.a to create a section named CompanyProfile in the class group. Add the following labels and
controls to the layout, and delete the unused columns. Title the layout Customer Information.

Label
Company Name
Contact Name
Contact Title
Contact Email
Phone
Fax

PRPC: Bootcamp Exercise Guide

Control
Text Input
Text Input
Text Input
Text Input
Text Input

Pegasystems Inc. 2012 All Rights Reserved

11

c. Create a section named CustomerInformation in the class group. In the first row, add an auto complete
control labeled Company Name.
Note: Do not configure the Auto Complete control at this time. You will configure this control in a later
exercise. Remember that your goal is not to create a fully-functional UI, but rather to create a UI to show to
the stakeholders and get their approval.
d. In the CustomerInformation section, create a tabbed layout that contains the CompanyProfile and
ShippingProfile sections. Modify the title of each tab to match the section name.
Note: Remember to delete the tab that contains the empty Smart Layout.

e. Save the section and then click the Preview icon to review the section. If the Shipping Profile tab is the
active tab, return to the rule form and click the Company Profile tab, then save the rule.

12

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

2. Open the New harness (found in the class group), delete the contents of Container 1, and then add the
CustomerInformation section to the container. Title the container Enter Customer Information.

3. Run the process to see the sections.


4. Create a section named ReviewPreviousOrders in the class group, to display the previous orders for the selected
customer.
a. Add a free-form layout to represent previous order data. Add labels for the layout, and enter sample data for
each row, as indicated in the specification.
b. Delete the empty Smart Layout.
c. In the right-most column of the first row, add a button labeled Add to Order.

d. View your changes using the preview icon.


5. Create a flow action named ReviewPreviousOrders in the class group and then drag the ReviewPreviousOrders
section onto the flow action.
6. Run the process. Click Create to navigate to the Review Previous Orders tab.
7. Create a section named SelectOrderItems in the class group, to display a form listing the items that can be selected
for the order.
a.
b.
c.
d.

In the first row, add a Calendar control labelled Date Submitted.


Add a Repeating Grid layout below the existing layout.
Change the edit mode for the grid to Read/Write.
Enter the labels for all the fields using the mockup as a reference. Add controls for the columns using the
following table.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

13

Labels

Controls

Category
PromptSelect
Product
PromptSelect
Qty Requested
Text Input
e. Add a new Smart Layout below the grid. In the first Label field, enter Grand Total.

f. Create the SelectOrderItems flow action, and then add the SelectOrderItems section to the flow action.
Run the process and navigate to the Select Order Items step to verify your mockup.
Note: The Select you added to the layout uses the PromptSelect control to display a drop-down list that
contains static data. When you create the actual UI, you will replace these PromptSelect controls with
DynamicSelect controls, which can display data from outside sources, such as an external database. You
can use the DynamicSelect control in your draft UI, but this causes errors when you add or remove list rows.
While you can ignore these errors in a draft UI, you may wish to avoid them when demonstrating the UI to
stakeholders.
8. Create a new section named ReviewOrderItems in the class group. This section will provide a summary of the
selections made in other screens.

14

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

a. Add the CompanyProfile and ShippingProfile sections onto this section, using a free-form layout.
b. Add the SelectOrderItems section below the free-form layout.

c. Add the ReviewOrderItems section to a new flow action named ReviewOrderItems.


d. Run the process, and then navigate through the three screens in the screen flow.
Tip: If time allows, return to the ReviewOrderItems section and apply the Accordion header to the sections
on the form to see how their appearance changes at run-time.
9. Create a section named Approve in the class group. Add the ReviewOrderItems section, then delete the empty
Smart Layout.
10. Run the process and then click Finish to see the Approve screen.
Note: You do not need to create the flow action to call this section, or the Reject section you create in the next step.
When you run the process, PRPC calls the standard Approve (or Reject) flow action, which in turn references a
section of the same name. Rule resolution then calls the most-specific section with that name which you create in
this exercise.
11. Create a new section named Reject and add a text area labeled Enter Rejection Note.

12. To view the Reject form, run the sales order process to the Approve screen, then click Other Actions and select
Reject.

Reference Materials
l

PRKB-26207 How to model the user interface of your application before all properties are defined.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

15

Create the Data Model


Scenario
ABC's Sales Order application requires data to perform work. Some of this data is collected by the sales agent as they
create a customer order. Other data comes from an external database, which manages product inventory and customer
information for ABC. To capture this data, you need to create data classes and properties together referred to as a data
model for the application.

Tasks
You have been asked to:
l

Create mappings between the following three tables in ABC's external database and your Sales Order application.
o Customers information about ABC's customers, such as name, address, and phone number.
o Product information about the products ABC sells, including quantity in stock and unit price.
o Categories information used to manage the presentation of product information by grouping items into a
fixed set of categories, such as beverages and condiments. This information allows the sales agent to more
easily select the product sought by the customer.
Create additional properties to collect the following information.
o Order submission date.
o Total cost for the entire order.
o An explanation for order rejection.
o Quantity requested for each item.
o Total cost for each item.

How To Do It
1. Create the Customers, Product, and Categories data classes and map them to the external Customers, Product,
and Categories database tables, respectively.
a. Launch the Database Table Class Mapping wizard.
b. Select the ABC database, the CUSTOMERS table, and the SalesOrderFW:01-01-01 RuleSet.
Note: PRPC uses a database record supplied for you to create the connection to the ABC database. In a
real-world implementation, you would need to create this record and supply the JDBC connection string to
the database.
c. Change the default class name from ABC-FW-SalesOrderFW-Work-Data- to ABC-FW-SalesOrderFWData-Customers. Compare your wizard to the example below, then click Save.
Note: The wizard creates the data class you specify, and maps the table columns to properties in the class.
After the wizard is completed, notice that these properties and a data transform rule have been created in the
class.
Note: When using the Database Table Class Mapping wizard to import properties from a database, the
property names are mapped from the column names in the specified table. In DB2 databases, the column
names are in uppercase. To comply with the PRPC best practice of using mixed-case property names, edit

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

17

the entries in the Property Names column to the mixed-case equivalents, as shown in the following example.

d. Repeat steps 1.a - 1.c to create the ABC-FW-SalesOrderFW-Data-Product class.


e. Repeat steps 1.a - 1.c to create the ABC-FW-SalesOrderFW-Data-Categories class.
2. Use the Define Properties wizard to create the properties needed for the application.
a. Right-click the class group , then click Define Properties to launch the wizard.
b. Add an embedded page property named Customer, which references the Customers class created by the
Database Table Class Mapping wizard.
c. Add an embedded page list property named ItemList, which references the Product class.

18

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

d. Add the single-value properties GrandTotal (Decimal), RejectionNote (Text), and DateSubmitted (Date).

e. Click Finish.
f. Create the single-value properties QtyRequested (Integer) and LineTotal (Decimal) in ABC-FWSalesOrderFW-Data-Product. Enter Qty Requested and Line Total as the short descriptions.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

19

Capture Baseline Performance Data


Scenario
PRPC captures the performance indicators during the execution of a process. The Performance Analyzer (PAL) allows
developers to analyze these indicators, to help them improve application performance. PAL can capture an initial snapshot
of system performance, which we can use as a baseline for comparison to system performance after later development
iterations. When conducting this type of performance analysis, we need to focus on the change or delta between the
baseline and later readings.

Tasks
You have been asked to run the Performance Analyzer to take a baseline performance reading for the SalesOrder process.
Best Practice: You should benchmark your application development process with regular performance analysis at the
completion of major milestones. This allows you to identify performance issues due to application design and correct these
issues prior to releasing the application into production.

How To Do It
1. From the Run menu, click Performance to launch the Performance Analyzer (PAL).
a. Run the process from beginning to end, to force assembly of all the rules used during the Sales Order
process.
Tip: Rules assembly slows down system performance by adding processing time to compile or assemble
the rules called during the process. Once PRPC assembles these rules, your application performance can
improve significantly. To avoid skewing your performance readings with rules assembly processing, you
should first run through the process to assemble its rules, then clear those readings and re-run the process to
capture performance data.
b. Close the Process window. Start the process again, but do not advance beyond the New harness. Click
Add Reading to get the DELTA values. The value in the RAElapsed column should now read 0.00, which
indicates that no rules assembly occurred.
c. In the Performance window, click Reset Data.
d. Click Create and take another reading. Continue navigating through the process and click Add Reading for
each step.
2. Once you have finished running through the entire process, click Save Data to save your readings to your desktop.
As you develop the application iteratively, you will collect PALinformation for all user screens.

Reference Materials
l

PRKB-24177 - Overview of the Performance Tools (PAL)

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

21

Collect Customer Information


Scenario
ABC wants to collect the customer's information before creating a sales order. This customer information includes
company name, address, city, state, postal code, and contact information for the individual who will receive the order.
When the sales agent selects a customer name from the existing customer list, the customer and shipping information
must be populated automatically.

Tasks
You have been asked to design the Customer Information work form.
Before starting this exercise, refer to the Agent Collects Order Info specification for additional information.

How To Do It:
1. Copy the CompanyProfile and ShippingProfile sections from the class group to the appropriate data class.
Best Practice: Whenever possible, you should save rules that reference properties in this case, the
CompanyProfile and ShippingProfile sections in the same class as the properties they reference. This
eliminates the need to refer to the embedded page as part of the property reference, and ensures the proper context
for those property references.
2. Add property references to the CustomerInfomation, CompanyProfile, and ShippingProfile sections.
a. Open the CustomerInfomation section created in ABC-FW-SalesOrderFW-Work.
b. Open the Properties panel for the Company Name field in the Smart Layout. For Property, select
.Customer.CustomerID.
c. Open the Properties panel for the Company Name label in the Smart Layout. Confirm that the Label For
field contains .Customer.CustomerID.
d. On the Pages & Classes tab, add an entry for the .Customer page, as shown in the following example.

e. Change the sections referenced by each tab to use the sections you saved to the data class.
f. Open the ShippingProfile section in the data class and add property references for each field.
i. Add the following properties to the section: .CompanyName, .Address, .City, .Region,
.PostalCode, .Country, and .Phone.
ii. For each label, open the Properties panel and update the Label For field with the corresponding
property name. For the State and Phone Number labels, update the label to match the property
name.
iii. Open the Properties panel for the Company Name field. On the General tab, from the Edit Options
list, select Read Only.
g. Open the CompanyProfile section. Add the properties to the fields, and set the Company Name field to
display as read-only.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

23

h. Refresh the section and verify your changes.

3. Launch the sales order process. Enter test values in all the fields and then click Create. Close the sales order.
4. Configure the Customer ID auto-complete control to list values from the Customers database table.
a. Create a report definition rule named BrowseCustomers in the Customers data class to return all company
names and customer IDs from the database.

b. Preview the report.


Note: When you view the report, notice that the results span two pages. The default behavior for report
definition rules is to limit each page of a list-type report to 50 rows. When using a report to generate a list of
data for a control, such as an auto-complete control, the control only displays the results from the first page
of the report. To display all of the results in the control, you must first disable paging for the report.

24

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

c. Return to the BrowseCustomers report definition. Click the User Interactions tab, and clear the Enable
Paging check box.

d. Configure the Customer ID auto-complete control on the CustomerInformation section rule to use this
report to return all of the company names and IDs from the Customers database table.
i.
ii.
iii.
iv.

In the Display Field field, select CustomerID.


In the Minimum Search Characters field, enter 1.
In the First Column Width (%) field, enter 20.
Select Highlight, Only match the start of string and Send Search Term . Clear the Client Cache
check box.

v. Under Additional Fields, select CompanyName in the Field column, enter CompanyName in the
Property Name column, and click the Show check box.

e. Run the process and enter a in the Customer ID field to test that the auto-complete control displays a list of
company names and IDs.
5. Open the Customer property defined in the class group. Click the Advanced tab, then select Auto-populate
Property.
Note: Enabling auto-populate for a page automatically obtains values for the properties on that page when the
operator provides a value for the class key. In this case, when the sales agent selects a customer ID, our

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

25

application automatically populates the fields in Company Profile and Shipping Profile sections, which are defined
in the ABC-FW-SalesOrderFW-Data-Customers class.
6. Test whether or not the company name is found in the database.
a. Create a property named CompanyNameFound, of type TrueFalse, in the Customers data class.
b. Create a data transform named SetCustomerInformation in the class group, to set the value of
.Customer.CompanyNameFound to "true" when the company name is found.
c. Create a when rule named IsCustomerFound in the Customers data class, to test whether the value of
.CompanyNameFound is true or false.
7. Populate the contact and shipping properties for the selected company name.
a. Configure the auto-complete to call the SetCustomerInformation data transform rule and refresh the
section when the user selects a company name.
b. Set the fields on the CompanyProfile section to display as read-only when IsCustomerFound returns a
true result.
c. Repeat step 7.b for the ShippingProfile section. Again, do not edit the Properties panel for the Company
Name field.
d. Start a new sales order. Select a company in the Customer ID auto-complete field, and verify that the
contact and shipping information automatically populates and is read-only. Then, enter Joe's Bar and Grill,
and verify that the contact and shipping information does not automatically clear.
8. When the user enters a company name that does not appear in the database, display the message Customer does
not exist; please enter information below., clear the fields on the Company Profile and Shipping Profile tab, and
move the entry to the Company Name field on each tab.
a. Create a report definition named GetCustomerDetails in the Customers data class. This report should
accept the ID of the company as a parameter, and return the address.
Note: While we automatically populate the fields in the UI, we need a method of automatically clearing them.
We can use a report to return a property that corresponds to the Customer ID; when the report returns zero
results, we'll know to clear the fields.
i. In the Column Name field, select .Address.
ii. In the Rows to Include area, select .CustomerID as the column, in the Relationship field, select Is
Equal and for Value, enter param.CustomerID. Enter Customer ID in the Caption field. In the
Prompt Mode field, select Value Only.

iii. Click the Parameters tab. For Name, enter CustomerID and for Data Type, select Text.

b. Create a declared page named Declare_CustomerDetails, which uses the report definition as a data source,
and refreshes each time you request the page.
c. Test the declare pages rule.
i. Click the Run icon in the rule form to unit test the rule.
Tip: When called, a declare pages rule creates an XML page of results. Rather than attempt to read
this XML, you can use the Clipboard to view the contents of the page.

26

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

ii. Open the Clipboard, and switch to the Standard thread. Expand the Declared Pages node, then
expand the Thread node. Select Declare_CustomerDetails and notice that the SQL statement used
to request the page data appears in the right pane, along with details about the result.

iii. Expand the pxResults node to view the results.


Note: Since we haven't specified a customer ID on pyWorkPage, our report returns all of the
customers in ABC's database. If you do not see multiple results, verify that you have closed any
open sales order tabs.
d. Set the default value of the CompanyNameFound property to true when creating a new sales order.
e. Modify the SetCustomerInformation data transform to conditionally set the value of
.CompanyNameFound.
i. Return to the SetCustomerInformation data transform.
ii. Click the Pages & Classes tab.
iii. For Page Name enter Declare_CustomerDetails.pxResults(1), and for Class select ABC-FWSalesOrderFW-Data-Customers.
iv. Add another entry for the page name Declare_CustomerDetails of Class Code-Pega-List.

v. Click the Definition tab.


vi. Add a new step. In the Action field, select When, and in the Target field, enter Declare_
CustomerDetails.pxResultCount==1. This ensures that PRPC performs the following steps only
when the query returns one result.
vii. Drag the existing Set step below the When step as a child step, and delete the empty Set step.

viii. Right-click the When step and select Add Sibling Below to add a second step to the data
transform. In the Action field, select Otherwise.
ix. In the child step, select .Customer.CompanyNameFound in the Target field, and enter "false" in
the Source field.

f. Create a data transform named RemoveCustomerDetails in the Customers data class, to clear all of the
fields on the CompanyProfile and ShippingProfile sections.
g. Add a step to the SetCustomerInformation data transform to call the RemoveCustomerDetails data
transform when the customer is not found in the database.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

27

i.
ii.
iii.
iv.
v.

Return to the SetCustomerInformation data transform.


Select the child step in the Otherwise, and click the Add a Row icon.
From the Action drop-down, select Update Page.
In the Target field, select .Customer.
In the resulting child step, select Apply Data Transform from the Action drop-down, and in the
Target field, select RemoveCustomerDetails.

h. Update the SetCustomerInformation data transform to copy the contents of the auto-complete to the
Company Name field and then clear the auto-complete when the customer ID is not found in the database.
i. Add a free-form layout to the CustomerInformation section, to display the message Customer does not
exist; please enter information below. as red, bolded text. Configure the layout to display only if
.CompanyNameFound is false.

9. Run the process to test for both new and existing customers. In the Customer ID field, type g and select one of the
choices listed. Note that the other fields populate automatically. Now type Joe's Bar and Grill, and notice that
PRPC now clears the fields on the Company Profile and Shipping Profile tabs, and moves your entry to the
Company Name field.

28

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

Reference Materials
l
l
l
l
l

PRKB-26378 - Introducing the User Interface Gallery of examples


PRKB-26245 How to add tabbed header layouts to sections or harnesses
PRKB-26377 - How to define the contents of a Declare pages rule using a Report Definition rule
PRKB-26379 - Introduction to data transforms
PRKB-26383 - Using a data transform rule in a flow action

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

29

Allow Sales Agents to Select Order Items


Scenario
Sales agents should be able to select multiple products from different product categories and should see the quantity in
stock and unit price for each product selected. Then they will enter a value for the quantity to be ordered for each product
selected.
When the sales agent selects a category the list of products should dynamically change to show only the products that are
in that category.

Tasks
You have been asked to design the Select Order Items work form.
Before starting this exercise, refer to the Select Order Items specification.
Note: This exercise uses activities to implement the specified functionality. Creating activities is a task normally reserved
for Senior System Architects or Lead System Architects.

How To Do It
1. Open the SelectOrderItems section and add the following properties to the data elements defined on the section.

Layout

Label

Property

Smart Layout 1 Date Submitted .DateSubmitted


Repeat Grid
.ItemList

Smart Layout 3 GrandTotal

.GrandTotal

Control

Options

pxDateTime Required
Reordering
Row
Numbers
Sorting
pxCurrency Read Only

2. Add the following properties to the Repeat Grid layout.

Label
Product ID
Category
Product
Unit Price
Qty on Hand
Qty Requested
Line Total

Property

Control

Read Only

.ProductID
Yes
.CategoryName DynamicSelect
.ProductID
DynamicSelect
.UnitPrice
Yes
.UnitsInStock
Yes
.QtyRequested pxInteger
.LineTotal
pxCurrency
Yes

Note: With a Dynamic Select control, the property used to display the contents of the list need not be the same
property used to store the value of the selection. In this case, the Product list will display the values of
.ProductName, but will store the value of .ProductID. As you configure the control in step 3, note how the control
handles these two properties.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

31

3. Configure the Dynamic Select for the Category and Product columns.
a. Create a report definition named BrowseCategories in the Categories data class. Add the .CategoryName
property to the report as the only column of data. Run the report to test that it returns the proper data.
b. Create a report definition named BrowseProducts in the Product data class. The report should include two
columns, .ProductName and .ProductID, and should accept .CategoryName as the value of a parameter
named CatName. Test the report to verify that it filters the products based on the specified category.
c. Open the Properties panel for the Category field. Open the Parameters panel for the control, and update the
configuration using the information in the following table.

Field

Value

Method For Generating Dynamic Select Report Definition


Applies To
ABC-FW-SalesOrderFW-Data-Categories
Report Definition
BrowseCategories
SelectID
CategoryName
Default Caption
Select a Category
Property for Option Display
CategoryName
Property for Option Value
CategoryName
d. Click OK and save the section.
e. Run the process. When you reach the Select Order items screen, add a row and then check that the
Dynamic Select populates with product categories.
Note: Ignore the warning that states that the ProductID property is missing a DS caption. You will fix this
issue in the next step.
f. Return to the SelectOrderItems section, and configure the Dynamic Select control for the Product field
using the information in the following table.

Field

Value

Method For Generating Dynamic Select


Applies To
Report Definition
SelectID
Default Caption
Property for Option Display
Property for Option Value
Param Name
Select ID

32

Report Definition
ABC-FW-SalesOrderFW-Data-Product
BrowseProducts
ProductName
Select a Product
ProductName
ProductID
CatName
CategoryName

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

g. Run the process. When you reach the Select Order items screen, verify that the Product Name field
populates correctly. Select an item for the order, enter a quantity, and click Next. Open the Clipboard and
expand the ItemList page under pyWorkPage. Expand ItemList(1), and note which properties on the page
contain data.
4. Create an activity in the Product data class, to populate the ProductName, UnitsInStock and UnitPrice fields
from data in the database. Call this activity as an OnChange event for the Product dynamic select control.
a. In the Application Explorer, right-click any class, and then click New > Technical > Activity.
b. In the Applies To field, select ABC-FW-SalesOrderFW-Data-Product. For Activity Name, enter
GetProductDetails. Click Create to create the rule.
c. In the first step, for Method, enter Obj-Open, and then for Step Page, enter ProductDetails.
d. Click the Expand Method Step icon. For Property Name, select .ProductID and for PropertyValue, enter
Primary.ProductID.
Note: In this step, you use the value you know .ProductID to obtain the remaining information about the
product. The Obj-Open method opens the object that matches the given Product ID, and then writes its data
to a clipboard page named ProductDetails. Use of the Primary keyword ensures that you read from the

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

33

correct instance of .ProductID the instance on the ItemList page list by setting the context of the
property reference to the page from which the activity was called.

e. Copy the needed values from the ProductDetails page to the calling page of the activity.
f. Delete the ProductDetails page once the activity copies the data from the page.
Best Practice: You should always delete temporary pages from memory once the activity no longer needs
them, to free memory for your application. Pages that are not deleted remain in memory, and in time may
significantly degrade system performance.
g. Return to the SelectOrderItems section. Call the GetProductDetails activity as an On Change event for
the Product dynamic select, and automatically refresh the section to display the queried data.
5. Create a new sales order to test the category and product selections and verify that the other fields in that row are
populated.
6. Calculate the Line Total and Grand Total values.
a. Create a Declare Expressions rule to calculate .LineTotal, using .ItemList() as the page context. Calculate
the line total using the expression .QtyRequested * .UnitPrice.

34

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

b. Create a Declare Expressions rule to calculate .GrandTotal as the sum of all instances of .LineTotal.

c. Test the expressions by creating a sales order. Select more than one item, and specify a quantity greater
than one for each item.
7. Create the ValidateItemQty validate rule in the class group, to ensure that the quantity requested is greater than
zero and not more than the units in stock.
a. In the Property field, select .ItemList().QtyRequested.

b. In the Validation Conditions dialog, select Required and enter the condition .QtyRequested
ISGREATERTHAN .UnitsInStock. Enter the message Insufficient quantity in stock, which will display
when the condition is true.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

35

c. Repeat steps 7.a - 7.b to add a second condition that checks if the user enters a quantity less than one and
returns the message Quantity must be greater than zero.

d. Add the QtyRequested validate rule to the SelectOrderItems flow action.


e. Create a new sales order and advance to the Select Order Items screen. Select a category and a product,
and attempt to enter a quantity greater than the Qty on Hand value, and then a quantity of zero.

Reference Materials
l
l

36

PRKB-26404 - How to configure a Dynamic Select Control using a Report Definition rule
Developer Help - About Validate rules

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

Review and Submit Orders


Scenario
Sales agents must review the contents of the customer's order information and also their contact and shipping information
before they submit the sales order for approval. They have the option of going back to edit the order information if needed.

Tasks
You have been asked to implement the Review Order Items work form.
Refer to the Review Order Items specification for details.

How To Do It:
1. Create wrapper sections for CompanyProfile and ShippingProfile in the class group.
a. Open the CompanyProfile section defined in the class group. Add a section include for the CompanyProfile
section defined in the Customers data class, and delete the draft layout.
b. Repeat step 1.a to add a section control to add a reference to the ShippingProfile section from the
Customers data class.
2. Display the order items repeating grid on the ReviewOrderItems section as a read-only list.
a. Delete the existing section include that references the SelectOrderItems section.
b. Add a Repeating Grid layout below the Free Form layout. Associate the grid with the .ItemList page list, and
disable sorting on the layout.
c. Add the .ProductID, .CategoryName, .ProductName, .QtyRequested and .LineTotal properties to the
grid, and delete the Add a row and Delete icons.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

37

d. Open the Properties panel for the entire Grid Layout. On the General tab, for Style, select Spreadsheet.

3. Save the GrandTotal layout on the SelectOrderItems section as a new section, and add it to the
ReviewOrderItems section below the repeating grid layout.

38

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

Route Sales Orders for Manager Approval


Scenario
Once a sales agent submits a sales order, the application must route the sales order to a manager, who either approves or
rejects the order.

Tasks
You have been asked to design the Manager Reviews Order work form.
Before starting this exercise, refer to the Manager Reviews Order, Approve Sales Order and Reject Sales Order
specifications.

How To Do It
1. Change the section reference on the Approve section to reference the editable SelectOrderItems section instead of
the read-only ReviewOrderItems section.
2. Open the ReviewOrderItems section, and save the layout that contains the CompanyProfile and
ShippingProfile sections as a new section named CustomerInfo. Add this layout to the Approve section.
3. Change the manager of the TestUnit organization unit to Manager@ABC.com, and change the full name for the
Manager@ABC.com operator ID to Manager@ABC.com.

4.
5.
6.
7.
8.

a. Open the TestUnit organization unit, which is part of the ABC.com organization.
b. Under Staff, in the Manager field, select Manager@ABC.com.
c. Open the Manager@ABC.com operator ID. In the Full Name field, enter Manager@ABC.com.
Tip: Your exercise environment contains several users named Manager. Renaming this operator will help
you to identify the correct user for the remainder of this course.
Change the organizational unit for Architect@ABC.com to TestUnit, and add the Case Manager portal as a
secondary portal.
Route the Review Sales Order assignment to the manager of the TestUnit organizational unit.
Log off and log back in as Architect@ABC.com. Run the process and verify that the sales order is routed to the
manager for approval.
Open the Case Manager portal. Open one of the assignments pending for Manager@ABC.com, and review the
Approve flow action.
Click Other Actions and select Reject. Enter some text in the Rejection Note field and submit the work item.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

39

Conduct Functional Performance Testing


Scenario
Application performance has to be monitored periodically. Now that you have added rules to your application, it's time to
check on its performance. In this exercise you will review My Alerts and use Performance Analyzer (PAL) to compare the
readings you are about to take with the baseline reading you created at the beginning of the development process.

Tasks
You have been asked to analyze application performance:
l
l

Use My Alerts to determine if there are any performance alerts in the application that you are developing.
Run PAL to take readings for each step by running the process. Save the readings and compare them with the
readings that you took previously.

How To Do It
1. From the Run menu, click My Alerts to review the listed alerts.
Tip: For best results, log off and log back in to start a new session. Run the process and navigate through all
screens before using My Alerts.
Note: If My Alerts highlights any rule that you created, evaluate the alert code and fix the appropriate rule. If you do
not see any alerts, click All My Sessions to view the alerts that were created for all of the application rules,
including those executed in other sessions. Navigate through all of the pages to see the list and check if any of the
application rules resulted in the creation of an alert.
2. Launch PAL and take readings for each user screen.
3. Once you have finished running through the entire process, use Save Data to save your readings to your desktop.
4. Compare your readings with your preliminary baseline. The counts and times should reflect proportionate increases.
Anything that has changed significantly should be considered suspect and should be researched and fixed.
5. If you make changes, run PAL again and overwrite the files you created in step 3.

Reference Materials
l
l

Developer Help Working with the My Alerts display


PRKB-24177 - Interpreting Performance Tool (PAL) outputs

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

41

Create a Work Party


Scenario
A work party allows PRPC to associate a person, organization, or business with a work item. Using a work parties rule
makes many tasks such as sending notifications and reporting easier.

Tasks
You have been asked to add a Customer work party to the Sales Order work item. In an later exercise, you will use this
work party to send email correspondence to the customer placing the order.

How To Do It
1. Open the Default work parties rule in the class group and add a Customer work party, using the information in the
following table.

Field
Party Label
Role
Party Class
Data Transform

Entry
Customer
Customer
Data-Party-Com
Customer

2. Create a data transform to create the Customer work party, using the ContactName and ContactEmail properties
from the sales order.

3. Add a utility to the StartSalesOrder flow to call the AddWorkObjectParty activity after the sales agent submits the
order but before the manager reviews it. Configure this activity to create the Customer work party, using the
information in the following table.
Note: AddWorkObjectParty is not classified as a Utility activity, so it does not appear in the Rule SmartPrompt in
the Properties panel. You must type AddWorkObjectParty in the Rule field to use the activity.

Field
Rule
PartyRole

PRPC: Bootcamp Exercise Guide

Value
AddWorkObjectParty
Customer

Pegasystems Inc. 2012 All Rights Reserved

43

Field

Value

PartyClass
Data-Party-Com
PartyModel
Customer
PartyIDUsed
Customer
OutputPageName
pyOutput
OutputPageClass
Code-ProcessOutput
4. Run the process. Submit the sales order for approval, and review the Clipboard to verify that the Customer work
party is created on pyWorkPage.

Reference Materials
l

44

PRKB-26177 How to automatically add a work party to a work object using the addWorkObjectParty activity

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

Send Notifications to a Work Party


Scenario
ABC would like to use email to updated their customers regarding the status of their order. This email must include the
order date and the contact information of the individual. If the order is rejected it must include a reason for the rejection.

Tasks
You have been asked to design email correspondence to notify the customer when their order is either approved (see the
Approve Sales Order specification, step 6) or rejected (see the Reject Sales Order specification, step 5).
Additional information can be found in the Application Profile under Order Status Correspondence.

How To Do It
1. Update the OrderStatus correspondence rule, which was created by the Application Accelerator, to notify the
customer by email when their order has been approved.
a. In the rule form, enter the text shown in the following example. Note that there are two spaces after "your
order".

b. Add the following properties to the correspondence, using the following example as a reference.
Note: When you add a property using the Add Property dialog, it appears in the correspondence in the format
<<PropertyName>>. Do not type the property name directly into the correspondence editor.

Property Name
.pyResolvedTimestamp
.pyID
.pyStatusWork
.Customer.ContactName
.Customer.CompanyName

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

45

Property Name
.Customer.Address
.Customer.City
.Customer.Region
.Customer.PostalCode
.Customer.Country
.Customer.Phone

2. In the ManagerReviewsOrder flow, modify the NotifyCustomer utility in the Approve Sales Order path to use
the CorrNew activity to send the OrderStatus correspondence to the Customer work party.
3. Create a new correspondence rule named OrderRejected, using the following example as a guide.

4. In the ManagerReviewsOrder flow, configure the Notify Customer in the Reject Sales Order path to use the
CorrNew activity to send the OrderRejected correspondence to the Customer work party.
5. Open the Reject section, and configure the text area to reference the .RejectionNote property.
6. Test your work by completing two sales orders. At the Review Sales Order assignment, approve one and reject
the other. When you approve the sales order, remember to advance the sales order past the Update Inventory
step. Confirm that the appropriate email was sent by the application.
Note: If no email server has been configured, PRPC returns an error after it attempts to send the email. You can

46

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

disregard this error, and the additional email attached to the work item notifying you of the failure.

Reference Materials
l
l

PRKB-25576 - How to define correspondence using the rich text editor


PRKB-24210_11 - How to configure flows that automatically generate correspondence

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

47

Review and Select Previous Orders


Scenario
Sales agents must be able to view all completed orders placed by each customer, and select one of these orders as the
basis for a new order.

Tasks
You have been asked to create a form that allows a sales agent to review previous orders from a customer. If an order is
selected, it will be used as the starting point for a new order.
Before starting this exercise, refer to the Review Previous Orders specification.
Note: This exercise uses activities extensively to implement the specified functionality. Creating activities is a task
normally reserved for Senior System Architects or Lead System Architects.

How To Do It
1. Create several approved sales orders for any one customer, to generate data for the previous orders form. Note the
customer you use to place the sales orders.
2. Create a report definition named DisplayPreviousOrders, in the SalesOrder class. Configure this report to return
the order ID, creation date, and grand total for all approved sales orders placed by a specific customer.

Tip: When you save the report, PRPC warns you that the properties .GrandTotal and .Customer.CompanyName
are not optimized for reporting. While you can run this report without optimizing these properties, doing so will result

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

49

in poor performance, especially as the number of sales orders in the database increases. You should always
optimize application properties before using them in a report.
3. Optimize the properties .Customer.CompanyName and .GrandTotal for the report to improve performance.
a. Right-click .Customer.CompanyName and select Optimize for Reporting.
b. Accept the defaults and click Next until you reach the third step in the Property Optimization wizard. PRPC
automatically starts two tasks to update the property rule and database schema, and copy the property
values from the BLOB column for existing sales orders.
c. Click Column Population Jobs Dashboard to check the status of these tasks. If they are not complete,
click Refresh All to update their status until they are complete.

d. Once the column population finishes, return to the Property Optimization wizard and click Finish.
e. Repeat steps 3.a - 3.d to optimize the property .GrandTotal.
4. Create a data transform named PastOrder to copy the report results to a temporary page named PastOrders when
the sales agent reaches the Review Previous Orders step.
a. Create a declared page named Declare_PastOrders, populated by the results of the report you created in
step 2.
b. Create a data transform named PastOrder to copy the contents of the declared page to a temporary page
named PastOrders.
Note: While you could populate the repeating grid directly from the report definition, doing so limits you to the
Read Only edit mode. Since we want to use the Expand Pane edit mode to display the contents of the
previous order, we need to copy the report results to a writable page, and use that page as the source of the
list.
c. Add the data transform to the ReviewPreviousOrders flow action, to process before the flow action
executes.
5. Add a repeating grid to the ReviewPreviousOrders section, to display the list of past orders. Use the temporary
page created by the data transform in step 4 as the source of the grid, and add the columns of your report as the
columns of the grid layout.
a. Open the Properties panel for the Repeat Grid. In the List/Group field, enter PastOrders.pxResults.
b. Add .pyID, .GrandTotal, and .pxCreateDateTime to the first three columns. Set each property to display
as read-only. Enter a label for each column.

50

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

c. Delete the Add a row and Delete a row icons.

d. Click the Pages & Classes tab.


e. In the first row, enter PastOrders in the Page Name field, and select Code-Pega-List in the Class field.
f. Add a second row. Enter PastOrders.pxResults in the Page Name field. In the Class field, select the
SalesOrder class.
6. Add a button to the Repeat Grid layout. Label the button Add to Order. In the PRopertie spanel for the cell click the
Show when active check box, to configure the button to appear only when the row is active.

7. Create a new sales order, using the same customer you used in step 1. Verify that the orders you created in step 1
appear on the Review Previous Orders form.
8. Copy the details of the selected previous order to the current order.
a. Create a data transform named CopyToOrder in the class group, to copy the following properties from a page
called PastOrder to the current sales order: .ProductID, .CategoryName, .ProductName, .UnitPrice,
.UnitsInStock, and .QtyRequested.
b. Create an activity named GetSalesOrder in the SalesOrder class. This activity should open the previous
order from the database and call the data transform CopyToOrder to copy contents of the previous order to
the current sales order. Add the activity as the action on the Add to Order button.
Note: To get the entire work object, rather than specific properties, you must write an activity.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

51

i. In the first step, for Method, select Obj-Open to query the work object from the database.
ii. Enter the parameter data for the method from the following table.

Parameter

Value

OpenClass
ABC-FW-SalesOrderFW-Work-SalesOrder
PropertyName .pyID
PropertyValue Primary.pyID
iii. In the Step Page field, enter PastOrder to populate the work item on a temporary page.

Note: Remember that Primary refers to the context of the activity. Since the activity will be called
from a button in a row of a repeating grid, the context of the activity is a specific row in the repeating
grid, which corresponds to one specific sales order. This ensures that the activity uses the
corresponding .pyID value to open the order and copy it to the temporary page.
iv. Add a second step to the activity. Select the Apply-DataTransform method. Click the Expand
Method Step icon, and select the CopyToOrder data transform.

v. Add a third step to the activity, and select the Page-Remove method. In the Step Page field, enter
PastOrder.
vi. On the Pages & Classes tab, add and entry for the PastOrder page.

Page

Class

PastOrder
ABC-FW-SalesOrderFW-Work-SalesOrder
c. Configure the Add to Order button to call the activity GetSalesOrder.
i.
ii.
iii.
iv.
v.

52

Return to the ReviewPreviousOrders section.


Open the Properties panel for the Add to Order button, and click the Configure Control icon.
In the Behaviors area, click the Add a Row icon. The Behaviors dialog appears.
From the Event drop-down list, select Click. A menu of actions appears.
From the menu of actions, select Advanced > Run Activity.

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

vi. Select the GetSalesOrder activity you just created.

vii. Click OK to close the Behaviors dialog. Click OK to return to the Properties panel. Click OK to close
the Properties panel.
viii. Save the section.
d. Create a new sales order, specifying the customer you used in step 1. On the Review Previous Orders
screen, click one of the sales orders to verify that the buttons appear. Click Add to Order to copy the order
contents to the current order. Advance to the Select Order Items screen and verify that the order items have
been populated for you.
e. Create a new activity named UpdateOrderInfo to refresh the values of the properties .UnitPrice and
.UnitsInStock from the Product table.
Note: The CopyToOrder data transform currently copies these values from the previous order information
that could be out-of-date. These columns should be updated with values from the Product table before you
copy them to the sales order.
i. Create the activity UpdateOrderInfo in the Product data class.
ii. On the Pages & Classes tab, create an entry for a page named Temp.pxResults, using the following
information.

Parameter
Page Name
Class

Value
Temp.pxResults
ABC-FW-SalesOrderFW-Data-Product

iii. Return to the Definition tab.


iv. In the first step, select the Obj-Browse method. Click the Expand Method Step icon. Clear the
GetRowKey check box and the RowKey field, and enter the following paremeter information.

Parameter
PageName
ObjClass

PRPC: Bootcamp Exercise Guide

Value
Temp
ABC-FW-SalesOrderFW-Data-Product

Pegasystems Inc. 2012 All Rights Reserved

53

v. In the Field field, enter .ProductID. From the Condition drop-down list, select Is Equal. In the
Value field, select Primary.ProductID. This focuses the activity step on the desired product.

vi. Add two more rows to the method to return values for the .UnitPrice and .UnitsInStock properties.

vii. Add a second step to the activity. Use the Property-Set method to copy values from the .UnitPrice
and .UnitsInStock properties returned by the first step to the corresponding properties on the
Primary page.
viii. Add a third step to the activity to delete the Temp page.

f. Add a step to the GetSalesOrder activity to call the UpdateOrderInfo activity for each item on the
PastOrder page.

54

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

i. Return to the GetSalesOrder activity.


ii. Insert a new step between step 1 and step 2.

iii. In the Step Page field, select the PastOrder.ItemList page.


iv. Select the Call method, and press the space bar. With the cursor still in the Method field, select the
UpdateOrderInfo activity you just created.
v. Click the Expand For-Each Step icon. From the drop-down list, select For Each Embedded Page.

vi. Save the updated activity.


g. Start the process, select the customer you used in step 1, and then click Create. You will see the list of
orders previously placed by the customer. Select one order that contains a few items, click Add to Order,
and click Next. Verify that the Select Order Items screen populates with products and quantities.
Note: There is no indicator yet, but the activity now updates the Unit Price and Qty on Hand columns with
current inventory information. To confirm that the activity works as expected, you must first create the
UpdateInventory activity, which occurs in an upcoming exercise.
9. Configure the repeating grid to display the order details for each past order, so that the sales agent can review the
contents of each previous order.
Best Practice: While you could reuse the grid on the SelectOrderItems flow action to display the contents of the
order, the list would be editable. To prevent sales agents from editing the contents of a fulfilled order, you should
create a flow action that displays a similar, read-only list.
a.
b.
c.
d.
e.
f.
g.
h.
i.

Create a new flow action named ListPreviousOrders in the class gropup.


Change the short description of the flow action to Previous Order.
Create a read-only, repeating grid, and delete the icons for adding and deleting rows.
Add the Product Name, Unit Price, Qty Requested, and Line Total fields to the repeating grid.Delete the
empty Smart Layout and save the section.
Open the ReviewPreviousOrders section, and open the Properties panel for the repeat grid.
From the Edit Mode drop-down list, select Expand Pane.
Click the Details as read only check box.
Click OK to dismiss the Properties panel and save the section.
Start the process and select the customer you used in step 1. On the Review Previous Orders screen, select
a previous order and click Review Order to view the contents of the order. Click Add to Order, and
advance to the Select Order Items screen to verify that the contents match the previous order.

Tip: As the number of previous orders increases, your performance may suffer as PRPC generates lengthier lists on the
Review Previous Orders screen. To improve performance when displaying large lists, you can configure the list to load
progressively. To do so, open the Properties panel for the Grid Repeat layout, and on the General tab, select Progressive
from the Paging drop-down list.

Reference Materials
l
l
l

PRKB-26310 How to create a Declare Index rule for an embedded property with the Property Optimization tool
PRKB-26378 - Introducing the User Interface Gallery of examples
Developer Help - How to reference parts of aggregate properties

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

55

Create Sales Order Reports


Scenario
ABCwould like to run a report by managers to view the sales orders that have been ordered using the sales order
management application.

Tasks
You have been asked to:
l

Create a summary-type report, with a chart, that returns the company name, submission date, ID, grand total, and
status for each order.
Create a second summary-type report that returns the product, quantity requested, and line total for each item on an
order, and the grand total for the entire order. Use this report as a drill-down report for the first report.

Refer to the Reports and Correspondence requirements in the application profile.

How To Do It
1. Use the Property Optimization wizard to expose the following properties. Verify that each optimization job
completes before you advance to the next property.
Note: Since some of the properties you are optimizing are embedded properties, the Property Optimization wizard
needs to create a declarative index rule for these properties.

Property
.DateSubmitted
.ItemList.LineTotal
.ItemList.ProductName
.ItemList.QtyRequested
2. In the class group, create a report definition named SalesOrders, which returns the company name, submission
date, ID, grand total, and status for each order.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

57

a. Sort the first three columns in ascending order.


b. Enter a Sort Order of 1 in the Date Submitted column, and 2 in the Work ID column.

3.
4.
5.
6.

If needed, create several sales orders to populate the indexed properties and test the report.
Convert the SalesOrders report to a summary report. Group the report data by Company Name and Work Status.
Add a clustered bar chart to the report.
Create a custom drill-down report.

a. Click one of the rows in the report to open the drill-down list-type report.
Note: The columns on this report come from the default drill-down report, pyDefaultReport, which is
identified on the User Interactions tab. A drill-down report is completely different from the report that
references it, so you no longer see the Company Name and Grand Total columns.
b. Click the User Interactions tab. In the Custom DrillDownReport field, enter SODefault. Click the Open
icon to create the rule.
c. Add a column for the property .pyID to the report definition. Change the column heading to Order ID.
d. Add columns for the properties ItemList.ProductName, ItemList.QtyRequested, ItemList.LineTotal. Be
sure to use the indexed versions, which you created in step 1.
e. Add a column for the property .GrandTotal to the report definition.
f. Return to the SalesOrders report. Save and preview your report to verify that you drill down to the
SODefault report.
7. Include a clustered column chart on your SODefault report. Title the chart Order Totals by Product.
a. On the report definition, change the function on the GrandTotal column to SUM, and save the report.
b. Add a clustered column chart to the report.
c. Click Save & Preview to run the report.
8. Create a standard report category named Sales Orders.
a. Open the Case Manager portal and open the Report Browser.
b. Create the report category Sales Orders.
9. Return to your report definition in the Designer Studio and add both reports to the new category.
10. Refresh the Case Manager portal and view each report in the new Sales Orders category.

Reference Materials
l
l

58

PRKB-26147 - Report Definition rules - Beyond the basics


PRKB-26095 - Using the Report Viewer to define and evolve simple reports

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

l
l

Developer Help - Working with the Report Viewer


PRKB-26098 - Using the Report Browser to organize and manage reports

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

59

Conduct Final Performance Testing


Scenario
PRPC captures the performance indicators during the execution of a process. Developers can use the Performance
Analyzer (PAL) tool to analyze these indicators to improve the application performance.

Tasks
You have been asked to analyze the performance of your application (Functional and Performance Testing) by using
Preflight and My Alerts, and by taking PALreadings.

How To Do It
1. Run Preflight by clicking the
>Application >Guardrails > Summary. Resolve all the issues that were
found for the rules you have created.
2. From the Run menu, click My Alerts to review the listed alerts. If My Alerts highlights any rule that you created,
evaluate the alert code and fix the appropriate rule.
Best Practice: For the best results, log off and log back in to start a new session, then run the process and navigate
through all the screens, before you review the listed alerts.
3. Launch PALand take a reading for each user screen. Once you have finished running through the entire process,
use Save Data to save your readings to your desktop.
4. Compare your readings with your previous set of readings. Investigate any anomalous or significantly skewed
readings.
Tip: The counts and times returned in this set of reading should reflect proportionate increases over your previous
readings. Disproportionate changes are suspect and should be researched and fixed.
5. If you make changes, run PAL again and overwrite the files you created.

Reference Materials
l
l
l
l

Developer Help Using the Guardrails tool


PRKB-25497 - How to download a list of high-priority rule warnings
Developer Help Working with the My Alerts display
PRKB-24177 - Interpreting Performance Tool (PAL) outputs

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

61

Case Management
Scenario
ABC has added a business requirement to the sales order application. The company wants to create a second customer
tier. Customers qualify for this preferred customer tier when they place an order than exceeds $1,000.
ABC would like to offer each premium customer a survey, which they can complete after submitting their order. This
survey must include the contact information for the customer, which can be obtained from the sales order.

Tasks
You have been asked to:
l
l

Create a new covered item, named CustomerSurvey, when a customer's sales order grand total exceeds $1,000.
Obtain the customer identifier (.pyWorkPartyUri) and email address (.pyEmail1) from the sales order.

How To Do It
1. Open the Case Designer gadget by clicking

> Process and Rules >Case Management >Case Designer.

2. Add a new case to the SalesOrder work item.


a. Click +Add Case Type, located above the SalesOrder - Framework item in the Case Designer tree. The
Case Designer dialog appears.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

63

b. In the Name field, enter CustomerSurvey. In the Parent field, select SalesOrder - Framework.

c. Click OK. The CustomerSurvey case type appears indented beneath SalesOrder- Framework.

d. Click Actions, to the right of the SalesOrder - Framework case type. On the menu that appears, click
Open.

e. The pyDefault case type rule opens. Note that the CustomerSurvey class has been added to the Coverable
Work Types list.

64

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

3. Define the condition(s) under which the case will be instantiated.


a. Create a When rule named PremiumCustomer in the class group, with the condition .GrandTotal > 1000.
b. Return to the Case Designer tab. Select the SalesOrder - Framework case, and then click the Details tab.
Click the Edit link to the right of the Instantiation item to open the Case Designer: Instantiation dialog.

c. In the Case Designer: Instantiation dialog, select the PremiumCustomer rule in the Permitted When
field for Manual instantiation, and clear the Automatic instantiation check box.

d. Click OK.
4. Copy user information from the Salesorder work item to the customer survey.
a. Confirm that the SalesOrder - Framework case is still selected on the Case Designer tab.
b. Click the Edit link to the right of the Data Propagation entry on the Details tab to open the Case Designer:
Data Propagation dialog.

c. In the Case Designer: Data Propagation dialog, enter the following properties for both the target
(CustomerSurvey) and the source (SalesOrder - Framework), to provide initial values for the survey.

Set value of

To value of

.pyWorkParty(Customer).pyWorkPartyUri .pyWorkParty(Customer).pyWorkPartyUri
.pyWorkParty(Customer).pyEmail1
.pyWorkParty(Customer).pyEmail1

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

65

5. Change the icon for the Customer Survey icon.


a. Click the CustomerSurvey case type.

b. Click the Edit link, located to the right of Appearance item.


c. Select a different icon and click OK.
d. Return to the Case Designer tab and select the CustomerSurvey case type. Verify that the icon to the right
of Appearance has changed to your selection.

6. Test the CustomerSurvey case type.


a. Open the Case Manager portal from the Run menu.
b. Run the process from the New menu.
c. Select a customer, then select products totaling over $1000, and submit the sales order for approval. When
you reach the Review harness, verify that an option appears in the Actions menu to start the survey. If it

66

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

does not appear, verify that the order total exceeds $1000.

d. Select Add Work >CustomerSurvey.


e. In the New harness, click Create to create the Customer Survey work item.
f. Open the clipboard and using the Thread page open the tab thread that contains the customer survey work
item. Check that the work party values appear on the clipboard page.

Reference Materials
l
l

PRKB-26368- Introduction to the Case Designer


PRKB-26369 - Using the Case Manager portal

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

67

Submit an Order from the Web


Scenario
ABCwants to allow their customers to place orders from another web application. The order details will be sent to PRPC,
which will create a sales order using this data and then forward the work item to the manager for approval.

Tasks
You have been asked to create a web service to allow an existing customer to submit an order to ABC over the web.
Refer to the Submit Order By Customer specification for further details.
Note: Creating a new process specifically for a web service is beyond the scope of this course. This exercise focuses only
on how to call a process from a web service.

How To Do It
1. Save a new version of the StartSalesOrder flow to create a new starting flow named StartSalesOrderService. This
is the flow that will be called by the service.
a. Delete the shape which calls the AgentCollectsOrderInfo screen flow since this information is provided
through an external interface.
b. Update the short description to Sales Order Created by Service.
2. Use the Service Accelerator to generate the service.
a. Click
> Integration > Services > Service Wizard to launch the Service Accelerator.
b. On the Service Purpose step, select the following options.

Field

Value

Service Purpose
Service Type

Create and manage work


SOAP

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

69

c. On the Select WorkProperties step, select the SalesOrder work type and the flow you created in step 1.
Enable Create Work, then select the ABC.com organization.

d. On the Select Flow Actions step, do not select any flow actions.
e. On the Customize Service Data step of the wizard, expand CreateNewWork.
f. Under Primary Page Input Properties, enable Use XML for data mapping. Under Primary Page Output
Properties, enable Use XML for data mapping and select .Customer.CompanyName.

70

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

g. Use the default settings for the remainder of the wizard, and then click Finish.

h. Once you have completed the wizard, do not click Done.

Tip: Normally, you would click Done and configure the rules created by the wizard as needed. For the
purposes of this exercise, however, you should keep the wizard open on this page, which allows you to
conveniently access the rules created by the wizard.
3. Configure the CreateNewWorkRequest parse XML rule with default product ID and quantity data for testing.
Note: These default values are added for testing purposes. In a real-world application, you may not want to add
default values.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

71

a. Add the ItemList pagelist property as an element.


i. Select CreateNewWorkRequest, and then click the Add Element icon to add a new element.

ii. Double-click the node (_new_) that is created to enter the details for the node. The Node Name will be
the XML tag. For Node Name, enter ItemList, and in the Context Page field, select .ItemList.

Tip: The Context Page sets the scope for properties on a page or page list. This allows you to more
simply refer to the correct property, just as with a Repeat Grid.
Best Practice: Use the property name (in PRPC) for the tag name. This makes it easier to remember
which XML element maps to a particular property.
iii. Click the Node tab and select Repeating, and then click OK.

b. Add elements to the ItemList node for the properties ProductID and QtyRequested.
i. Select the ItemList node and click the Add Element icon.
ii. Double-click the _new_ element.

72

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

iii. On the Mapping tab, for Property, select .ProductID. In the Node Name field, enter ProductID.

iv. Click the Type tab and for Default Value, enter 61.

v. Repeat steps 3.b.i - 3.b.iv to create the QtyRequested node with a default value of 2.
4. Configure the CreateNewWorkResponse stream XML rule to return the sales order ID for the order created by the
service.
a. Open the CreateNewWorkResponse stream XML rule created by the accelerator.
b. Add a node with the name SalesOrderID, and select pyWorkPage.pyID as the source property.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

73

c. Define a class reference for pyWorkPage on the Pages & Classes tab.
5. Create an activity named PopulateOrderDetails to populate the sales order with the customer and product details
and add it to the starting flow called by the service.
a. Create a new activity named PopulateOrderDetails in the class group, which calls the GetProductDetails
activity you previously created for each item on the order.
b. Invoke the activity in the flow used by the service.
6. Deploy the WSDL using the Service Package.
a. Open the ABCFWSalesORderFWWorkSalesOrder service package.
Note: If you closed the Service Accelerator wizard, you can open a service package from the Services
landing page (
> Integration > Services).
b. On the Deployment tab, click Generate Deployment Files.
7. Test the service.
a. Open the createNewWork service rule and run the service.
i. Under the ABC-FW-SalesOrderFW-Work-SalesOrder class, expand the Integration-Services rule
category.
ii. Under the Integration-Services rule category, expand the Service SOAP rule type.
iii. Open the createNewWork service rule, and click the Run icon.
b. Select Supply SOAPRequest Envelope.

74

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

c. Input the required data directly into the XML in the simulation window. In the CustomerID tag, enter STARB.

d. Click Execute. PRPC returns the test result in a new window. Locate the work item ID (shown in the
Response Parameter Values section S-34 in this example).

e. Open the Case Manager portal, and in the Default WorkGroup, click Manager@ABC.com to view the
manager's worklist. Click the work item ID that you noted in step 7.d to open the work item. Verify that the
order was placed for Starbucks Coffee, for 2 Sirop d'rable.
Note: When you created the GetProductDetails activity, you did not need to add a step to set the
.CategoryName property, since that value was selected by the user. However, when calling your service,
you do not set the value of this property. As a result, this field appears empty when you open the sales
order. (The remaining properties that appear are either set by the service, or calculated automatically.) To
resolve this, you could add a step to the GetProductDetails activity to populate the .CategoryName activity,
or your web application could supply this information to the application through the WSDL.

Reference Materials
l
l

PRKB-25077 How to create services with the Service Accelerator


PRKB-25144 How to create and execute test cases for SOAP service rules

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

75

Update the Inventory Database


Scenario
When the sales manager approves the order, the inventory needs to be updated with the quantity that was placed in the
order. ABCwants to update the database as soon as the order is approved so that the sales agents will be able to see the
correct number of units in stock.

Tasks
You have been asked to write an activity to update the inventory database table once an order is approved.
Before starting this exercise, refer to the Update Inventory specification.
Note: This exercise uses activities extensively to implement the specified functionality. Creating activities is a task
normally reserved for Senior System Architects or Lead System Architects.

How To Do It
1. Create a new activity named UpdateOrderQuantity in the Product data class, to accept a product ID, open the
corresponding product record in the database, and then update its quantity.
a. In the first step, use the Obj-Open method to open the data record that corresponds to the ProductID on the
sales order, and copy the record to a temporary page called Product.
i. In the first step, in the Method field, select Obj-Open.
ii. Click the Expand Method Step icon.
iii. For OpenClass, select the Product data class.For PropertyName, select .ProductID and in
PropertyValue, enter Primary.ProductID.
iv. Click the Expand Method Step icon again, to collapse the method.
v. In the Step Page field, enter Product.
vi. In the Description field, enter Get product record from database to indicate the purpose of the step.

b. Add an entry for Product on the Pages & Classes tab.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

77

c. Add a second step, and use the Show-Page method to view the contents of the Product step page.
d. Test the activity.Use 32 as the Product ID and note the units in stock, which should be 500.

e. Insert a new second step, and use the Property-Set method to reduce the inventory count on the Product
page by the quantity requested on the sales order.
f. Test the activity.
i. Reset the activity temp page .
ii. Update the temp page on the Clipboard with the same Product ID you used in step 1.c. Add the
property .QtyRequested to the page, and enter a value of 17.
iii. Click Execute, and verify that the inventory has been reduced by 17, to 483.

g. Delete the Show-Page step, which shows the activity results.


h. Add a third step to use the Obj-Save method to write the Product page back to the database. This will
reduce the inventory in the database by the amount requested on the current sales order.
i. Add a fourth step to delete the Product page.
2. Create a new activity named UpdateInventory in the class group. Use the Call method to loop through the
UpdateOrderQuantity activity for each item on the order.
a. In the Step Page field, enter .ItemList.
b. Click the Expand For-Each step icon.
c. In the drop-down list, select For Each Embedded Page, and for ValidClasses select ABC-FWSalesOrderFW-Data-Product.
d. In the Method field, select the Call method and the UpdateOrderQuantity activity.

78

Pegasystems Inc. 2012 All Rights Reserved

PRPC: Bootcamp Exercise Guide

e. On the Security tab, from the Activity Type list, select Connect.
f. Save the activity.
3. Update the ManagerReviewsOrder flow to call this activity from the Update Inventory utility.
4. Test the activity.
a. Create a new sales order. Select one product, approve the order, and note the Sales Order ID.
b. Create a second sales order for the same customer. On the Review Previous Orders screen, review the
order you just placed, and note the Qty Requested value. Add the previous order to your current order, and
advance to the Select Order Items screen. Verify that the Units In Stock value has decreased by the
amount of the previous order.
Note: Now that you have added an activity to update the inventory in the database, you can verify that the
UpdateOrderInfo activity you created earlier works as expected.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

79

Configure an SLA
Scenario
Service level rules are used to enforce timely processing of the work items that are queued in a work basket or an
operator's worklist. To help enforce compliance, service level rules can execute automated actions to send reminder
notifications, re-route or escalate open assignments, or close an entire item. PRPC provides a Process API that includes
many automated actions that can be called by service level rules to perform these and other tasks.

Tasks
You have been asked to:
l
l

Create a service level rule to automatically reject and close any abandoned sales orders and covered surveys.
Add the service level to the sales order process.

Review the Sales Order SLA specification for details before starting this exercise.
Note: For the purposes of this exercise, the SLA intervals have been shortened to one and two minutes.

How To Do It
1. Create a new service level rule named ManagerReview in the class group.
2. Enter a goal time of 1 minute and goal urgency adjustment of 20.
3. Enter a deadline time of 2 minutes, and call the API activity pxForceCaseClose as an escalation activity.
Note: The activity pxForceCaseClose is an API activity used to close a work item and its sub-cases.
pxForceCaseClose is one of the activities that make up the Process API, which also includes flows and flow
actions. You can use the APIs tab on the Processes landing page to review all of the elements of the Process API.
To learn more about a specific API element, you can expand the element and review its description, intended
usage, and a list of supported parameters.
4. Configure the activity to update the work item status to "Resolved-Rejected" and add the following audit note to the
work item history: Deleted by the SLA since it has not been processed within the allotted time.
5. Add the SalesOrder SLA to the Review Sales Order assignment in the ManagerReviewsOrder flow.
6. Test that the SLA automatically resolves the work item.
a. Create a sales order. Submit the order to a manager for approval. Note the sales order ID.
b. Click
> Process &Rules >Tools > My Work >Work Entered by Me, to open a list of work items
that you have created.
c. Identify the work item that you created and check its status; if the work item is not resolved yet, wait for few
more minutes and click Run to refresh the list.
d. Click on the link to open the work item, then click Review to open the work item. Click the Audit link to
verify that the audit note was written to the work item history.

PRPC: Bootcamp Exercise Guide

Pegasystems Inc. 2012 All Rights Reserved

81

You might also like