PRPC: Bootcamp Exercise Guide
PRPC: Bootcamp Exercise Guide
PRPC: Bootcamp Exercise Guide
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.
www.pega.com
Table of Contents
Review the Application Profile
17
21
23
31
37
39
41
43
45
49
57
61
Case Management
63
69
77
Configure an SLA
81
iv
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
Tasks
You have been asked to perform the following SSA/LSA tasks:
l
l
l
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.
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
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.
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.
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.
Since you will not use Visio to edit flow rules in this course, click Continue with save and remove Visio
editing for this flow.
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
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:
10
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
Control
Text Input
Text Input
Text Input
Text Input
Text Input
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
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.
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
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.
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.
15
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
17
the entries in the Property Names column to the mixed-case equivalents, as shown in the following example.
18
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.
19
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
21
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.
23
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.
24
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.
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
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
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.
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.
27
i.
ii.
iii.
iv.
v.
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
Reference Materials
l
l
l
l
l
29
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
.GrandTotal
Control
Options
pxDateTime Required
Reordering
Row
Numbers
Sorting
pxCurrency Read Only
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.
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
Field
Value
32
Report Definition
ABC-FW-SalesOrderFW-Data-Product
BrowseProducts
ProductName
Select a Product
ProductName
ProductID
CatName
CategoryName
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
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
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.
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.
Reference Materials
l
l
36
PRKB-26404 - How to configure a Dynamic Select Control using a Report Definition rule
Developer Help - About Validate rules
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.
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
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 [email protected], and change the full name for the
[email protected] operator ID to [email protected].
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 [email protected].
c. Open the [email protected] operator ID. In the Full Name field, enter [email protected].
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 [email protected] 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 [email protected]. 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 [email protected], 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.
39
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
41
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
Value
AddWorkObjectParty
Customer
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
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
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
disregard this error, and the additional email attached to the work item notifying you of the failure.
Reference Materials
l
l
47
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
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
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.
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
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
Parameter
PageName
ObjClass
Value
Temp
ABC-FW-SalesOrderFW-Data-Product
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
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
55
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.
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.
57
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
l
l
59
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
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
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
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
65
66
does not appear, verify that the order total exceeds $1000.
Reference Materials
l
l
67
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
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
g. Use the default settings for the remainder of the wizard, and then click Finish.
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.
71
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
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.
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
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 [email protected] 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
75
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.
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.
78
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.
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.
81