Вы находитесь на странице: 1из 202

Senior System Architect

8.2
Exercise Guide
© 2019
Pegasystems Inc., Cambridge, MA
All rights reserved.

Trademarks

For Pegasystems Inc. trademarks and registered trademarks, all rights reserved. All other trademarks or service marks are
property of their respective holders.

For information about the third-party software that is delivered with the product, refer to the third-party license file on
your installation media that is specific to your release.

Notices

This publication describes and/or represents products and services of Pegasystems Inc. It may contain trade secrets and
proprietary information that are protected by various federal, state, and international laws, and distributed under
licenses restricting their use, copying, modification, distribution, or transmittal in any form without prior written
authorization of Pegasystems Inc.

This publication is current as of the date of publication only. Changes to the publication may be made from time to time
at the discretion of Pegasystems Inc. This publication remains the property of Pegasystems Inc. and must be returned to
it upon request. This publication does not imply any commitment to offer or deliver the products or services described
herein.

This publication may include references to Pegasystems Inc. product features that have not been licensed by you or
your company. If you have questions about whether a particular capability is included in your installation, please
consult your Pegasystems Inc. services consultant.

Although Pegasystems Inc. strives for accuracy in its publications, any publication may contain inaccuracies or
typographical errors, as well as technical inaccuracies. Pegasystems Inc. shall not be liable for technical or editorial errors
or omissions contained herein. Pegasystems Inc. may make improvements and/or changes to the publication at any time
without notice.

Any references in this publication to non-Pegasystems websites are provided for convenience only and do not serve as
an endorsement of these websites. The materials at these websites are not part of the material for Pegasystems
products, and use of those websites is at your own risk.

Information concerning non-Pegasystems products was obtained from the suppliers of those products, their
publications, or other publicly available sources. Address questions about non-Pegasystems products to the suppliers of
those products.

This publication may contain examples used in daily business operations that include the names of people, companies,
products, and other third-party publications. Such examples are fictitious and any similarity to the names or other data
used by an actual business enterprise or individual is coincidental.

This document is the property of:

Pegasystems Inc.
One Rogers Street
Cambridge, MA 02142-1209
USA
Phone: 617-374-9600
Fax: (617) 374-9620
www.pega.com
DOCUMENT: Senior System Architect Exercise Guide
SOFTWARE VERSION: Pega 8
UPDATED: 02 2019
CONTENTS

Exercise: Creating new application rulesets 1


Exercise: Configuring application rulesets 4
Exercise: Merging a development branch 9
Exercise: Rule resolution 14
Exercise: Circumstancing rules on a single variable 18
Exercise: Circumstancing rules on multiple values 22
Exercise: Searching for duplicate cases 26
Exercise: Working with temporary cases 32
Exercise: Configuring parallel processing 36
Exercise: Configuring flow action pre- and post-processing 44
Exercise: Configuring a decision table 47
Exercise: Configuring a cascading approval process 55
Exercise: Updating assignment routing 60
Exercise: Creating work status values 65
Exercise: Customizing a harness 70
Exercise: Customizing a portal 74
Exercise: Enabling accessibility features in an application 79
Exercise: Localizing a UI form 82
Exercise: Source a page property with a keyed data page 85
Exercise: Reading and writing data to a database 91
Exercise: Creating a SOAP connector 97
Exercise: Simulating integration data 107
Exercise: Managing global resource settings 113
Exercise: Configuring error handling for data pages 120
Exercise: Exposing an application with a SOAP service 127

i
©2019 Pegasystems
Exercise: Accessing a Pega application using the Pega API 140
Exercise: Creating reports that combine data from multiple classes 143
Exercise: Secure an application using role-based access control 147
Exercise: Secure an application using attribute-based access control 150
Exercise: Queueing a task for background processing 157
Exercise: Reviewing log files 160
Exercise: Debugging an application using Tracer 163
Exercise: Analyzing application performance 169
Exercise: Designating a relevant record 171
Exercise: Migrating an application 180
Exercise: Deploying a mobile app for Pega Platform 186

ii
©2019 Pegasystems
Before you begin

Senior System Architect overview


The Senior System Architect course is an intermediate course designed to help application developers
further their knowledge of application development on Pega Platform™. The lessons in this course
focus on tasks that a senior system architect performs to develop a Pega application.
The exercises in this course are based on Pega Platform 8. You may notice slight navigation changes in
the Pega Platform in subsequent releases.

Objectives
After completing this course, you should be able to:
l Create and extend a Pega Platform application
l Manage rules and rulesets
l Manage the specialization and reuse of rules
l Manage data access within an application
l Manage data access between a Pega Platfomr application and external systems
l Manage integration settings
l Configure application security and user privileges
l Design and build mobile apps for Pega Platform applications

Prerequisites
l Completion of System Architect Essentials

iii
©2019 Pegasystems
Completing the exercises
When learning new concepts or skills, there is no substitute for learning by doing.
This course includes exercises that provide practical, hands-on experience to help you apply your new
skills immediately.
The exercises help reinforce the learning objectives of each lesson. They include a scenario that
describes a business problem that needs to be solved and an overview of the tasks you need to
perform to complete the exercise.
To help you complete the exercises, two levels of support are provided:
l Your Assignment — specifies the high level steps you need to perform to solve the business
problem provided in the scenario.
l Detailed Steps — shows the series of steps needed to complete the exercise.
It is our goal that you can complete the exercises using the scenario and the tasks noted in your
assignment. Use the detailed steps to check your work, or as a last resort to complete the exercise.

Exercise environment
The exercise system for this course is available online and accessed through the Open Exercise
System link on each exercise page. Use the credentials provided in each exercise scenario.
Click the Open Exercise System link to log in to your exercise environment. Enter the credentials
provided in the scenario. After you complete an exercise, log out of the exercise environment. Ensure
you use the correct credentials to log in for each exercise.
Note:  The exercise environment provides a pre-built Pega Platform application configured specifically
for this course. This allows you to focus on the key tasks of each exercise without having to complete
ancillary tasks.

Exercise guide reference


While individual exercises are included for each lesson online, you may find it useful to download and
print out the complete exercise guide. This is available in the related content section on the right side
of this lesson.

iv
©2019 Pegasystems
Business use cases: HRApps and ReserveIt

HRApps
TGB, Incorporated is a global IT solutions provider that wants to automate the management of various
Human Resources (HR) functions including:
l Candidate recruitment
l Employee onboarding
l Benefits enrollment
l Employee reviews
l Payroll setup
TGB has already implemented an HR administration application. The HR department wants to update
functionality to reflect policies and processes specific to TGB.
Important: Each exercise includes a unique scenario and assignment that identify the specific
business problem to address. Before you attempt each exercise, review the scenario and assignment
to understand the goal of the exercise.

ReserveIt
ReserveIt is an online marketplace, owned by ABB Corp., that lets people rent out homes or apartments
to guests. Property owners can create a listing describing the property and identifying the amenities
offered with a rental. Customers can browse the listings to request a rental. The application manages
the reservation process, including any exchanges between the owner and prospective renters.
The Product Manager for the ReserveIt application has identified usability issues with the current
version of the application and wants to address these issues as part of a larger update.
Important: Each exercise includes a unique scenario and assignment that identify the specific
business problem to address. Before you attempt each exercise, review the scenario and assignment
to understand the goal of the exercise.

v
©2019 Pegasystems
Exercise: Creating new application rulesets
Scenario
Your manager wants to preserve the initial starting version of the HRApps application before
developers begin configuring application functionality. To ensure that the initial versions of the
application rulesets are preserved unchanged, your manager requests that you create new application
rulesets for this development cycle.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Increment the application rulesets for the HRApps application to 01-01-02 versions.
Important: When you complete this exercise, you lock the 01-01-01 version of each application ruleset.
You cannot modify rules contained in a locked ruleset version. To modify a rule after you lock the 01-
01-01 ruleset version, open the rule and save a copy of it into the unlocked 01-01-02 version of the
ruleset.

Detailed steps
1. In Dev Studio, select Configure > Application > Structure > RuleSet Stack to open the ruleset
stack tab of the Application Structure landing page.
2. Verify that there are no checked-out rules for the rulesets. Check in any rules before proceeding.

1
©2019 Pegasystems
3. Click Lock & Roll to open the Lock & Roll window to increment the application and the application
rulesets.

4. In the Lock & Roll window, select all application rulesets to be locked.
5. For each selected ruleset, in the Password field, enter password to lock the ruleset.
6. Select Roll for all application rulesets.
7. For each selected ruleset, in the Roll to Version field, enter 01-01-02.
8. Update the Description to the new version.
9. Select Update my Application to include the new RuleSet Versions.
10. Click Run to lock and roll the ruleset and create a new version of the application.

2
©2019 Pegasystems
Note: In a real-world application, the next step you must perform is to update the default designation
ruleset for operators associated with each access group. Due to security restrictions in the exercise
environment, you cannot perform this step.

Verify your work


1. Close the Lock & Roll window to return to the RuleSet Stack tab.
2. From the top banner, click Refresh.
3. The updated Rulesets are displayed below the current application HRApps:01.01.01.

3
©2019 Pegasystems
Exercise: Configuring application rulesets
Scenario
The Human Resources (HR) department requests the ability to update rules that describe department
and company policies in the HRApps application.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Add the HRDelegatedRules ruleset to the HRApps application as a production ruleset to support the
delegation of rules to the HR department for maintenance.
Note: Due to security concerns, users are unable to update access group records in the exercise
environment. As a workaround to this limitation, an alternate access group has been staged in the
exercise environment. This alternate access group is configured with the HRDelegatedRules:01-01
ruleset as a production ruleset. In this exercise, switch to the alternate access group.
Important: In this exercise, you confirm access to the production ruleset for one access group. For an
application in a production environment, you must update each access group to reference the
production ruleset.

Detailed steps
Follow these steps to add rulesets to an application rule.
1. In Dev Studio, click HR Apps > Switch Application > HRApps (Administrators access group with
delegation ruleset) to switch applications to the HRApps application configured with a delegation
ruleset.

4
©2019 Pegasystems
2. From the Application menu, click HR Apps > Definition.

3. At the bottom of the Definition page, expand the Advanced section and add the
HRDelegatedRules:01-01 ruleset to the Production rulesets (customization) section.

4. In the lower-left corner, click the user icon > Access group to open the Access group to which
SSA@TGB belongs. The Edit Access Group form is displayed.

Note: Rulesets added to the Production rulesets list require that specific access be granted
through the access group.
Note: A severe guardrail warning is generated because the preconfigured access group references
a production ruleset that is undefined in the application. Adding the production ruleset to the
application resolves the warning, but exercise system limitations prevent you from saving the
access group to resolve the warning. For this exercise, disregard the warning.

5
©2019 Pegasystems
5. On the Advanced tab on the Edit Access Group form, verify the HRDelegatedRules:01-01 ruleset is
configured in the Production Rulesets list.

Verify your work


1. Open the operator profile for SSA@TGB.

6
©2019 Pegasystems
2. Confirm that the HRDelegatedRules ruleset is available in the Rulesets list.

3. Switch back to the HRApps (Administrators for the HRApps application) application.
Note: Switching applications switches you back to the original access group that does not include
the production ruleset.

7
©2019 Pegasystems
4. Open the operator profile for SSA@TGB to confirm the production ruleset is unavailable in the
Rulesets list.

8
©2019 Pegasystems
Exercise: Merging a development branch
Scenario
The Payroll Setup case type allows users to automatically deposit their paychecks into a checking or
savings account. On the Provide bank information step, employees enter the name of their financial
institution, the routing number for the financial institution, and their account number.

This manual data entry leads to errors that cause the first deposit to fail. To reduce the number of
errors, the Human Resources (HR) department requested that users select their financial institution
from a drop-down list so that the application populates the routing number on the form.
Another development team redesigned the form. To avoid conflicts, this team configured the changes
in a development branch. You are responsible for merging the changes into the application.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Merge the contents of the development branch labeled Branching into the HRApps and TGB rulesets.
The branch rulesets are locked with the password rules.

Note: This scenario describes the original state of the form to enable you to confirm that the merge
worked correctly. To gain an understanding of the configuration changes, you can explore the branch
before performing the merge.

9
©2019 Pegasystems
Detailed steps
Add the branch to the application rule
1. Open the HRApps application record.
Tip: You can access the application record from the Application menu. Open the Application menu
and select Definition.
2. Under Development branches, click Add branch. The Add a Branch ID dialog is displayed to allow
you to specify the name of the branch to add.

3. In the Branch name field, enter Branching.


4. Click Submit. The dialog is dismissed and the branch is added to the application rule.

5. Save the change to the application record.

Merge the branch contents into the HRApps and TGB rulesets
1. In the Development branches section of the application record, click Branching to display the
content of the branch.
The branch displays a table of the rule names and other metadata fields.

10
©2019 Pegasystems
2. Select the Branch quality tab to review guardrails warnings, merge conflicts, and unit test coverage
for all rules contained in the branch.
The following image is an example of the data you will see in your lab. Unless you configure or
perform unit testing for the rules in the branch, you will not see any unit testing data.

11
©2019 Pegasystems
3. From the Actions menu, select Merge to display a Merge branch dialog.

4. Click Proceed to display the Merge Branches screen.

Note: The counts for Target checked out and Warnings should be zero (0) but may vary according to
how you have developed your application. If the Target checked out count for a target ruleset is not
zero, click the number to identify the rule or rules that are checked out in the application ruleset.
Then, click the Total candidates number for the branch ruleset and confirm that the rules in the
branch are not the same rules that are checked out.
5. For each target ruleset, select the highest available ruleset version.
Note: If you performed the Creating a new application version exercise, the highest available
version for each version is 01-01-02. Otherwise, the highest available version for each ruleset is 01-
01-01.
6. For each ruleset, in the Source version field, enter rules as the password.
7. Optional: Click the Keep all source rules and rulesets after merge check box to prevent Pega
from deleting the branch ruleset and allow you to repeat the exercise.
8. Click Merge. The Merge Branches wizard displays a confirmation page to indicate that the merge
was successful.
9. Return to the application record.
10. In the Development branches section, click the trash can icon next to the branch to remove it from
the application.

12
©2019 Pegasystems
11. Save the change to the application record.

Verify your work


1. Create a new Payroll Setup case.
2. Advance the case to the Provide bank information view. Verify that the bank name field is now a
drop-down list and that selecting a bank from the list populates the routing number field
automatically.

13
©2019 Pegasystems
Exercise: Rule resolution
Scenario
Human Resources (HR) business partners create benefits enrollment and employee evaluation cases
on behalf of TGB employees. To ensure that each case is created for the appropriate employee, HR
business partners have asked that the employee information header area for each case type match the
header used for Onboarding cases.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Save a copy of the EmployeeInformation section from the Onboarding case type to the class group (TGB-
HRApps-Work) and add it to the HRApps:01-01-02 ruleset.
Note: Before you begin this exercise, complete the exercise Creating a new application version to lock
the HRApps:01-01-01 ruleset and create the HRApps:01-01-02 ruleset.
Withdraw the EmployeeInformation section in the Benefits Enrollment, Employee Evaluation, and
Onboarding case types.

Detailed steps
Copy the EmployeeInformation section record to the new context
Create a copy of the EmployeeInformation section in the TGB-HRApps-Work class to share between all
the case types in the HRApps application.
1. In the Onboarding case type, open the EmployeeInformation section.
Tip: Section records are in the User Interface category. From the App Explorer, expand Onboarding
> User Interface > Section.
2. Save a copy of the EmployeeInformation section, and set the context of the record to the TGB-
HRApps-Work class and the HRApps:01-01-02 ruleset.

14
©2019 Pegasystems
Withdraw the EmployeeInformation section record in the Onboarding
case type
Since the original version of the rule is in a locked ruleset, create a new version of the
EmployeeInformation section in the Onboarding class. Then, withdraw the new version of the rule to
prevent Pega from using the section in the Onboarding class. Withdrawing the new version prevents
Pega from using the version of the rule in the locked ruleset, so Pega uses the version in the TGB-
HRApps-Work class instead.
1. Save another copy of the EmployeeInformation section record, and set the context of the record to
the TGB-HRApps-Work-Onboarding class and the HRApps:01-01-02 ruleset.
Tip: Because HRApps:01-01-01 is a locked ruleset, you need to save a copy of the
EmployeeInformation section in the Onboarding case type and the HRApps:01-01-02 ruleset so you
can change the availability to Withdrawn.

2. Edit the availability of the EmployeeInformation record.

3. Set the availability of the record to Withdrawn.

4. Click OK to update the availability of the section.


5. Click Save. The EmployeeInformation section record in TGB-HRApps-Work-Onboarding is now
withdrawn.
Important: Remember to check in any records that you check out to configure.

15
©2019 Pegasystems
Withdraw the EmployeeInformation section record in the Employee
Evaluation and Benefits Enrollment case types
Create a new version of the EmployeeInformation section in the Employee Evaluation and Benefits
Enrollment class. Then, withdraw the rules to prevent Pega from using the version of the section
created for each case type and force Pega to use the version in the TGB-HRApps-Work class.
1. Open the EmployeeInformation section in each of the case types.
2. Save a copy of the record, set the context to the appropriate class, and add the record to the
HRApps:01-01-02 ruleset.
3. Set the availability of the section records to Withdrawn.
4. Save your changes to withdraw the section.

Verify your work


1. Create a new Onboarding case.
2. Complete the required fields in the Collect Employee Info step.
3. Click Submit to advance the case to the Identify Home Office step.
4. Use Live UI to select the dynamic layout embedded in the EmployeeInformation section.

5. In the Live UI menu on the right, from the hierarchy, select the top-level EmployeeInformation
section.
6. Click the crosshairs icon to open the record in Dev Studio.

7. Confirm the context of the EmployeeInformation section record is in the TGB-HRApps-Work class

16
©2019 Pegasystems
and the HRApps:01-01-02 ruleset.

8. Repeat the verification with a new Benefits Enrollment case. Advance the case to the Review
Selections view to confirm the context of the EmployeeInformation section record is in the TGB-
HRApps-Work class and the HRApps:01-01-02 ruleset.

9. Create a new Employee Evaluation case and advance the case to the Identify assessment period
view to confirm the context of the EmployeeInformation section record is in the TGB-HRApps-Work
class and the HRApps:01-01-02 ruleset.

17
©2019 Pegasystems
Exercise: Circumstancing rules on a single
variable
Scenario
TGB sends an email to a candidate to extend an offer of employment. TGB company policy gives the
candidate 72 hours to respond to the offer. However, Canadian regulations require that a company
allow five business days for a resident of Canada to respond to an offer.
Note: The five-day Canadian regulation is included for exercise purposes only.
The table below provides the credentials you need to complete the exercise.

Role Operator ID Password


Case Designer SSA@TGB rules

Your assignment
Customize a version of the offer letter email to send to Canadian candidates to inform the candidate
about the response time frame of five business days.
To do this, create a circumstanced version of the OfferLetter correspondence rule. For a circumstancing
condition, test whether the value of the Country Code property (.Candidate.pyCountryCode) is CAN.

Detailed steps
Create a circumstanced version of the Offer Letter correspondence
rule
1. In Dev Studio, open the Candidate case type.
2. Select the Send Offer Letter step.
3. Select and open the Offer Letter correspondence template.
4. Click Save as > Specialize by circumstance.

18
©2019 Pegasystems
5. On the Specialize Correspondence form, next to CIRCUMSTANCE BY, select Property and Date.

6. In the Property field, enter or select .Candidate.pyCountryCode.


7. In the Value field, enter CAN.

8. Click Create and open to open the Correspondence rule form to edit the text for the
circumstancing.

Define the behavior for the circumstance


1. Update the text of the email to read as follows:
Dear <<.Candidate.pyFullName>> ,
We are pleased to offer you the position <<.Position.JobTitle>>, reporting to <<.Position.Manager>>, at a
starting salary of <<.OfferedSalary>>.
Please inform us of your intention to either accept or reject this offer within five business days.
We look forward to your joining our organization and look forward to working with you. If you have any further
queries, please don't hesitate to contact us.
Regards,
<<.Position.Recruiter>>
2. Click Save to save your circumstanced rule.

19
©2019 Pegasystems
Verify your work
1. Create a new Candidate case.
2. On the Collect Personal Details form, in the 3-letter country code field, enter CAN, then complete
the remaining fields on the form.

3. Click Submit. The case advances to the Collect Professional Details step.
4. Click Submit. The case advances to the Collect Educational Details step.
5. Click Submit. The case advances to the Collect Work Sample step.
6. Click Submit. The case advances to the Screening stage.

20
©2019 Pegasystems
7. In the Participants section of the case, confirm that the candidate is listed as a participant in the
case.

8. From the Actions menu, select Change stage to advance to the Offer stage.
9. From the Actions menu, select Determine Compensation to open the Determine Compensation
assignment.
10. Submit the offered salary and advance the case past the Manager Approval step.
11. Open the attached email and verify that the content matches the circumstanced version of the rule.
Ensure that the attached email mentions that the candidate has five business days to accept or
reject the offer.
Note: The following image uses sample data. Your email uses different employee data.

12. Close the Candidate case.

21
©2019 Pegasystems
Exercise: Circumstancing rules on multiple
values
Scenario
As part of the onboarding process, TGB sends an email that provides the employment start date to
each new employee and contractor. This email also reminds the employee or contractor to bring
specific paperwork on their first day at TGB. Business partners in the Human Resources (HR)
department want to customize the emails by country and employee status to direct the employee to
bring the appropriate paperwork on their first day.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Circumstance the Welcome email on two properties: .pyCountryCode and .Contractor. You need to
create three circumstanced versions of the Welcome email as outlined in the following table.

Contractor Country Code Documents


true USA 1099
false USA W4
false GBR P45

Note: You can also customize the circumstancing conditions for your own countries, using the relevant
tax documents.
To complete this exercise, you must perform the following tasks.
1. Create a circumstance template using the country code and contractor properties
2. Create a circumstance definition for each of the scenarios
3. Circumstance the Welcome email for each set of conditions and reference the appropriate tax
document in each circumstanced version

22
©2019 Pegasystems
Detailed steps
Create a circumstance template
1. In Dev Studio, click the Application Explorer.
2. Right-click the Onboarding case type and select Create > Technical > Circumstance Template.
3. Create the circumstance template with the following information.
Property Value
Label ContractorStatusAndCountry
Apply to TGB-HRApps-Work-Onboarding

4. Add the following properties.


a. .Employee.Contractor
b. .Employee.pyCountryCode
5. Click Save to update your circumstance template.

Create circumstance definitions


1. From the Application Explorer, right-click the Onboarding case type and select Create >
Technical > Circumstance Definition.
2. Create a circumstance definition with the following information.
Property Value
Label USContractor
Template Name ContractorStatusAndCountry
Apply to TGB-HRApps-Work-Onboarding

3. Set the Contractor value to true and the Country by Code to "USA".

4. Click Save to update the circumstance definition.

23
©2019 Pegasystems
5. Create another circumstance definition with the following information.
Property Value
Label USEmployee
Template Name ContractorStatusAndCountry
Apply to TGB-HRApps-Work-Onboarding
Definition Contractor = false
Country code = "USA"

6. Create a third circumstance definition with the following information.


Property Value
Label GBEmployee
Template Name ContractorStatusAndCountry
Apply to TGB-HRApps-Work-Onboarding
Definition Contractor = false
Country code = "GBR"

Circumstance the Welcome email


1. Open the Onboarding case type.
2. Select the Send Welcome Packet step to determine the correspondence used to send the
Welcome email.
3. Click the crosshairs icon to open the WelcomeEmail correspondence template.

Note: In the pop-up, select the old WelcomeEmail rule based on the update time.
4. Click Save as > Specialize by circumstance to create a circumstanced version of the record.
Note: The original record is used if none of the circumstanced versions are appropriate.
5. In the Template field, enter ContractorStatusAndCountry.
6. In the Definition field, enter or select USEmployee.

7. Click Create and open to open the Correspondence rule form and edit the text for the welcome
email.

24
©2019 Pegasystems
8. Update the text of the email to add W-4 to the list of things to bring.

9. Click Save to update the correspondence.


10. Repeat steps 5-10 to specialize the WelcomeEmail correspondence template twice more by using
the USContractor and GBEmployee circumstance definitions. In the USContractor circumstance,
specify that the contractor should bring a 1099 form. In the GBEmployee circumstance, specify that
the employee should bring a P45 form.

Verify your work


1. Create a new Onboarding case.
2. Complete the required fields in the Collect Employee Info step. For this case, select Contractor
and enter USA for the country code.
Tip: Create additional cases to test the employee/USA and employee/GBR conditions.
3. Complete the Identify Home Office and Select Orientation Plan steps.
Note: You can specify any values to complete the steps. They do not impact this exercise.
4. Open the attached email and verify that the content matches the circumstanced version of the rule.

25
©2019 Pegasystems
Exercise: Searching for duplicate cases
Scenario
Human Resources (HR) policy requires each manager at TGB to evaluate their direct reports annually.
HR uses the evaluations to determine which of the following actions to take:
l Retain the employee in their current department.
l Qualify the employee for a promotion.
l Place the employee on a development plan.
l Terminate the employee.
HR wants to ensure that a manager only submits one evaluation for each employee. If a manager
submits a second evaluation for an employee within the same evaluation period, the HR Apps
application should identify the existing evaluation and identify the new evaluation as a duplicate case.
All duplicate cases are identified by the employee's name. However, in specific situations, some
conditions may indicate that the cases are not duplicates. The following list includes some of these
specific conditions.:
l The employee changed departments during the evaluation period.
l The employee had more than one manager because the employee changed departments.
l More than one evaluation period start date may exist because the employee changed departments.
l More than one evaluation period end date may exist because the employee changed departments.
HR has determined that when two or more of the specific conditions are true, the cases are duplicates.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Use the Track duplicates feature for the Employee Evaluation case type to identify duplicate cases.
Use the following information to define the evaluation:
l In the Create assessment process, add a Search duplicate cases shape after the Identify assessment
period step. The duplicate case evaluation occurs after the user submits the evaluation start and
end dates.
l Configure .FullName as a basic condition.
l Identify duplicate cases based on the following weighted conditions:
Evaluation start date (.StartDate)
Evaluation end date (.EndDate)

26
©2019 Pegasystems
Manager last name (.Employee.Manager)
Employee department (.Employee.Department)
Each condition carries a weight of 25, and a case is considered a duplicate case if the weighted
sum is at least 50.

Detailed steps
Add the Duplicate search cases Smart Shape
1. In App Studio, in the Employee Evaluationcase type, open the Workflow tab to view the case life
cycle.
2. From the Employee assessment stage, in the Create assessment process add a Search duplicate
cases step to add the Search duplicate cases step to the process.
3. In the Search duplicate cases step contextual properties panel, in the Audit note field, add a
meaningful name to describe the purpose of the duplicate search.
4. Save the Search duplicate cases step.

Define the basic condition


1. In the contextual properties panel, click Add basic condition to open the configuration window.
2. Click the Potential duplicate drop-down and select Full Name.

27
©2019 Pegasystems
3. In the Comparator drop-down, leave the default value is same.
4. Click OK to close the window and add the basic condition that states potential duplicate cases must
have the same value of Full Name as an existing case.

Define the weighted conditions


1. In the contextual properties panel, to the right of the Add weighted conditions sum at least field,
enter a threshold of 50.
2. Under the And weighted conditions sum at leastfield, click Add weighted condition to open the
configuration window.
3. On the configuration window, in the Weight field enter 25.
4. Click the Potential duplicate drop-down and select Start date.
5. In the Comparator drop-down, leave the default value is equal to.
6. To the right of the Current case field, select the Select values link to open the Select values window.
7. Click the Type drop-down and select Another field. A second drop-down is displayed below.
8. Click the second drop-down and select Start date.
9. Click Submit to dismiss the Select values window and populate the Current case field with
.StartDate.
10. Click OK to add the weighted condition.

28
©2019 Pegasystems
11. Repeat steps 2-10 to add conditions for the remaining properties. The following image shows the
completed condition list.

12. Click Save to complete the configuration of the Search duplicate cases Smart Shape.

Verify your work


1. Create an Employee Evaluation case for an employee. Note the manager, department, and start and
end dates you entered, which are the potential match criteria.
2. Advance the case to the Assess employee step.
3. Create another Employee Evaluation case for the employee. Enter different manager and
department values but identical start and end dates (two matching criteria).

29
©2019 Pegasystems
4. In the Identify assessment period step, click Submit. The Display Duplicate Cases form is displayed.
The form indicates that the current case is a potential duplicate to the case listed on the form.

30
©2019 Pegasystems
5. Click Why is this shown here to display the Duplicate case analysis window. Note that the Match
Score equals 50 — this meets the potential match threshold.

31
©2019 Pegasystems
Exercise: Working with temporary cases
Scenario
The Human Resources (HR) department at TGB has determined that more than 50 percent of new
applications for an open position are discarded because the candidate is unable to provide the
information necessary to complete the application and qualify for further evaluation. Users enter the
required information into the system as they collect candidate details. To avoid accumulating
abandoned candidate cases in the system, HR wants only cases in which the applicant has provided
the required information that is entered into the system and tracked throughout the case life cycle.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
The requirement states that cases will not be persisted in the database once created. The requirement
also states that the case will be persisted after collecting the work sample in the Collect Candidate
Details process. Persisting the case allows the case to advance through the case life cycle for further
processing by other users.
To support these requirements, you must perform the following tasks.
l Enable the Create temporary case that is not saved until a 'Persist step' is reached option for
the candidate case type so that a candidate case is created as a temporary case.
l Add a Persist Case Smart Shape that follows the final step in the Collect Candidate Details process.
This step persists the case to the database after the submission of the candidate work sample.
Note: The user interface (UI) should include validation logic such as validation rules or required fields
to verify that the case contains all of the information necessary for processing. Otherwise, cases
unqualified for further processing may be persisted, which does not conform to company business
policies.

32
©2019 Pegasystems
Detailed steps
Configure the starting flow
1. In App Studio, open the Candidate case type.

2. Click the Settings tab to open the Candidate case type properties.
3. In the General section, under Behavior, select the Create temporary case that is not saved until
a 'Persist step' is reached check box.

4. In the upper-right corner, click Save to save the Candidate case type. A new case will not be
persisted to the database.

33
©2019 Pegasystems
Add a Persist Case utility to the process
1. In the Candidate case type, click the Workflow tab to open the candidate case life cycle.
2. On the Submission stage, beneath the Collect Work Sample step, click STEP > More.
3. In the dialog displayed beneath the new step, expand the Automations section.
4. Select Persist Case to display the Persist Case panel.
5. In the Persist Case panel, click Select. The Submission stage now displays the Persist Case step.

6. On the case life cycle header, click Save. The process now includes the Persist Case shape.

Verify your work


1. Create a Candidate case.
2. Complete the Collect Personal Details form and click Submit.
Note: The required fields on the form are examples of information that is required before a case
should be persisted.
3. Open the Clipboard to the New thread.
4. On the pyWorkPage confirm that pyTemporaryObject is set to true and the pzInsKey value is bank.
The case does not persist to the database.

5. Advance the case through the Collect Work Sample step.

34
©2019 Pegasystems
6. Click Submit to persist the case.
7. Open the clipboard to the thread for the case ID and select pyWorkPage.

8. Confirm that the system created a case ID for this case instance (in this example, pzInsKey TGB-
HRAPPS-WORK C-17). The case is persisted to the database.

35
©2019 Pegasystems
Exercise: Configuring parallel processing
Scenario
At TGB, candidates for an open position interview with three to six current employees. The interview
process for candidates provided in the HRApps application only allows for one interviewer. The Human
Resources (HR) department has requested that this process update to support more than one
interviewer for a candidate.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
The following list includes recommended tasks for completing this assignment.
l Create a page list property to hold the list of interviewers, and add an empty entry to the list.
l Update the ScheduleInterview_0 section to add a table sourced by the Interviews property to enable
adding and removing interviews. In the table, include the existing InterviewSchedule section to
display the interview information in the table.
l Replace the ConductInterview subprocess with a Split For Each shape, and configure the Split For
Each shape to call the ConductInterview flow for each interviewer in the list.
l Update the Assess Candidate form to allow the user to view the feedback from all interviewers.
Note: Because the ConductInterview flow is located in the Interview data class, changing from page to
page list has no impact on the flow rule.

Detailed steps
Create a page list property and edit pySetFieldDefaults data transform
1. In Dev Studio, in the Candidate case type, on the Data model tab, create a field list property named
Interviews in the data type TGB-HRApps-Data-Interview .

36
©2019 Pegasystems
2. In the Candidate case type, the pySetFieldDefaults data transform, add a default entry to the list to
ensure that the list contains an empty entry when the screen is displayed.
Tip: To add a default entry to the list, initialize an element in the list item directly below the
Comment item (for example, .Interviews(1).Location = "") .

Update the ScheduleInterview_0 section to add a table


1. In the ScheduleInterview_0 section, add a Dynamic Layout.
2. In the Dynamic Layout, create a text label named Interviews.
3. Below the Dynamic Layout, add a Table layout.
4. On the General tab of the table layout properties, set the table source as the .Interviews property.
5. On the Operations tab of the table, set Row editing to Inline and Inline edit mode to Rows always
editable.
6. Drag the Section Include TGB-HRApps-Data-Interview.InterviewSchedule to the first column,
second row of the table.

7. Save the ScheduleInterview_0 section.

37
©2019 Pegasystems
Edit the InterviewCandidate_0 flow to add a Split for Each shape
1. In the Candidate case type workflow, select Interview Candidate and click the Configure
processicon, then Open process to open the flow.
2. Add a Split For Each advanced shape.
3. In the Split For Each properties window, specify Interviews as the page property and use the existing
ConductInterview subflow to configure the Split For Each shape.

38
©2019 Pegasystems
4. Replace the existing Conduct Interview assignment shape with the Split For Each smart shape.

5. Save the flow changes.

Edit the AssessCandidate_1 section and AssessmentRating declare


expression
1. In the AssessCandidate_1 section, add a Table layout to the bottom of the section.
2. On the General tab of the table, set the table source as the Interviews property.
3. On the General tab of the table, under Header and footer, clear the Display grid header and
Display grid footer options.
4. Submit the tab changes.
5. From the layout menu, drag an embedded section into the second row of the table.
6. Click the Gear icon to open the Cell Properties dialog and from the Source field, enter or select
InterviewFeedback.

39
©2019 Pegasystems
7. Delete the second dynamic layout. The section should look like the following image.

8. Save your changes to the section.


9. Update the AssessmentRating declare expression to calculate the average of all interview ratings.
Tip: Use the Average of computation type to calculate the average value for a property in a page
list. Leave the using entries in which field blank.

Verify your work


1. Create a new Candidate case and move to the Interviews stage. Verify that an empty entry in the
interviewer list exists.

40
©2019 Pegasystems
2. Add two interviewers to the list and click Submit.

41
©2019 Pegasystems
3. Verify that two assignments are displayed in the Actions menu.

4. Complete the two Interview candidate assignments.

42
©2019 Pegasystems
5. Verify that the assessment rating is the average of the two interviewer ratings.

43
©2019 Pegasystems
Exercise: Configuring flow action pre- and
post-processing
Scenario
Currently, the Candidate case type creates a candidate participant to represent a job applicant, and
adds the candidate participant to the case at the beginning of the Screening stage. Candidates are not
participants in the case throughout the Submission stage. As a result, users cannot contact candidates
by email while the case is in the Submission stage.
In a future release of the HRApps application, users are allowed to save cases after a candidate has
provided personal information at the start of the Submission stage. This allows users to contact by
email candidates who have not completed the Submission stage.
To support this change, the vice president of Human Resources has asked you to configure the
application to support emailing candidates whose cases have not completed the Submission stage. For
more information on sending case updates to case participants, see the Pega Community article Send
important case updates to case participants.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Reconfigure the Collect Candidate Details process so that a candidate is added as a participant to the
case when the user submits the Collect Personal Details form. After you complete this change, the
Create Candidate Party process in the Screening stage is no longer needed.
l Update the Collect Personal Details flow action so that it runs the addWorkPartyObject activity as a
post-processing action. Use the following activity parameter values.

Parameter Value
PartyRole Candidate
PartyClass TGB-HRApps-Data-Candidate
PartyModel NewParty

l Remove the Create Candidate Party process from the Screening stage.

44
©2019 Pegasystems
Detailed steps
Update the Collect Personal Details flow action
1. In Dev Studio, from the Candidate case, open the Collect Candidate Details process.
2. Right-click the Collect Personal Details connector and select Open Flow Action to open the
CollectPersonalDetails_0 flow action.
3. On the rule form, open the Action tab.
4. In the Post-Processing section, in the Run activity field, select addWorkObjectParty.
5. Update the parameter values with the following values.

Parameter Value
PartyRole Candidate
PartyClass TGB-HRApps-Data-Candidate
PartyModel NewParty

When you are done, the section will look like the following image.

6. Save the changes. When a user submits the Collect Personal Details form, the system adds the
candidate to the case.

Remove the Create candidate process from the Screening stage of the
Candidate case life cycle
1. On the case life cycle, in the Screening stage, select the Create Candidate Party process.
2. Click the Trash icon to delete the process.
3. On the case life cycle header, click Save. The Create Candidate Party process is removed from the
life cycle of the Candidate case type.
Note: When you remove a rule from use in a case type, remember to determine whether the rule is
used elsewhere in your application. If the rule is unused, consider removing it from the application. If
the rule exists in a previous ruleset version, you must withdraw the rule to remove it from your
application.

45
©2019 Pegasystems
Verify your work
Create a Candidate case and advance it to the Collect Professional Details form. The form displays the
candidate in the Participants area on the harness.

46
©2019 Pegasystems
Exercise: Configuring a decision table
Scenario
TGB has a new healthcare insurance vendor. The previous vendor of healthcare insurance offered one
level of coverage. The new vendor offers three levels of coverage, based on the number of dependents.
This change requires an update to the cost calculation for each plan type. Users must have the ability
to select the appropriate coverage level based on the number of dependents.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
For each type of insurance, configure a decision table with the following decision logic:
Medical plan cost

Condition Action
@LengthOfPageList(.Dependents) Results
if 0 .MedicalPlan.EmployeeCost
else if 1 .MedicalPlan.PlusOneCost
otherwise .MedicalPlan.FamilyCost

Dental plan cost

Condition Action
@LengthOfPageList(.Dependents) Results
if 0 .DentalPlan.EmployeeCost
else if 1 .DentalPlan.PlusOneCost
otherwise .DentalPlan.FamilyCost

Vision plan cost

Condition Action
@LengthOfPageList(.Dependents) Results
if 0 .VisionPlan.EmployeeCost

47
©2019 Pegasystems
Condition Action
else if 1 .VisionPlan.PlusOneCost
otherwise .VisionPlan.FamilyCost

Configure the declare expressions MedicalPlanCost, DentalPlanCost, and VisionPlanCost to use the
corresponding decision table to calculate the property value.

Detailed steps
Configure decision table logic for Medical plan cost
1. In Dev Studio, from the Create menu, select Decision > Decision Table to open the Create Decision
Table form.
2. In the Label field, enter Medical plan cost to name the dependents for medical insurance decision
table.
3. In the Apply to field, enter or select TGB-HRApps-Work-BenefitsEnrollment to assign the decision
table to a class.
4. In the Add to ruleset fields, accept the default settings, which are HRApps and 01-01-01,
depending on the order in which you perform the exercises.
5. In the header, click Create and open to create the decision table and open the configuration form.
6. On the table under Conditions, click the empty header cell to display the Decision Table property
chooser dialog.
7. Next to the Property field, click the Gear icon to open the Expression builder.
8. In the Expression builder, on the first line, enter @LengthOfPageList(.Dependents) to create the
expression.

9. Click Submit to save the expression.


10. In the Label field, enter Dependents.

48
©2019 Pegasystems
11. In the Use Operator field, accept the default setting of = .

12. Click Save to record the property selection.


13. In the first row, under Dependents, enter 0 to indicate the condition in which an employee has no
dependents.
14. In the first row, under Return, enter .MedicalPlan.EmployeeCost to indicate the result for zero
dependents.
15. In the tool bar, select the Insert Row After icon to add an else if condition below the if condition.

16. In the else if row, under Dependents, enter 1 to indicate the condition in which an employee has
one dependent.
17. In the else if row, under Return, enter .MedicalPlan.PlusOneCost to indicate the result when an
employee enters one dependent.
18. In the otherwise row, under Return, enter .MedicalPlan.FamilyCost to indicate the result when an
employee enters more than one dependent.

19. Click Save to record the decision table.

49
©2019 Pegasystems
Configure decision table logic for Dental and Vision plan costs
1. Click Save as to open the Decision Table Record Configuration page.
2. In the Label field, enter Dental plan cost to name the dependents for dental insurance decision
table.
3. Click Create and open to open the Edit Decision Table page.
4. Update the Return column with the dental plan properties: .DentalPlan.EmployeeCost,
.DentalPlan.PlusOneCost, and .DentalPlan.FamilyCost.

5. Click Save to record the decision table.


6. Repeat steps 1-5 to create the Vision plan cost decision table.
7. Update the Return column with the vision plan properties: .VisionPlan.EmployeeCost,
.VisionPlan.PlusOneCost, and .VisionPlan.FamilyCost.

8. Click Save to record the decision table.

Configure declare expressions to calculate medical, dental, and vision


costs
1. From the App Explorer, under BenefitsEnrollment > Decision > Declare Expression, select
.MedicalPlanCost to open the expression.
2. Check out the declare expression to begin editing.
3. In the Set Medical plan cost drop-down list, select Result of Decision Table to configure the declare
expression to reference a decision table.

50
©2019 Pegasystems
4. To the right of Result of Decision Table, enter or select .MedicalPlanCost to indicate the decision to
reference.

5. Click Save to record the changes to the declare expression.


6. Check in the declare expression to commit the changes.
7. From the Declare Expression list, select .DentalPlanCost to open the expression.
8. Check out the declare expression to begin editing.
9. In the Set Dental plan cost drop-down list, select Result of Decision Table to configure the declare
expression to reference a decision table.
10. To the right of Result of Decision Table, enter or select DentalPlanCost to indicate the decision to
reference.
11. Click Save to record the changes to the declare expression.
12. Check in the record to commit the changes.
13. From the Declare Expression list, select VisionPlanCost to open the expression.
14. Check out the declare expression to begin editing.
15. In the Set Vision plan cost drop-down list, select Result of Decision Table to configure the declare
expression to reference a decision table.
16. To the right of Result of Decision Table, enter or select VisionPlanCost to indicate the decision to
reference.
17. Click Save to record the changes to the declare expression.
18. Check in the record to commit the changes.

Verify your work


1. Create a new Benefits Enrollment case.
2. Advance the case to the Identify Dependents step.
3. Add two dependents and click Submit to confirm selection and advance to the Select Medical
Coverage form.
4. From the Plan name drop-down list, select Medical Premium to view the plan description and the
cost levels.

51
©2019 Pegasystems
5. Confirm the Family cost (USD 192.65) matches the Medical plan cost (USD 192.65).

6. Click Submit to confirm selection and advance to the Select Dental Coverage form.
7. From the Plan name drop-down list, select Dental Basic to view the plan description and the cost
levels.
8. Confirm the Family cost (USD 41.23) matches the Dental plan cost (USD 41.23).

9. Click Submit to confirm selection and advance to the Select Vision Coverage form.

52
©2019 Pegasystems
10. From the Plan name drop-down list, select Vision Basic to view the plan description and the cost
levels.
11. Confirm the Family cost (USD 27.53) matches the Vision plan cost (USD 27.53).

12. Click Submit to confirm selection and advance to the Review Selections form.
13. Confirm the Total benefit cost is the sum of all the selections (USD 261.41).

53
©2019 Pegasystems
14. Repeat steps 1-13 with one dependent. Confirm the Plus one cost matches the selected Medical
plan, Dental plan, and Vision plan cost.
15. Repeat steps 1-13 without dependents. Confirm the Employee cost matches the selected Medical
plan, Dental plan, and Vision plan cost.

54
©2019 Pegasystems
Exercise: Configuring a cascading approval
process
Scenario
Before extending an offer to a candidate, the offer requires approval. At TGB, the number of approvals
required in the approval process depends on the salary offered to the candidate.
l All candidate offers require approval by the hiring manager.
l Offers where the salary level is greater than or equal to USD80,000 also require approval by an HR
business partner and the hiring manager.
l Offers where the salary level is greater than or equal to USD100,000 require approval by the hiring
manager, HR business partner, and department Vice President (VP).
l Offers where the salary level is greater than or equal to USD130,000 require approval by the hiring
manager, HR business partner, department Vice President (VP), and CFO.
l Offers where the salary level is greater than or equal to USD150,000 require approval by the hiring
manager, HR business partner, department Vice President (VP), CFO, and CEO.
Recruiters have asked that the approval process automatically route candidate cases for approval to
the required users.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Reconfigure the manager approval process for the candidate case.
l Create a decision table to evaluate a set of conditions that test for salary levels so that approvals
route to the appropriate users. The salary levels and users are as listed in the following table.

Salary level (USD) Approved by


Less than 80,000 Hiring Manager
Greater than or equal to 80,000 Hiring Manager and HR business partner
Greater than or equal to 100,000 Hiring Manager, HR business partner, and
department Vice President (VP)
Greater than or equal to 130,000 Hiring Manager, HR business partner,
department Vice President (VP), and CFO

55
©2019 Pegasystems
Salary level (USD) Approved by
Greater than or equal to 150,000 Hiring Manager, HR business partner,
department Vice President (VP), CFO, and CEO

l Add a cascading approval process to invoke the authority matrix.

Detailed steps
Follow these steps to create a cascading approval process.
1. In Dev Studio, click the Case Type Explorer > Candidate case type to open the Candidate case life
cycle.
2. On the Candidate case life cycle, under the Determine compensation step, rename the Manager
Approval step to New Hire Approvals.
3. On step properties, click the General tab and change the Approval flow type field value to
Cascading.
4. In the Approval based on field, select Authority matrix.
5. In the Decision table for matrix field, select TGBSalaryApprovals.
6. In the Page List property field, select .TGBApprovals.

56
©2019 Pegasystems
7. In the Approver property field, select .ApproverID.

8. To the right of TGBSalaryApprovals, click the crosshairs icon to open the TGBSalaryApprovals
decision table.
9. Evaluate the configured conditions and actions and then align them with the exercise conditions.
Tip: Confirm the Actions column header is configured with the.TGBApprovals(<APPEND>).ApproverID
property and the equals operator.

10. In the upper left, click the Results tab to open the Delegation options.
11. Ensure the Evaluate all rows check box is selected to make the decision table evaluate all

57
©2019 Pegasystems
conditions.

12. On the Candidate case type, New Hire Approvals step, confirm the flow is set to change to the
Candidate Rejection stage if an approver rejects the candidate.

13. On the Candidate case type, click Save to update the Prepare Offer flow, which now includes the
cascading approval authority matrix process.

Verify your work


Follow these steps to test the approval configuration:
1. Create a Candidate case. Select the Sr Software Engineer position.
2. Advance the case until you reach the Determine Compensation form in the Offer stage.
3. In the Offered Salary field, enter a value greater than or equal to 100,000 and less than 130,000
and click Submit.
4. From the Actions menu, select Approval. The flow directs the case to the cascading approval
authority matrix and the Manager is assigned to approve or reject the candidate.

5. Click Approve to complete the Manager approval.

58
©2019 Pegasystems
6. From Actions menu, select Approval. The flow directs the case to the cascading approval authority
matrix and the HR business partner is assigned to approve or reject the candidate.

7. Click Approve to complete the HR business partner approval.


8. From Actions menu, select Approval. The flow directs the case to the cascading approval authority
matrix and the department Vice President is assigned to approve or reject the candidate.

9. Click Approve to complete the Vice President approval.


10. Test the CFO and CEO approval flows by creating two new cases.
a. Select the Marketing Manager position. Enter a USD 135,000 salary to require Hiring Manager,
HR Business partner, department VP, and CFO approvals.
b. Select the Director position. Enter a USD 155,000 salary to require Hiring Manager, HR Business
partner, department VP, CFO, and CEO approvals.
11.

59
©2019 Pegasystems
Exercise: Updating assignment routing
Scenario
The Human Resources (HR) department wants the ability to add a new hire to the company payroll. The
PegaHR application includes a case type to perform this work. A business architect has determined
that the business process is sufficient for TGB's needs at this time. However, the process uses a work
queue that does not match the organization structure at TGB. The Human Resources (HR) department
has asked that you create a new work queue to match the organizational structure at TGB.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Override the default work queue (PayrollReviewWB) used in the Complete enrollment process of the
Payroll Setup case type in the PegaHR application. To do this:
1. Create a new work group for processing Payroll Setup cases with the following details.

Field Value
Short description TGB Payroll
Work group name Payroll@TGB
Manager Manager@TGB
Default work queue default@TGB

2. Create a new work queue for routing assignments to review Payroll Setup cases with the following
details.

Field Value
Short description TGB Payroll work queue
work queue TGBPayrollWB
Name TGB
Division Finance
Unit Accounting
Work group Payroll@TGB

3. Create a copy of the Complete enrollment process in the TGB-HRApps-Work-PayrollSetup class. In this
new copy of the process, route the Review Selections assignment to the new TGBPayrollWB work
queue.

60
©2019 Pegasystems
Detailed steps
Create the work group and work queue
1. In Dev Studio, create a work group with the following details.
To create a new work group, select Create > Organization > Work Group.

Field Value
Short description TGB Payroll
Work group name Payroll@TGB
Manager Manager@TGB
Default work queue default@TGB

2. Create a payroll work queue with the following details.


Tip: If you do not remember how to create a work queue, use the procedure outlined in the Help

61
©2019 Pegasystems
topic Creating a work queue.

Field Value
Short description TGB Payroll work queue
Work queue TGBPayrollWB
Name TGB
Division Finance
Unit Accounting
Work group Payroll@TGB

Update the assignment to route to the new work queue


1. In Dev Studio, open the Payroll Setup case type to display the case life cycle.
2. From the case life cycle, open the Complete enrollment process.
3. In the upper-right corner of the Complete enrollment process, click Open process to open the
process in the Process Modeler.
4. On the rule header, click the down arrow on the Save as button, and select Specialize by class or
ruleset to open the Flow Record Configuration form.

62
©2019 Pegasystems
5. In the Apply to field, enter or select TGB-HRApps-Work-PayrollSetup to create a copy of the process
in the implementation layer for customization.
6. Click Create and open to create a copy of the flow record in the implementation layer and open the
flow record.
7. Click Check in to save the record.
8. Close both instances of the Complete enrollment process and return to the Payroll Setup case type.
9. On the Payroll Setup case type, click Actions > Refresh to reload the case type to account for the
process you copied into the implementation layer.
10. Under the Complete enrollment process, select the Review selections step.
11. In the contextual menu on the General tab, in the Route to drop-down, select Work queue.
12. Route the case to TGBPayrollWB work queue.

13. Click Save to update the step configuration.

Verify your work


1. Open the Case Manager portal.
Tip: Click Launch web interface to access the Case Manager portal.
2. Create and complete a Payroll Setup case.

63
©2019 Pegasystems
3. On the Review selections step, the work queue name is displayed as part of the assignment.

64
©2019 Pegasystems
Exercise: Creating work status values
Scenario
Recruiters require a way to quickly differentiate candidate cases during the Interview stage. To clarify
reporting on candidate cases, recruiters have asked that a unique, custom status be applied to
candidate cases during each step of the Interview stage.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Create three new work status values for use in candidate cases.

Status value Class Purpose


Open-Scheduling TGB-HRApps For candidate cases that have not been
scheduled for an interview.
Open-Interview TGB-HRApps For candidate cases that have been scheduled
for an interview.
Open-Assessment TGB-HRApps For candidate cases that have completed the
interview step and are under review to
determine whether to extend an offer.

In the candidate case life cycle, apply the work status values to the appropriate steps in the Interview
stage.

Status value Step


Open-Scheduling Schedule interview
Open-Interview Interview candidate (Conduct interview)
Open-Assessment Assess candidate

Tip: Apply the Open-Interview status to the Interview Candidate assignment within the Conduct interview
process. This allows you to reuse the Conduct Interview process with the updated status value.

65
©2019 Pegasystems
Detailed steps
Create the new work status values
1. Create the three custom status values: Open-Scheduling, Open-Interview, and Open-Assessment.
Tip: Use the procedure described in the help topic Defining a custom case status. Enter the
purpose of each field value In the Description field located on the record's History tab, enter the
purpose of each field value. The descriptions are useful when deciding whether to reuse an
existing work status or create a new one.
2. In Dev Studio, click Configure > Case Management > Processes > Status Values to open the
Status Values landing page. The array displays the status values and descriptions.

Apply the statuses to the candidate case type


1. Open the Candidate case life cycle.
2. In the Interviews stage, select the Schedule Interview step.
3. On the General tab, from the Set case status field, select Open-Scheduling.

4. Select the Assess Candidate step.

66
©2019 Pegasystems
5. On the Flow tab, from the Set status field, select Open-Assessment.

6. On the case life cycle header, click Save to update the Interview Candidate process.
7. Select the Interview Candidate process.
8. On the contextual properties panel, click Open process to open the Interview Candidate process.
9. Check-out the process flow for editing.
10. Right-click the Conduct Interview subprocess shape and select Open flow to open the Conduct
Interview process.
11. In the Conduct Interview process, right-click the Interview Candidate assignment and select View
properties.
12. In the Assignment properties dialog, in the Advanced section, expand Assignment details.

67
©2019 Pegasystems
13. In the Case status field, enter or select Open-Interview.

14. Click Submit to close the Assignment properties dialog.


15. Click Save to commit your changes to the flow.
16. Check the flow back in to the ruleset.

68
©2019 Pegasystems
Verify your work
1. Create a candidate case and advance it to the Schedule Interview step. The case status is Open-
Scheduling work status.

2. Advance the case to the Conduct Interview step. The case has an Open-Interview work status.
3. Advance the case to the Assess Candidate step. The case has an Open-Assessment status.

69
©2019 Pegasystems
Exercise: Customizing a harness
Scenario
Based on feedback from end users, the vice president of Human Resources requests a change to how
information is displayed in the Case Worker and Case Manager portals. The approved requirement is
to position the list of case participants so that it displays below the list of open assignments for each
case. Stakeholders throughout the TGB organization have agreed to the change, and request that their
applications also reflect this change.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Reorganize the rightmost column of the perform harness so that the Case Participants section is
displayed below the Open assignments section.
To do this, copy the rule that contains these two layouts into the TGB ruleset, and then reorder the
layouts as requested.

Detailed steps
Follow these steps to customize a harness.
1. Create a case of your choice.
Note: By default, the perform harness is used for all cases of an application.

70
©2019 Pegasystems
2. Use Live UI to find and open the pyCaseMainInner section record in Dev Studio.

3. Save a copy of the pyCaseMainInner section record in the highest unlocked version of the TGB ruleset
and do not change the Apply to: context.
Tip: Make a note of the ruleset version to which you saved the pyCaseMainInner section record. You
will use this version number to verify your changes.

71
©2019 Pegasystems
4. Click and hold the Section - Case participants section and drag it directly under Section - Case
content.

5. Save your changes.

Verify your work


1. Create a case of your choice and confirm the Participants list is displayed below the Open
assignments list.

72
©2019 Pegasystems
2. Use Live UI to open the pyCaseMainInner section record in Dev Studio and confirm the section
record in use is from the TGB ruleset and not from the Pega-provided UI-Kit-7:13-01-01 ruleset.

73
©2019 Pegasystems
Exercise: Customizing a portal
Scenario
The vice president (VP) of the Human Resources (HR) department has requested that you customize the
manager portal to meet the needs of HR managers.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Customize the Case Manager portal to reflect the following changes:
l In the navigation area, replace the Configuration entry in the menu with an item labeled Manage
Delegated rules.
l In the content area, add a widget to display a chart on the dashboard. Configure the widget to
display the Timeliness of Resolved Items By Operator report.

Detailed steps
Update the navigation area
1. In Dev Studio, click Launch web interface > Case Manager to open the Case Manager portal in a
new browser window.
2. Click Live UI to determine what to edit.

74
©2019 Pegasystems
3. Select the left navigation menu and click the crosshair icon. The Case Manager Portal Navigation
section opens in Dev Studio.

4. To the right of the second Menu in the Case Manager Portal Navigation section, click the Gear icon
to edit the cell properties.

75
©2019 Pegasystems
5. Click the crosshairs icon to access the Navigation options for the menu.

6. Click Save As and save the record to your ruleset. This allows you to edit the Manager Portal
Navigation record.
7. Double-click the Configuration row.

76
©2019 Pegasystems
8. Change the Label to Manage Delegated Rules.

9. From the Visibilty drop-down, select Always to display the menu item for all users of the Case
Manager portal.

Note: Change the visibility setting to confirm that your configuration change is reflected in the Case
Manager portal. Otherwise, the change is visible only to users with access to the ruleset that
contains delegated rules.
10. Click OK to update the configuration.
11. Save your changes.
12. Open the Case Manager portal and confirm that the Manage Delegated Rules link is present in
the navigation menu.

Add and configure a widget on the dashboard


1. Open the Case Manager portal.
2. In the upper-right corner of the Case Manager portal, click the Gear icon to configure the

77
©2019 Pegasystems
dashboard.
3. In the left column, click Add widget(s).
4. Select the Report widget.
5. Click Add selected to add the widget to the dashboard.
6. Select the report widget you added. A green rectangle highlights the widget.
7. In the right column, under the Select a report widget, select the Monitor Assignments category
and the Timeliness of Resolved Items By Operator report.
8. Click Save to update the configuration settings for the reports widget.
9. Click Publish to update the dashboard.
10. You should now see the Timeliness of Resolved Items By Operator report displayed on the
dashboard.

78
©2019 Pegasystems
Exercise: Enabling accessibility features in an
application
Scenario
Some users with screen readers have difficulty completing several forms in the application. ReserveIt
wants to improve the user experience for users with assistive devices.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


System Architect admin@reserveit rules

Your assignment
Switch to the ReserveIt:AdministratorsAccess access group, which is configured with the PegaWAI ruleset
to provide assistive device users with additional form guidance.
Note: Due to security concerns, users are unable to update access group records in the exercise
environment. As a workaround to this limitation, an alternate access group has been staged in the
exercise environment. This alternate access group is configured with the PegaWAI ruleset as a
production ruleset. In a real-world environment, you must update the access group to add the
production ruleset.
Update the Number of guests field on the initial application screen to display a drop-down list.
Configure the property to populate the drop-down list with the numbers 1 to 4.
Note: A screen reader is required to gain the most from this exercise. Screen readers are generally
available as browser extensions. If you are using Chrome, you can download a Chrome extension
called ChromeVox. If you are unable to obtain a screen reader, disregard this exercise.

Detailed steps
Listen to a screen reader read a Pega case
1. Create a new Booking case.
2. On the first screen, click in the Number of guests field and listen to the guidance the screen
reader provides to the user.
3. Click Cancel to close the case and listen to how the application reacts to canceling the case.

79
©2019 Pegasystems
Add the PegaWAI ruleset to the application definition
1. Switch to the ReserveIt Administrator access group that has accessibility enabled.
Tip: From the Application menu, click Switch Application > ReserveIT (Administrator -
Accessibility enabled).
2. Edit the ReserveIt application Definition.
3. Add the PegaWAI:07-10 ruleset as a production ruleset.
Tip: Expand the Advanced section to add a production ruleset to the application definition. The
ruleset PegaWAI is included in your exercise image. Add it and set the version to 07-10.
4. Save your changes.

Update a property to include a list of local values


1. Edit the ABB-ReserveIt-Work-Booking NumberOfGuests property.
2. Add a Local List of values to the property.
3. Add four Table values: 1, 2, 3, and 4.

4. Save your changes.

Update a section to use a drop-down list control


1. Open thepyEnterCaseDetailssection in the ABB-ReserveIt-Work-Booking class.
2. Edit the cell properties for the Number of guests field, and change the control type to Dropdown.
Note: By default, the list source is set to As defined on property. This default setting is sufficient
to verify your work.
3. Save your changes.

80
©2019 Pegasystems
Verify your work
1. Create a new Booking case.
2. Observe the additional guidance that Dev Studio provides to users with the PegaWAI ruleset
enabled.
3. On the first screen, click in the Number of guests field and listen to the change in the guidance
the screen reader provides to the user. The screen reader can now inform the user of the valid
choices, and the current value is selected when the user attempts to change the selection.
Note: After you finish enabling accessibility features in your application, switch back to the
ReserveIt:Administrators access group.

81
©2019 Pegasystems
Exercise: Localizing a UI form
Scenario
ABB has a requirement to translate the ReserveIt application to Spanish.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


System Architect admin@reserveit rules

Your assignment
Use the Localization wizard to localize the Booking case type of the ReserveIt application, export the
files, translate properties on a UI form into Spanish, import the files, set the locale settings, and test the
translated form.

Detailed steps
Run the Localization wizard
1. From the Configure menu of Dev Studio, select User Interface > Application readiness >
Localization> Translate to new language to start the translation process.
2. From the drop-down list, select Spanish ES and click Add.
3. Click Next to proceed to the next step.
4. Deselect the UI-Kit-7 ruleset to remove this from the scope of rulesets to localize.
5. Click Next.
6. Click Enable records for translation to set the localize flag on each record.
Note: Translation script completion may take a few minutes.
7. Click Next.
8. Click Download for translation to create the translation pack.
Note: This may take several minutes. The translation pack automatically downloads to your default
Downloads folder.
9. Click Next.
10. Write down the Work ID of the translation in progress and click Close to close the Localization
wizard.
Note: If the application is translated into multiple languages or if the wizard is executed more than
once, you will need the Work ID because there will be more than one Work ID to choose from when
you import the translation pack.

82
©2019 Pegasystems
Edit the TextToTranslate.xml file
1. Extract the contents of the translation package to your local drive. The translation package
decompresses to a folder named Translation_<LanguageSelectedForTranslation>_
<DateArchiveCreated>_<TimeStamp> (for example, Translation_Spanish_2019-01-30_06-21-04).
2. In the TranslationFiles folder, open the TextToTranslate.XML file.
Note: Using Microsoft Excel 2003 or later, you can edit this file by clicking the Enable Editing
button when the spreadsheet first opens.
3. Enter the Spanish text in column B (Translation) for the labels listed in the following table.

English terms Spanish term


Metro area Area del metro
Arrival date Fecha de llegada
Departure date Fecha de salida
Number of guests Número de huéspedes

4. Save the TextToTranslate.XML file to commit your translations.


Note: Do not change the name of the TextToTranslate.xml file. The translation wizard looks for
this exact name during the import process.
5. After the desired translations are complete, repackage the parent folder as a .zip archive.

Import the translation pack


1. From the Configure menu in Dev Studio, select User Interface > Application readiness >
Localization> Translations in progress to upload your file.
2. Select the appropriate translation Work ID that you noted when running the Translation wizard.
3. Select the ReserveIt (Spanish):01-01-01 ruleset as the location to which you want to save the
translations.
Note: If you pick a non-localized ruleset, the wizard creates a new localized ruleset and version. If
the ruleset already exists, the wizard imports translations to the existing localized ruleset.

4. For the HTML paragraphs, correspondences, and Correspondence Fragments, select 01-01-01 as
ruleset version.
5. Click Next.
6. Click Choose File and select the updated translation package you created in the previous steps.
7. Click Next to import the translation pack.
Note: It may take several minutes to import the translation file.
8. Click Finish and then click Close to close the Localization wizard.

83
©2019 Pegasystems
Verify your work
1. From the Configure menu in Dev Studio, select User Interface> Application readiness >
Localization > Locale Settings.
2. From the Use Locale drop-down list, select Spanish (Spain) and click Update.
3. Return to the ReserveIt application and create an Booking case. When the first UI form is displayed,
notice the field values that are translated.

4. Change the Locale Settings back to Ingles (Estados Unidos) and click Update.
5. Verify that running the Booking case displays the UI in English.

84
©2019 Pegasystems
Exercise: Source a page property with a
keyed data page
Scenario
During the Submission stage of the Candidate case type, applicants for an open position at TGB:
1. Review a list of open job positions
2. Select the position for which they want to apply
To help applicants select the correct position during the Submission stage, recruiters ask that the
description of an open position be displayed when selected.
Note: During the Screen stage, the recruiter may change the selected position after speaking with the
applicant.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
In this exercise, you use a keyed data page to display the selected position. Configure the D_PositionList
data page for keyed access and use it to display the job description.
The recommended tasks for completing this assignment are:
l Updating the configuration of the D_PositionList data page to access individual position information
with the position identifier
l Configuring the Position property to refer to the D_PositionList data page using the PositionAppliedFor
property as the key value
l Adding the JobDescription field to the CollectPersonalDetails section
l Ensuring that the job description is refreshed when the user selects a different position
Note: You may need to copy rules to an unlocked version of the HRApps ruleset to complete this
exercise.

85
©2019 Pegasystems
Detailed steps
Configure keyed data access for the data page
1. In the Data Explorer, open the D_PositionList data page.

2. Select Save As to save the rule into an unlocked ruleset version so that the rule can be edited.
3. Select Access pages with user defined keys to enable keyed page access.
4. Select .ID as the Page list keys.

Refer to the keyed data page


1. In the Application Explorer, open the Position property for the Candidate case type.
Tip: Property records are in the Data Model category. From the App Explorer, expand Candidate >
Data Model > Property.

86
©2019 Pegasystems
Note: Saving the property to an unlocked version of the HRApps ruleset results in a warning that
creating a duplicate property definition can negatively impact system performance. Justify copying
the property to a new unlocked ruleset by noting the switch to a keyed data page configuration and
create a new version of the Position property.
2. Change the Data Page field to point to D_PositionList and specify the PositionAppliedFor property as
the key.

Add the position job description as a read-only field


1. Create a new candidate case, then open the Live UI tool to identify the section where the job
description will be added.

87
©2019 Pegasystems
2. Click the crosshairs icon to open the CollectPersonalDetails_0 section.

3. Click Save As to save the rule into an unlocked ruleset version so that it can be edited.
4. Select Basic > Text input, and drag the control into the dynamic layout.

5. Select the control and click the Gear icon to open the settings.

88
©2019 Pegasystems
6. On the General tab, in the property field, enter .Position.JobDescription.

7. On the Presentation tab, in the Edit options field, select Read-only (always) and click Submit.

8. Select the dynamic layout with the Position applying for and Job description fields, and click the
Gear icon to open the settings.

9. To the right of the Refresh condition field, select the Gear icon to configure a refresh condition to
ensure that the description is refreshed when the drop-down is updated.

89
©2019 Pegasystems
Verify your work
1. Select Create > New > Candidate to create a new candidate case.

2. Under Position applying for, select a position.


3. Verify that the Job description is displayed.

4. Open the Clipboard tool.

5. Open the Position property in the pyWorkPage page to verify that the property refers to the D_
PositionList data page. When the user selects a job position, the description of the open position is
displayed.

90
©2019 Pegasystems
Exercise: Reading and writing data to a
database
Scenario
During the onboarding process, new employees are assigned to a seating location in a TGB office. The
seating location is either a cubicle or desk in a team room. To ensure that employees are assigned to
an available office, business partners in the Human Resources (HR) department must be able to
update the list of seating locations each time a location is assigned to an employee.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System Architect SSA@TGB rules

Your assignment
Create a savable data page that updates the status for a seating location. The status for the seating
location is changed to "Unavailable" when the HR business partner selects an available office and
submits the select seating location form. The following list includes the recommended tasks for
completing this assignment:
l Configure a savable data page in the TGB-HRApps-Data-Seating class.
l Add a Save data page step to the case life cycle.

Detailed steps
Configure a savable data page
1. In Dev Studio, in the Data Explorer, hover over the Seating Locations data type and to the right,
click the three vertical dots icon to open the contextual menu.

91
©2019 Pegasystems
2. From the contextual menu, click Add data page to create a new data page associated with the
Seating Locations data type.

3. In the Label field, enter Save Seating to name the data page.
4. Click Create and open to open the Save Seating data page definition.

92
©2019 Pegasystems
5. Under Data page definition, click the Mode drop-down and select Savable to enable the data save
options.

6. Click the Parameters tab to define the parameter that uniquely identifies each seat.
a. In the first row, in the Name field, enter SeatID.
b. In the first row, in the Description field, enter Office seat ID.
c. Keep the default values for the remaining fields.
7. Click the Definition tab to return to the data page definition.
a. Under Data sources, click the Source drop-down and select Lookup to source the savable data
page from a data class.
b. In the Class name field, enter or select the TGB-HRApps-Data-Seating class.
c. Below the Class name field, click Parameters to open the Parameters for Seating Locations
window.
i. In the window, in the Value field, enter or select the parameter you defined on the
Parameters tab, Param.SeatID.
ii. Click Submit to dismiss the window.
d. Under Data save options in the Class name field, enter or select the TGB-HRApps-Data-
Seating class.

93
©2019 Pegasystems
e. In the Data transform field, enter UpdateSeatingLocationAvailability as the name of a new data
transform.

f. To the right of the field, click the crosshairs icon.


g. In the upper-right corner of the Create Data Transform form, click Create and open to create
a new data transform record.
i. On the Definition tab of the data transform rule form, in the Target field, enter .status, as
the Target value.
ii. In the Source field enter “Unavailable”. The data transform sets the status of a seat to
"Unavailable".

iii. Click Save to save the data transform.


8. Return to the Save Seating data page and click Save.

Add a Save data page automation step


1. From the Onboarding case type, open the Workflow tab.
2. In the Facilities Setup process add a Save data page step.
3. Move the Save data page step directly after the Select Seating Location step.
4. In the contextual properties panel on the right, in the Data Page Name field enter D_SaveSeating
to reference the Save Seating data page.

94
©2019 Pegasystems
5. Below Parameters, in the SeatId field, enter or select .Location to pass the location parameter
when the savable data page is called.
6. Save the changes to the workflow.

Verify your work


To fully test the configuration, run an Onboarding case with test data.
1. To view the seating location records and identify test data, from the Seating Locations data type
tab, select the Records tab.

95
©2019 Pegasystems
2. Identify an open seating location record for testing.

3. Create a new Onboarding case.


4. On the Identify Home Office form, from the Office drop-down, select the home office for testing.
5. Advance to the Select Seating Location step.
6. Select the open seating location to test.
7. From the Seating Locations data type tab, verify that the selected seating location is no longer
available.

96
©2019 Pegasystems
Exercise: Creating a SOAP connector
Scenario
Human Resources (HR) business partners use a legacy application to locate discount services available
to employees near their home location. This application requires a longitude and latitude value to
locate the discount services. To help facilitate the use of this legacy application, HR business partners
have asked to extend the HR Apps application functionality to identify the latitude and longitude for a
given zip code.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Create a SOAP Integration rule and configure a data page to invoke the SOAP connector
l Create a SOAP integration rule to connect to a zip code look up service.
l Create an XML parse rule to extract the latitude and longitude values from the SOAP connecter
response.
l Create and configure a data page to invoke the SOAP connector.
l Optional: Create and configure the Location look up case type to invoke the data page.

Detailed steps
Create a SOAP Integration rule to connect to a zip code look up
service
1. In Dev Studio, select Configure > Integration > Connectors > Create SOAP Integration to open
the create a new SOAP Integration form.
2. On the New SOAP Integration page, in the Load WSDL step, select Upload WSDL from URL to
enable the option to connect to a URL.
3. In the Upload WSDL from URL field, enter https://graphical.weather.gov/xml/SOAP_
server/ndfdXMLserver.php?wsdl.
4. In the lower-right corner of the New SOAP Integration page, click Next > to proceed to the Select
Operations step.

97
©2019 Pegasystems
5. Clear any enabled operations check boxes and click LatLonListZipCode to enable only the
LatLonListZipCode operation.

6. In the lower-right corner, click Next > to proceed to the Review step.
7. In the Name field, enter LatLongLkp to provide the class name and identifier for the service.
8. In the Parent class field, enter or select PegaHR-Int.
9. Under Choose application layer, select HR Apps.
10. Under Add to ruleset, select Existing to enable the ruleset name and version options.
11. In the Ruleset field, select HRAppsInt.

98
©2019 Pegasystems
12. In the Version field, select the highest available version.

13. In the lower-right corner, click Create to create all the relevant rules for the new SOAP Integration.

Create an XML parse rule to extract the latitude and longitude values
from the SOAP connecter response
1. From the Record Explorer, select Integration-Connectors > Connect SOAP to launch the Connect
SOAP rule instances.
2. Filter the Service Name column to locate and open the newly created LatLonListZipCode Connect
SOAP.
3. Select the LatLonListZipCode connect SOAP instance.

99
©2019 Pegasystems
4. Click the Request tab to open the Request page.
5. Under Request parameters, verify the Map from Key field is configured with the
.LatLonListZipCodeZipCodeList property.
6. Click the Response tab to open the Response page.
7. Under Response parameters, from the Map to drop-down, select XML Parse Rule.
8. In the Map to Key field enter ParseLatLongResponseXML to provide a name for the new parse XML
rule.

9. Click the crosshairs icon next to ParseLatLongResponseXML field to open the create Parse XML
form.
10. In the Root Element Name field, enter dwml to identify the XML root element from the service
response.
11. From the Add to ruleset drop-down, select HRAppsInt and the highest available version.
12. In the upper-right corner, click Create and Open to create the Parse XML rule.
13. On the Mapping tab, select dwml and click Add Element to add a new child element.

14. Double-click the _new_ element to open the modal form for the element.
15. In the Node Name field, enter latLonList.
16. In the Property field, enter .LatLonListZipCodeListLatLonOut.

100
©2019 Pegasystems
17. Click OK to save the element properties.

18. Click Save to save the Parse XML rule.


Tip: The XML rule is now ready to parse the incoming XML response and can extract the
information contained between < latLonList> and </latLonList>.
19. Click the LatLonListZipCode Connect SOAP rule tab.
20. On the Response tab, under Response Parameters, from the Map to Key drop-down, select
ParseLatLongResponseXML dwml as the new value.

21. Save the SOAP connector rule.

101
©2019 Pegasystems
Create and configure a data page to invoke the SOAP connector
1. In Dev Studio, select Create > Data Model > Data Page to launch the Create Data Page rule form.
2. In the Label field, enter LatLongLookup.
3. From the Apply to drop-down, select PegaHR-Int-LatLongLkp-ndfdXML to create the data page in the
same context as the SOAP connector.
4. From the Add to ruleset drop-down, select HRAppsInt and the highest available version.
5. In upper-right corner, click Create and open to create the data page.
6. On the Definition tab, under Data sources, from the Type drop-down, select SOAP.
7. In the Name field, enter LatLonListZipCode.
8. In the Request Data Transform field, enter LatLongRequest.
9. Click the crosshairs icon to create a new data transform.

10. In upper-right corner, click Create and open to create the data transform.
11. On the Definition tab, configure Step 1 with the following property values.

Property Name Value


Action Set
Target .LatLonListZipCodeZipCodeList
Relationship equal-to
Source Param.ZipCode

12. In the upper-right corner, click Save to save the data transform.
13. Return to the Edit: LatLongLookup data page tab.

102
©2019 Pegasystems
14. Below Data sources, under the Request Data Transform field, click Parameters.

15. In the Parameters for LatLongRequest pop-up, select Pass current parameter page to enable
the parameters for Request data transform.
16. Click Submit.
17. Click the Parameters tab to open the parameters page.
18. Add a new parameter that uses the following information.

Property Name Value


Name ZipCode
Description Please enter a Zip code for which you want to fetch Latitude and Longitude
Data type String
Required Yes
In/Out In

19. Click the Load Management tab, select Limit to a single data page.
20. Save the Data page.

Verify your work


1. Open the D_LatLongLookup data page.
2. In the upper-right corner, click Actions to open the actions menu.
3. In the actions menu, click Run to run the data page.
4. In the Run window , in the Value field, enter 02142 for the ZipCode parameter.
Note: You can enter any valid zip code in the Value field.
5. Click Run.

103
©2019 Pegasystems
6. Verify the LatLonListZipCodeListLatLonOut property return Latitude and Longitude coordinate
values for the provided zip code.

Optional - Create and configure a Location look up case type to invoke


the data page
1. Create a new section in the same class as the parse XML rule and name it Location.
Tip: The class name for the parse XML rule is PegaHR-Int-LatLongLkp-ndfdXML.
2. In the Location section rule, add LatLonListZipCodeListLatLonOut as a read-only property.

3. Create a Location case type, and add a stage named Location Details.

104
©2019 Pegasystems
4. Configure the Location case type to look like the following image.

5. Add a ZipCode field to the Location information view.


6. In the Location information section, add a Button element and configure the Refresh this
section action to refresh the section and display the LatLonListZipCodeListLatLonOut property
value.

7. Embed the Location section inside the Location Information section and configure the
embedded section to use a data page as the Page context and pass the .ZipCode property as the
parameter value.
Tip: To embed a section, in Location Information section, click + Add new > Advanced >
Embedded section.

105
©2019 Pegasystems
8. Verify your work by creating an instance of the Location case type.
9. On the Location information page, enter a zip code and click Check to refresh the section and
display the LatLongListZipCodeListLatLonOut property value.

106
©2019 Pegasystems
Exercise: Simulating integration data
Scenario
As part of each candidate case, TGB performs a background check on the applicant. During the
background check, a credit report is retrieved from a credit check provider using a SOAP connector.
Until recently, the WSDL was not available, so the data source was simulated in the D_CreditReport data
page by using the SimulateCreditCheck data transform.
A developer generated the CreditCheck connector using the New SOAP Integration wizard. The
connector is ready for data page configuration. However, the service is still not available, and the
connector requires simulation.
Note: For more information on configuring connectors, see the help topic, Integration Connectors
landing page.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
The following list includes the recommended tasks for completing this assignment:
l Configure the CreditCheck connector for the D_CreditReport data page
l Create a data transform with the test data based on the existing simulation data transform
l Creating a simulation activity for the CreditCheck connector

107
©2019 Pegasystems
Simulate the integration with the TGB credit check provider, using the same data used when
simulating the data source in the data page. The simulation should return one of three individual
profiles according to the Taxpayer ID Number (TIN) entered by the candidate.

TIN Name Address City/State Open Total


accounts balance
111-11- Maria Silva 123 Main St., Apt. Anytown, IL 4 $5,329
1111 304
222-22- Edward 57 Maple Dr. Mytown, IL 7 $312,135
2222 Grayson
333-33- Kim Langston 153 Woodland Terr. Homeville, 9 $257,394
3333 IL

Detailed steps
Source the D_CreditReport data page with the CheckCredit connector
1. From Dev Studio, open the D_CreditReport data page.
Tip: In the Data Explorer, expand the Credit report data type and click the Credit report data page to
open it.
2. Disable simulation and configure the data page to be sourced by the CreditCheck connector.

3. Under the Response Data Transform field, click Parameters and select the Pass current
parameter page check box to verify that the TIN is passed to the request and response data
transforms.

108
©2019 Pegasystems
4. Save your changes.

Create data transform with the test data


1. Open the SimulateCreditCheck data transform present in the TGB-Data-CreditReport class and save it
to the TGB-Int-CreditCheck-CreditCheck class. Saving the existing data transform in the new class
eliminates the need to reenter all the data.
Note: When saving the rule, the TGB-Int-CreditCheck-CreditCheck class path cannot be selected in
the Apply to: field smart prompt. The class path must be entered manually.
Due to the new context, the form displays undefined property errors.

2. In step 1, specify the .CreditCheckRequest.TIN property value for TIN 111-11-1111 target property for
the When action to test.
3. Between step 1 and step 1.1, insert an Update Page action with the
.CreditCheckResponse.CreditReport as the target. This action sets the context for setting properties
on a target page that is different than the primary page.

109
©2019 Pegasystems
4. Drag all the existing Set actions into the Update Page action.

5. Repeat steps 2-4, and update the TIN 222-22-2222 and TIN 333-33-3333 target properties.
6. Click Save. The undefined property errors are corrected when you save the record.

Create a simulation activity for the CheckCredit connector


1. From Dev Studio, select Configure > Integration > Connectors > Connector Definitions &
Simulations to open the connector simulation landing page.
2. Expand the SOAP connectors section.
3. Locate the TGB-Int-CreditCheck-CreditCheck.CreditCheck connector.
4. Click Total Simulations.

5. In the Simulations dialog box, click the Plus icon to add a simulation activity.
6. In the Simulation Activity field, enter CreditCheckSim.
a. Select the USER SESSION radio button.
b. Click the crosshairs icon to create the simulation activity.

110
©2019 Pegasystems
7. Create the simulation activity in the same class and ruleset as the connector it simulates.
a. In the Apply to field, enter TGB-Int-CreditCheck-CreditCheck.
b. In the Add to ruleset field, enter CreditCheck.

8. Apply the data transform in the simulation activity.


a. In the Method field, select Apply-DataTransform.
b. In the Value field enter SimulateCreditCheck.

9. Click Save to save the changes to the CreditCheckSim activity.


Note: Pega Platform best practices limit the use of activities. This is why you are seeing the severe
warning. For this exercise, justify the warning.
10. From the Integration: Connectors tab, click Submit on the Pega Simulations dialog box.

Verify your work


1. Create a new Candidate case.
2. Enter one of the test TIN values (111-11-1111, 222-22-2222, or 333-33-3333).

111
©2019 Pegasystems
3. Advance through the candidate case to the background check screen.
4. Verify that the connector simulation returns the test data.

112
©2019 Pegasystems
Exercise: Managing global resource settings
Scenario
During development, the credit check integration points to a system with test data. As the application
is migrated from a development environment to a test environment and then to a production
environment, the endpoint URL requires an update.
The table below provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System Architect SSA@TGB rules

Your assignment
Using a global resource setting to simplify maintenance of the integration settings, implement the
endpoint URL for the credit check integration. As the HRApps application is migrated from
development to production, the endpoint URL can be updated without unlocking an application ruleset
by configuring a Dynamic System Setting (DSS).
Note: Dynamic system settings are data records, rather than rules. Because data records are not
versioned, they are not part of a ruleset. Therefore, you can edit the data records on a production
system.
To implement the endpoint URL using a global resource setting, you:
l Create the class TGB-Int-CreditCheck-Env to store a page property containing the endpoint URL for
the Credit Check connector.
l Configure a data transform to set the endpoint URL by using the getDataSystemSetting function and
referencing the appropriate Dynamic System Settings (DSS) record.
Note: In a production environment, you would configure a new DSS record for the application
migration. To satisfy exercise environment security requirements in this exercise, you change the
DSS record reference instead of changing the DSS settings.
l Create a data page sourced by the data transform.
l Reference the endpoint URL on the Credit Check connect SOAP rule.

Detailed steps
Create a data structure for global resource setting data
1. From Dev Studio, in the Application Explorer, navigate to the TGB-Int-CreditCheck class.
2. Right-click SysAdmin and select Create > Class to display the Create Class form.
3. In the Label and Class Name fields, enter TGB-Int-CreditCheck-Env.
4. From the Add to ruleset drop-down list, select CreditCheck.

113
©2019 Pegasystems
5. Click Create and open to create the class record.
6. On the class record form, in the Created in version field, enter or select the highest ruleset version
listed.
Note: If you completed the Creating a new application version exercise, the highest version should
be 01-01-02. Otherwise, the highest version should be 01-01-01.
7. Click the History tab and enter a Description of the class and Usage notes.
8. Click Save to update the class record.
9. Refresh the Application Explorer to display the class you created.

10. Right-click Env and click Create > Data Model > Property to create a single page property named
CreditCheck.
11. Click Create and open to create the property.
12. On the General tab, under Property type, to the right of Text, click change to display the property
type selection.
13. Under Page, select Single Page to configure the property as a single page.
14. in the Page definition field, enter Embed-Env-Connect-SOAP.

114
©2019 Pegasystems
15. Click Save to complete your configuration of the property record.

Create a data transform to set values for the global resource setting
1. In the TGB-Int-CreditCheck-Env class, right-click Env and click Create > Data Model > Data
Transform to open the create data transform form.
2. Name the data transform ResourceSettings.
3. On the Definition tab of the ResourceSettings data transform, in the Target field, select
.CreditCheck.pyEndpointURL to set the value of the endpoint URL.
4. In the Source column, to the right of the Select values + link, click the Gear icon to open the
Expression builder.
5. Click Browse to display the navigation pane for the Expression builder.
6. In the navigation pane, select Functions > Advanced.
7. To the right of getDataSystemSetting, select the Plus icon to add the function to the content pane
of the Expression builder.
Note: The Expression builder contains two instances of getDataSystemSetting. One instance is
configured for two arguments and the other three arguments. However, because you enter the
arguments manually, the instance you use is irrelevant.
8. In the content pane, enter the two arguments for the function,
"CreditCheck","GRS/CreditCheck/DevURL" and close the parenthesis for the function call.

115
©2019 Pegasystems
9. Click Submit to close the Expression builder and return to the data transform.

10. Click Save to complete your configuration of the data transform.

Create a data page sourced by the data transform


1. In the TGB-Int-CreditCheck-Env class, create a data page named D_CreditCheckEnv in the Read-Only
mode and Node scope.

116
©2019 Pegasystems
2. Configure the data page to reference the data transform you created earlier as the source.

3. In the Load Management tab, in the Load authorization section, enter or select the Access Group
HRApps:Adminstrators.
4. Click Save to complete your configuration of the data page.

Reference the global resource setting in the connector


1. Open the CreditCheck connect SOAP record.
Tip: Connect SOAP records are located in the Connect SOAP category. From the Application
Explorer, expand TGB-Int-CreditCheck-CreditCheck > Integration-Connectors > Connect
SOAP.
2. Under Connection, in the Service endpoint URL field, replace the existing endpoint URL with a
reference to the global resource setting =D_CreditCheckEnv.CreditCheck.pyEndPointURL.

Note: The syntax for the reference consists of three parts: (1) the name of the data page preceded
by an equals sign (=D_CreditCheckEnv), (2) the name of the page property that contains the
configuration property (CreditCheck), and (3) the name of the configuration property
(pyEndpointURL).

117
©2019 Pegasystems
3. Save your changes to complete your configuration of the connect SOAP record.
4. Justify the security warning the connect SOAP record generates.

Verify your work


1. Open the D_CreditCheckEnv data page in the TGB-Data-CreditReport class.
2. Click Actions > Run to open the Run window to open the Run Data Page window.
3. Below No parameters to set, select the Flush all instances of this page before execution check
box to clear old data from the system cache.
4. In the Run window header, click Run to test the data page.
5. In the Run window, from the Results section, under Property, expand the CreditCheck row to view
the pyEndpointURL property.

Optional assignment
For additional practice, in the ResourceSettings data transform, reconfigure the DSS setting to point to
GRS/CreditCheck/ProdURL and perform the steps in the Verify your work section, confirming that the

118
©2019 Pegasystems
value of pyEndpointURL is now http//localhost/test/wsdl/prod_server.

119
©2019 Pegasystems
Exercise: Configuring error handling for data
pages
Scenario
As part of each candidate case, TGB performs a background check on the applicant. As part of the
background check, a credit report is retrieved from a credit check provider using a SOAP connector.
If something goes wrong when the SOAP connector is invoked, TGB wants to log errors and display the
message "Credit Check unavailable: contact your system administrator" to the user.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
The recommended tasks for completing this assignment are:
l Configure the CreditCheck connector for the D_CreditReport data page.
l Detect errors and invoke a reusable error handling data transform from the response data
transform.
l Verify that all errors are detected and handled in the error handling data transform.

Detailed steps
Source the D_CreditReport data page with the CheckCredit connector
1. Open the D_CreditReport data page.
2. On the Credit report data page, click the Definition tab to view the data sources.
3. Under Data sources, disable data simulation.

120
©2019 Pegasystems
4. Below the Request Data Transform field, click Parameters to verify that Pass current parameter
page is selected to ensure that the TIN (Tax identification number) is passed to the request data
transform.

5. Below the Response Data Transform field, click Parameters to verify that Pass current parameter
page is selected to ensure that the Case ID is passed to the response data transform.
6. Save the D_CreditReport data page.

Create reusable error handling data transform


1. Open the standard pxErrorHandlingTemplate data transform.
2. Create a copy of the pxErrorHandlingTemplate data transform called ErrorHandlingMaster.
3. On the Parameters tab, define a parameter named pyCaseID for the case ID and mark the
parameter as required.

4. On the Definition tab, right-click step number 2 and select Enable to get messages using the
pxGetPageMessages function.

121
©2019 Pegasystems
5. On step number 4, right-click and select Enable to enable the step to use the pxClearMessages
function to clear the messages on the data page before adding your custom error message.
6. On step number 6, right-click and select Enable to use the pxAddMessageToPage function and add
the ErrorMessage input parameter as a message.
7. On step number 8, right-click and select Enable to use the pxLogMessage function to write messages
in the log file.
8. In the Source field of step 8, Enter @(Pega-RULES:Default).pxLogMessage(param.getMessage + " for
case number " + param.pyCaseID).

Note: You always need to specify a target, even if the function does not return anything or if you
are not interested in the response.
9. Save the ErrorHandlingMaster data transform.

Configure the CreditCheckResponse data transform with


ErrorHandlingMaster
1. From D_CreditReport data page, open the CreditCheckResponse data transform.
2. Right-click step 2 and select Enable to ensure that the pxDataPageHasErrors when rule is invoked to
check for errors.

3. Configure the CreditCheckResponse data transform to apply the ErrorHandlingMaster data transform
if an error occurs.

122
©2019 Pegasystems
4. Click the Gear icon to specify the input parameters for the ErrorHandlingMaster data transform.

5. In the pyCaseID input parameter field, enter param.CaseID.

6. Save the CreditCheckResponse data transform.

Configure an error message in UI


1. In Application Explorer, under Candidate case type expand the User Interface > Section and
click BackgroundCheck_0 section to open BackgroundCheck_0 section rule.
2. Click Section - Credit report to open the BackgroundCheck_0_CreditReport section rule.

123
©2019 Pegasystems
3. From the Basic menu, select Label field and append it in the dynamic Layout.

4. Next to the new label field, click the Gear icon to configure the open the cell properties for the new
label.
5. Use the following information to complete the General form.

Property Value
Value Credit Check unavailable: contact your system administrator
Visibility Condition (when rule)
Condition for visibilty hasMessages

6. Click the Presentation tab, and in the Label format field, select Error Message.

7. Save the BackgroundCheck_0_CreditReport section rule.

124
©2019 Pegasystems
Verify your work
Note: Simulation might be enabled if you completed the Configuring data access patterns exercise
prior to this exercise. Disable simulation for the CreditCheck connector before you proceed.
1. From the Case Manager portal, begin a Candidate case.
2. Complete the Submission stage (Collect Personal Details, Collect Professional Details, Collect
Educational Details and Collect a Work Sample views).
Note: You can specify any values to complete the steps. They do not impact this exercise.
3. From Actions menu, select Conduct phone screen to open the conduct phone screen view.
2. In the Conduct screen view, click Submit to advance the case to Approval assignment.
4. From the Actions menu, select Approval.
5. In the Approval view, click Approve to advance the case to Background check assignment.
6. From Actions menu, select Background Check to start the Background Check.
7. The message Credit Check unavailable: contact your system administratoron you screen
indicates the system executed the error handling data transform.

8. In Dev Studio, from Configure menu, Navigate to System > Operations > Logs to open the logs of
the system.
9. Click Log files to open the all logs window.
10. Click PegaRULES.log to open the PegaRules log.

125
©2019 Pegasystems
11. Scroll the log file to the end to the see more details on error message.

Tip: To see the error, you can search the log file with Case ID.

126
©2019 Pegasystems
Exercise: Exposing an application with a
SOAP service
Scenario
The Human Resources (HR) department partners with several staffing services to expose open
positions to a wider audience of potential job applicants. These staffing services have requested that
TGB allow them to submit applicants for open positions directly from their own client management
systems.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Create a SOAP service. Configure the service to accept the following input for candidate cases:
l First name
l Last name
l Email
l Candidate comment
l Position applying for
l Experience (list with job title, company, start date, end date)
If the candidate case is created by the SOAP service, skip the steps in the Collect Candidate Details
process.
Note: If you completed the Working with temporary cases exercise, go to the Candidate class and
open the pyStartCase flow. Then, on the Process tab, deselect Temporary object before you continue
with this exercise.

Detailed steps
Run the Service wizard
1. Select Dev Studio > Configure > Integration > Services > Service Wizard to start the Service
wizard.

127
©2019 Pegasystems
2. Set the Service Purpose to Create and manage work and the Service Type to SOAP, then click
Next.

128
©2019 Pegasystems
3. Set Case/Supporting Type to TGB-HRApps-Work-Candidate and Flow Type to pyStartCase, select
Create Work and set the Organization to TGB, then click Next.

129
©2019 Pegasystems
4. Click Next. (The pyStartCase flow does not have any flow actions that you want to consider a service
to execute.)

5. Expand CreateNewWork to display the Primary Page Input Properties.


6. Select Use XML for data mapping to allow list structures in the request.
Note: Only properties defined directly in the TGB-HRApps-Work-Candidate case type are shown.
Inherited properties are not shown and need to be added manually after the wizard has been
completed.
7. Select the following input properties:
l .CandidateComment
l .PositionAppliedFor
l .Experience().Company
l .Experience().EndDate
l .Experience().JobTitle
l .Experience().StartDate

130
©2019 Pegasystems
Click Next.

8. Set the Ruleset Name to HRApps and the Ruleset Version to the version in which you are
working.

131
©2019 Pegasystems
9. From the Service Package Options drop-down list, select Configure a new service package, then click
Next.

132
©2019 Pegasystems
10. Keep the default settings in the Configure Data Records screen. Click Next.
Note: Requires authentication is selected by default. This means that you need to provide an
operator and password when you call your service.

133
©2019 Pegasystems
11. The Review and Save screen displays the records that are created by the wizard. Click Finish to
create the records.

134
©2019 Pegasystems
12. The final page displays the records created by the wizard.

135
©2019 Pegasystems
Add missing input parameters
1. Open the CreateNewWorkRequest XML parse rule generated by the wizard.
2. Click Add Element to add the required input parameters that were not available for selection in the
wizard.

3. Click the new icon to open the User Data window to create the
FirstName.Candidate.pyFirstName input property.

3. Repeat steps 2-3 to create the following additional properties:


l LastName.Candidate.pyLastName
l Email.Candidate.pyEmail1
4. Save your changes.

136
©2019 Pegasystems
Configure the case to skip the Submission stage for cases submitted
using the service
1. Add a TrueFalse property named CreatedByService to the Candidate case type.
Tip: To add a property, in the Application Explorer, right-click the Candidate case type. select
Create > Data model > Property to open the Create Property form in the case type class.
2. Create a data transform named SetServiceDefaults that sets the property CreatedByService to true.
3. On the Service tab of the service rule, in the Data transform field, add the data transform to
invoke the data transform when the service primary page is created.
Tip: SOAP service records are in the Integration-Services category. From the Records Explorer,
expand Integration-Services > Service SOAP to list available SOAP service records.

4. In the Candidate case type, on the Workflow tab, select the Collect Candidate Details process.
5. In the Start process field, use an expression to start the Collect Candidate Details process
conditionally.
6. Set the condition to evaluate the .CreatedByService property.

Verify your work


1. Open the CreateNewWork SOAP service rule.
Note: Select the CreateNewWork instance of HRApps ruleset.
2. Select Actions > Run to test the service.

137
©2019 Pegasystems
3. Select Supply SOAP request envelope and enter some test data, then click Execute. For the value
of PositionAppliedFor, enter REQ1.

4. In the Application Explorer, right-click the Candidate case type and select View > Instances to
verify that a new Candidate instance was created.

Tip: If the instance was not created, start the Tracer and rerun the wizard to debug the service. To
use the Tracer to debug a service, open the Tracer Settings dialog and under Event types to
trace, select Services.
5. Open the Candidate case instance created by the service.

138
©2019 Pegasystems
6. Verify that the Submission stage is completed and that the First name, Last name, and Position
applied for fields are populated.

139
©2019 Pegasystems
Exercise: Accessing a Pega application using
the Pega API
Scenario
The IT department is adding the ability for users to work on an internal portal. They submitted a
requirement to display open positions within TGB to portal users. You have been assigned to test the
API calls to the HRApps application.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Note: This exercise does not describe how you build the external application. The goal is to
demonstrate the HTTP query needed to access your Pega application and the resulting JSON response.
Use the Pega API landing page to query the data page D_PositionsList to return a list of all open
positions.
Tip: The JSON response can be difficult to read. To help make it more readable, try downloading a
JSON viewer plugin for your browser.

Detailed steps
1. From the Dev Studio header, click the Info icon to open the Resources menu.
2. From the menu, select Pega API to open the Pega API landing page.

140
©2019 Pegasystems
Note: Pega APIs require TLS/SSL by default to enable secure access through Pega API services. The
exercise environment disables TLS/SSL to eliminate the need to use the HTTPS protocol. TLS/SSL
should be disabled only for non-production or training purposes.
3. In the Application category, in the data section, click /data/{ID} to query a data page.

4. In the Value field, enter D_PositionList to display a list of all open positions.
5. Click Try it out! to retrieve the data from the data page.
6. When prompted for credentials, enter the username ssa@tgb and password rules.
7. Observe the resulting JSON response in the Response Body section of the landing page. Below

141
©2019 Pegasystems
"pxResults", three positions are displayed as available.

142
©2019 Pegasystems
Exercise: Creating reports that combine data
from multiple classes
Scenario
The business partners in the Human Resources (HR) department have requested two reports.
The first report is to track the progress of candidate cases generated in the HRApps application. This
report should return a list of open cases, displaying the status, urgency, assigned workbasket, and
current assigned task for each case.
The second report is to comply with government regulations that require employees to enroll in a
health insurance plan. For each onboarding case, this report should identify the medical insurance
plan selected by the employee.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Create two reports for the HR business partners.
The first report lists every candidate case. For each case, list the current status of the case, the current
workbasket to which the case is routed, the current assignment for the case, and the assignment
urgency.
The second report lists every onboarding case. For each case, list the last name of the associated
employee, the ID of the benefits enrollment child case, the current status of the benefits enrollment
case, and the selected medical plan.

Detailed steps
Create a report that joins classes referencing an association rule
Use an association rule to join the Assign-Workbasket class with the TGB-HRApps-Work-Candidate class.
1. In the Candidate case type, create a report definition named Candidates by workBasket.
Tip: To create the report definition, in the Application Explorer, right-click the case type and select
Create > Reports > Report Definition.
2. In the Edit columns section, in the Column source and Column name fields, enter the following
values. Use the pxWorkbasketAssignment prefix to identify the properties in the Assign-Workbasket
class you want to use in the report.

143
©2019 Pegasystems
Column source Column name
.pyID Case ID
.pyStatusWork Work Status
pxWorkbasketAssignments.pxAssignedOperatorID Workbasket ID
pxWorkbasketAssignments.pxUrgencyAssign Urgency of Assignment
pxWorkbasketAssignments.pxTaskLabel Task Label

Note: Selecting one of the three properties with the pxWorkbasketAssignments prefix adds an
association rule to the report.
3. When you are done, the columns look like the following image.

4. Save your report definition.


5. To verify your configuration, on the rule form header, click Actions > Run to generate the report.
The report lists the cases, their case status, the workbaskets with which they are associated, and the
current assignments and their urgency.

Create a report that uses a class join in the report definition


Use a class join in the report definition to join the TGB-HRApps-Work-BenefitsEnrollment class with the
TGB-HRApps-Work-Onboarding class.
1. In the Onboarding case type, create a report definition named Employee medical selection.
2. Click the Data Access tab.

144
©2019 Pegasystems
3. In the Class joins section, click Add class join to add a row.
4. In the Prefix field, enter BE to create a prefix for benefits enrollment cases. Use this prefix to
reference properties in the Benefits Enrollment class.
5. In the Class name field, enter TGB-HRApps-Work-BenefitsEnrollment. This is the class you want to
join to the report class. Keep the default value in the Type field Only include matching rows.
6. At the end of the row, click Edit conditions. The system displays the Enter filter conditions dialog.
7. In the Column field, enter BE.pxCoverInsKey.
8. In the Relationship field, leave the default value is equal.
9. In the Value field, enter .pzInsKey.

10. Click Submit to save your filter condition and close the dialog.
11. Click the Query tab.
12. In the Edit columns section, enter the following Column source and Column name values. Use
the BE prefix to find properties in the TGB-HRApps-Work-BenefitsEnrollment class you want to use in
the report.
Column source Column name
.pyID Case ID
.Employee.pyLastName Last Name
BE.pyStatusWork Benefits Enrollment Work Status
BE.pyID Case ID
BE.MedicalPlan.Name Plan name

145
©2019 Pegasystems
When you are done, the report definition looks like the following image.

13. Save your report definition.

Verify your work


To verify your configuration, on the rule form header, click Actions > Run to generate the report.
For each onboarding case, the report includes the case ID and the last name of the employee
associated with the case. For each joined benefits enrollment case, the report lists the case status of
the employee's benefits enrollment case, the case ID, and the selected medical plan.

146
©2019 Pegasystems
Exercise: Secure an application using role-
based access control
Scenario
In the Employee Evaluation case, TGB provides an optional, case-wide action to update an employee’s
goals. The Human Resources (HR) department requires that HR business partners can run the
UpdateGoals action at any time.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect
HR Business Partner HRPartner@TGB rules

Your assignment
Create a privilege and add it to the UpdateGoals flow action. Then, use the Access Manager to add the
privilege to HR staff.
Tip: Before testing your changes, remember to check in all rules from your personal ruleset.

Detailed steps
The following table provides the credentials you need to complete this portion of the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Create and add a privilege to the UpdateGoals flow action


1. Log in to the exercise environment with Operator ID SSA@TGB using password rules.
2. Open the UpdateGoals flow action in the TGB-HRApps-Work-EmployeeEvaluation class.
3. On the Security tab in the Privilege name field, enter UpdateGoals.
4. Click the crosshairs icon to create the privilege.

147
©2019 Pegasystems
5. On the Create Privilege form, click Create and open to create the UpdateGoals privilege.

6. Click Save to save your changes to the privilege rule form.


7. Save the UpdateGoals flow action.

Add and configure the privilege for the roles


1. From the Dev Studio Configure menu, select Org & Security > Access Manager > Privileges to
open the Privilege tab for the Access Manager.
2. In the Role field, enter HRApps:HR.
3. In the Case Type field, enter TGB-HRApps-Work-EmployeeEvaluation.

4. Below the AllFlowActions privilege, click the plus icon to add a privilege.
5. Select the UpdateGoals privilege.
6. Select Full Access.

7. Click OK.

Verify your work


Verify access for HR staff
The following table provides the credentials you need to complete this portion of the exercise.

Role Operator ID Password


HR Business Partner HRPartner@TGB rules

148
©2019 Pegasystems
1. Log in to the Case Manager portal with Operator ID HRPartner@TGB using password rules.
2. Create a new employee evaluation case.
3. Click Actions and verify that the Update goals action is available on the menu.

4. Click Change stage to move the case to the second stage.


5. Click Submit to move the case to the next stage.
6. Click Actions and verify that the Update goals action is still available on the menu.

149
©2019 Pegasystems
Exercise: Secure an application using
attribute-based access control
Scenario
Each candidate case includes a Taxpayer Identification Number (TIN) to identify the candidate. This
information is considered sensitive personal information. The Human Resources (HR) department is
required to prevent unauthorized access to sensitive personal information. To satisfy this requirement,
unless the user is a member of either the HR or Recruiting organization units, the HR department
wants to mask the TIN. However, the field must be editable on the first step of the case life cycle so
that users can enter their TIN on the form.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


System Architect SSA@TGB rules
End user Recruiter@TGB rules

Your assignment
Create an access control policy condition for the Candidate case type. Configure the condition to
perform the following tests.
l Create an Access When record to test if the user is a member of either the Recruiting or HR org
units. Then apply the Access When record to the access control policy condition.
l Create a policy condition to test whether the property pxCreateOperator is null when the user is a
member of either the Recruiting or HR org units.
l Create a policy condition to test whether the property pxCreateOperator is not null when the user is
not a member of either the Recruiting or HR org units.
Create an access control policy for the Candidate case type. Configure the policy to mask all numbers
of the TIN property if the access control policy condition is true.
Update the Collect Candidate Details process to set a value of the property pxCreateOperator once the
user completes the Collect Personal Information assignment. To do this, copy the value of
pxCreateOperator from pyWorkPage.

Detailed steps
Create the Access When record
Create an Access When record to test whether the operator is a member of either the HR or Recruiting
org units.

150
©2019 Pegasystems
Note: Access control policy conditions can only test against clipboard data. The policy condition must
test the org unit of the operator against two constant strings, "HR" and "Recruiting," to satisfy the
requirement. Configure an Access When record to test a constant such as "HR" or "Recruiting."
1. In Dev Studio, from the Create menu, select Security > Access When to open the Create
Access When form.
2. In the Label field, enter Is HR Or Recruiting to name the Access When record.
3. In the Apply to field, enter or select TGB-HRApps-Data-Candidate.
4. On the Create Access When form, click Create and open to create the Access When record.
5. On the Access When record, double-click the text [Double click to add condition] to open the
Condition dialog.
6. In the Condition dialog, enter the condition OperatorID.pyOrgUnit = “HR”.

7. Click Submit to return to the Access When record.


8. Select the OperatorID.pyOrgUnit= “HR” condition and click Actions > Insert Condition to open
the Condition dialog to create a second condition.
9. In the Condition dialog, enter the condition OperatorID.pyOrgUnit = “Recruiting”.
10. Click Submit to return to the Access When record.
11. To the left of the OperatorID.pyOrgUnit= “Recruiting” condition, click AND and select OR to
change the condition to return a result of true if the org unit is either HR or Recruiting.

12. Click Save to complete the configuration of the Access When record.

Create the access control policy condition record


Create an access control policy condition to define the conditions under which to avoid masking the
Taxpayer Identification Number field: when the operator is a member of either the HR or Recruiting
org unit, or when the user first creates the case and must enter a Tax Identification Number.

151
©2019 Pegasystems
1. From the Create menu, select Security > Access Control Policy Condition to open the Create
Access Control Policy Condition form.
2. On the Create Access Control Policy Condition form, in the Label field, enter HR or Recruiting.
3. In the Apply to field, enter TGB-HRApps-Data-Candidate to create the policy condition in the same
class as the Tax Identification Number property.
4. Click Create and open to open the Access Control Policy Condition record.
5. In the Conditional Logic section, click Add conditional logic to create a test condition.
6. In the WHEN field, enter IsHROrRecruiting to apply the access when rule you created earlier.
7. In the Policy Conditions section, in the Column source field, enter or select .pxCreateOperator.
8. From the Relationship drop-down list, select Is not null.

9. Click Add condition to create a second policy condition.


10. In the empty policy condition row, in the Column source field, enter or select .pxCreateOperator.
11. From the Relationship drop-down list, select Is null.

12. In the Conditional Logic section, under WHEN, in the Permit access if field, enter A to apply the first
policy condition if the Access When record returns a result of true.

152
©2019 Pegasystems
13. Under OTHERWISE, in the Permit access if field, enter B to apply the second policy condition if the
Access When record returns a result of false.

14. Click the Pages & Classes tab.


15. In the Page name field, enter OperatorID.
16. In the Class field, enter or select Data-Admin-Operator-ID.
17. Click Save to complete the configuration of the access control policy condition.
Note: If multiple operator security attributes need to be evaluated from multiple sources, consider
creating a data type and data page to aggregate these values onto a single page.

Create the access control policy record


Create an access control policy to mask all but the last four digits of the Taxpayer Identification
Number (TIN).
1. From the Create menu, select Security > Access Control Policy to open the Create Access Control
Policy form.
2. On the Create Access Control Policy form, in the Label field, enter Restrict TIN.
3. From the Action drop-down list, select PropertyRead to apply the policy condition when reading a
property value.
4. In the Apply to field, enter TGB-HRApps-Data-Candidate to create the policy in the same class as
the Tax Identification Number property .TIN.
5. Click Create and open to open the Access Control Policy record.

153
©2019 Pegasystems
6. On the Access Control Policy record, in the Permit access if field, enter or select HROrRecruiting to
apply the HR or Recruiting access control policy condition.
7. Click Add Property.
8. In the Property field, enter or select .TIN to apply the policy to the TIN field.
9. From the Restriction Method drop-down list, select Full Mask to apply a mask to all the digits of the
TIN.

10. Click the Gear icon to open the Masking and Formatting Options dialog.
11. In the Masking and Formatting Options dialog, in the Restriction Method field, select Full Mask.
12. Under Restriction Method, in the Masking character field, select * to use asterisks for masking.
13. Under Masking character, select Display length is fixed to set the display length.
14. In the Display characters length field, enter 9 to set the display length to 9 characters.

154
©2019 Pegasystems
15. Click Submit to close the Masking and Formatting Options dialog and return to the access control
policy record.
16. Click Save to complete the configuration of the access control policy.

Update the Collect Candidate Details process to set the value of


.pxCreateOperator for the policy condition
To ensure that the Tax Identification Number field is editable on the Collect Personal Information
form and is masked on all other forms, the policy condition tests the value of the pxCreateOperator
property. Update the Collect Candidate Details process to copy the value of the pxCreateOperator
property from pyWorkPage to the Candidate page so the policy condition record can test the property
value.
1. In Dev Studio, from the Explorer panel, click App to open the App Explorer.
2. In the App Explorer, click Candidate > Process > Flow > CollectCandidateDetails_0 to open the
Collect Candidate Details_0 process.
3. In the Collect Candidate Details process, double-click the connector between the Collect Personal
Details and Collect Professional Details assignments to open the Connector Properties dialog.
4. In the Connector Properties dialog, in the Set Properties section, in the Name field, enter or select
.Candidate.pxCreateOperator to set the value of the pxCreateOperator property on the Candidate
page.
5. In the Value field, enter or select .pxCreateOperator to copy the value of the pxCreateOperator
property on pyWorkPage.
6. Click Submit to return to the Collect Candidate Details process.
7. Click Save to complete the configuration of the process.

155
©2019 Pegasystems
Verify your work
1. Create a new Candidate case. Note the case number.
2. On the Collect Personal Information form, in the Taxpayer Identification Number (TIN) field,
enter 111-22-2222.
Note: In the United States, the Social Security Administration issues the Taxpayer Identification
Number, more commonly referred to as a Social Security Number (SSN). The SSN is a nine-digit
number entered in the form NNN-NN-NNNN.
3. Click Submit to submit the Collect Personal Information form.
4. Advance the case to the Conduct Phone Screen form.
5. Confirm that the Taxpayer Identification Number (TIN) field displays nine asterisks.

6. Log out of Dev Studio.


7. Log in as the user Recruiter.TGB, with the password rules.
8. On the dashboard, under Work queues, click Recruiter workbasket to display the contents of the
Recruiter workbasket.
9. Open the case you just created and advance to the Conduct Phone Screen form. Confirm that the
Taxpayer Identification Number (TIN) field displays the full number, 111-22-2222, without a mask.

156
©2019 Pegasystems
Exercise: Queueing a task for background
processing
Scenario
To reduce errors and complaints with payroll processing, the Human Resources department allows
employees of TGB to enroll in direct deposit. When employees enroll, their paycheck is automatically
deposited into their checking account when the accounting department processes the company
payroll.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Add a step to the case life cycle to queue the creation and sending of an email once the user
completes a Payroll Setup case.

Detailed steps
Create a Run in background step
1. In Dev Studio, configure the Payroll Setup case type to look like the following image.

Configure a standard queue to send an email when processing the


queued item
1. In the contextual properties panel for the Run in Background step, use the information in the
following table to configure a standard queue type to run the UploadToPaymentProcessor
activity.

Field Value

157
©2019 Pegasystems
Type of queue Standard
Activity name UploadToPaymentProcessor
Lock using Primary page
Alternate access group
Audio note upload to payment processor and send confirmation email

Tip: The activity must already exist prior to the configuration of a standard queue processor. This
UploadToPaymentProcessor activity sends an email by using the call method.

Note: By default the queue processor uses the access group of the user who queued the item.
2. Save the queue processor rule.

Verify your work


Verify the email is queued
1. Create a new Payroll Setup case.
2. Complete the Collect employee information form by using a valid email address.

3. Click Submit
4. Advance the case to the Complete enrollment stage.
5. Click Actions > Review selections > Submit to complete the case with a Resolved-Completed status.
6. Click the Audit tab and locate the audit note you entered for the Run in Background step to verify
the standard queue processor ran.

158
©2019 Pegasystems
7. Refresh the case after 1-2 minutes to see the audit note and the email sent by the activity.

8. From Admin Studio, click the Queue processors tile to view the list of queue processors.

9. Verify that there are no broken processes and that the Ready to process column is zero to confirm
the case step processed.

Note: The Processed in the last hour column may reflect the standard queue item you just ran;
however, the field may also reflect other background processes occurring in the system at the same
time.

159
©2019 Pegasystems
Exercise: Reviewing log files
Scenario
You have been asked to examine the log files for errors generated by the HRApps application. To
practice reading the log files, create a test message and add the message to the PEGA log.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Create an activity that uses the Log-Message method to write a message to the PegaRULES log file. Apply
the activity to the Identify_Employee_0 flow action for the EmployeeEvaluation case type as a post-
processing action. Then, view the log file generated by the Pega server to locate your message.

Detailed steps
Create an activity to add a message to the log file
1. In the EmployeeEvaluation class, create an activity record named WriteToLog.
Tip: To create an activity record, in the Application Explorer, right-click the class name and select
Create > Technical > Activity.
2. In the first step of the activity, in the Method field, select Log-Message.
3. Expand the method parameters.
4. In the Message field, enter "Test message".
5. In the LoggingLevel field, enter InfoForced.
Note: By default, the PegaRULES log only records messages with the logging level set to Error.
Setting the level to InfoForced overrides this limitation without changing the logging level setting for
the server.

160
©2019 Pegasystems
6. Save the activity.
Note: Justify the warnings before check-in, as activity is the only rule type to write error message in
the log file.
7. In the Employee Evaluation class, open the IdentifyEmployee_0 flow action.
Tip: Flow action records are located in the Process category in the Application Explorer.
8. Click the Action tab.
9. In the Post-processing section of the Action tab, in the Run activity field, enter or select WriteToLog
to add your activity to the flow action as a post-processing action.
10. Save the flow action to commit your configuration change.
11. Create a new Employee Evaluation case and complete the Identify Employee form to generate an
entry in the PEGA log.

View the log file


1. In Dev Studio, select Configure > System > Operations > Logs to open the System: Operations
landing page.
2. Under Log utilities, click Log files. The log viewer opens in a new browser window, listing the log
files written by your server.

161
©2019 Pegasystems
3. Under File (click to view), click the log file for the PEGA Appender File to open the log within the
window.

Tip: To download a copy of the log file, click text or zip to the right of the log file. When prompted
for a user name and password, enter admin and admin.
4. In the log file, locate the most recent entry. Confirm that the entry matches the logging level and
message from the activity you created earlier in the exercise.

Note: If your log file lists more than one entry, locate the entry with the most recent timestamp.
5. Click Options to view the display options for the log file.
6. Clear the contents of the Filter by field to display all log events.

7. Click Apply to refresh the contents of the log viewer.


8. Above the Options link, click the last page of results and locate your message.
9. Close the window containing the log file.
10. Return to the IdentifyEmployee_0 flow action and remove the activity from the Post-processing
section of the Actions tab.
11. Save the flow action to prevent the application from writing your test message to the PEGA log.
Tip: To reduce clutter in the Pega log and improve performance, remove activity steps that write
InfoForced level messages or convert them to comments when the message is no longer needed.

162
©2019 Pegasystems
Exercise: Debugging an application using
Tracer
Scenario
TGB recently changed their payroll practice from semimonthly to biweekly. The new payroll frequency
increases the number of pay periods from 24 to 26. A developer recently updated the declare
expression to calculate the biweekly salary in the Payroll setup case type.
The expression calculates correctly, but an issue occurs later in the process when the pay period salary
shows a semimonthly value. You have been asked to troubleshoot the issue.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Use the Tracer tool to locate the root cause of the issue and then resolve the issue.
Note: The issue is inactive when you receive your exercise environment. You need to activate it. Before
running a test case, set the .IntroduceError property to true using the data transform pyDefault.

Detailed steps
Activate the error
1. In Dev Studio, from the Application Explorer, navigate to PayrollSetup > Data Model > Data
Transform > pyDefault.
2. On the Definition tab, in the second row, in the Source field, enter true.

163
©2019 Pegasystems
3. Click Save to update the record.

View the issue


1. Create a new Payroll Setup case instance.
2. From the Collect employee information view, in the Salary field, enter 100000.
3. Tab away from the Salary field to activate the declare expression that calculates the amount in the
Bi-weekly salary field.
4. Confirm the amount in the Bi-weekly salary field is $3,846.15.
5. Advance the case to the Provide bank information stage, entering any data in the required fields.
6. From the Actions menu, select Review selections to access the Review Selection assignment and
view the bi-weekly value.
7. Notice the value in the Bi-weekly salary is the former 24 pay periods calculation, $4,166.67.

Gather Tracer results


1. In Dev Studio, from the Developer toolbar, click the Tracer icon to open the Tracer. Leave the Tracer
display window open.

2. Create a new Payroll Setup case, paying attention to the amount of time it takes to see the first
screen.
3. Return to the Tracer display to view the volume of events. Note the final line number (greater than
10,000) after the Tracer completes logging events and the UI displays.
4. From the Tracer toolbar, click Settings to open the settings configuration options.
5. Scroll down to the RULESETS TO TRACE section and clear the rule check boxes under UI-Kit-7 to
limit the Tracer display to rules that are in the application rulesets.

164
©2019 Pegasystems
6. Click OK to save the new settings.
Note: Disabling all the Pega out-of-the-box rulesets is effective in this scenario because the issue
occurs within the application ruleset. There are use cases in which user-provided data causes out-
of-the-box rulesets not to execute. For example, a user might provide a CaseID value to open and
review a resolved case. A Pega out-of-the-box activity might attempt to open the case and generate
an exception.
7. From the Tracer toolbar, click Clear to remove the existing log entries.
8. Create a new Payroll Setup case, paying attention to the amount of time it takes to see the first
screen.
9. Return to the Tracer display to view the volume of events. Note the highest line number (less than
15) after the Tracer completes logging events and the first screen displays.
10. Advance the case to the Provide bank information stage, entering any data in the required fields.
11. From the Actions menu, select the Review selections assignment.

165
©2019 Pegasystems
Examine results and resolve the issue

1. Return to the Tracer window. Notice the .BiweeklySalary property is set using a data transform, as
shown in the following image.

Note: The actual line number in your environment might be slightly different.
2. Click the Name column in the row with the data transform for the SetPayPeriodSalary property to
open the data transform. Observe that it sets the .BiweeklySalary property to a semimonthly cycle.

3. From the Tracer toolbar, click Settings to open the settings configuration options.
4. Scroll down to the EVENT TYPES TO TRACE section, and select Flow to add the flow rule as an event
and point to when the data transform is called.
5. Click OK to save the new setting.
6. From the Tracer toolbar, click Clear to remove the existing log entries.
7. Create a new Payroll Setup case, and advance the case to the Provide bank information stage,
entering any data in the required fields.
8. From the Actions menu, select the Review selections assignment.
9. Return to the Tracer display and look for a flow action data transform event immediately before the
data transform; that indicates that a flow action calls the data transform.
10. Immediately before the data transform sets the .BiweeklySalary property, there is a
ProvideBankInformation_0 flow action rule and a ProvideBankInformation_Flow_0 flow rule. This
suggests that the flow rule triggers the flow action which calls the data transform. On the Name
column for ProvideBankInformation_0, click the flow action rule to open it.

166
©2019 Pegasystems
11. In the displayed flow action rule, select the Action tab to access the Post-processing settings.
12. Scroll down to the Post-processing, Apply data transform field to locate the SetPayPeriodSalary
data transform.

167
©2019 Pegasystems
13. Remove the SetPayPeriodSalary data transform to eliminate setting the biweekly salary with the
incorrect information.
14. Save the updated flow action.

Verify your work


1. Repeat steps 1-5 under the View the issue heading.
2. In the Review selections view, confirm that the value in the Bi-weekly salary is the correct 26 pay
periods calculation, $3,846.15.
Note: The preceding exercise provided specific steps for refining and defining the events for the
Tracer to display. For effective troubleshooting, change the Tracer settings as the situation dictates.
Remember to consider rulesets, events, watches, and breakpoints when modifying Tracer settings.

168
©2019 Pegasystems
Exercise: Analyzing application performance
Scenario
Your manager has asked you to test application performance during the development of your
application. Your manager wants to know what the performance statistics are for the existing
application during a single user session. The statistics include the demands made on processing
resources and the system's response time. You must measure the performance of each user
interaction with the system. The objective is to establish baseline statistics that help you incrementally
identify and address potential performance issues. This approach helps avoid significant rework late in
the development phase.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Use the Performance Analyzer (PAL) to report on the performance statistics for each user interaction.
Important: Performance as measured by PAL tends to decrease as rules are added to an application.
Focus on the magnitude of these changes to identify potential application issues when you compare
the Performance tool results returned from different application states.
First, create a case and advance it through its entire life cycle to ensure the performance of rule
assembly on any new rules you have created. Rules assembly is a technique for improving
performance by generating and compiling the Java code that corresponds to a rule only when needed.
You should exclude these statistics when assessing application performance in a run-time
environment.
Then, start the Performance tool and create another case. After you submit a form, take a reading of
the performance statistics. Repeat this process until you have resolved the case.
Note: Remember that no two systems behave identically. The results of your performance testing will
likely differ from the sample data shown in the exercise.

Detailed steps
1. On the Developer toolbar, click the Performance icon to start the Performance tool. The tool
displays PAL by default.
2. Create an Onboarding case and run the case through to completion to ensure rules assembly is
complete.
3. Create another new Onboarding case.

169
©2019 Pegasystems
4. Go to the Performance tool and, on the header, click Reset to clear any readings and initialize all
counts to zero.
5. On the header, click Add reading to display a DELTA row that contains the incremental values
between adjacent rows of the Performance report.

6. At the beginning of the row, click the DELTA link to show the individual items that are summed in
each column. You can position your pointer over an individual item to display a tool tip that
describes the item.

7. Return to the Collect Employee Info form and click Submit.


8. Return to the Performance tool and click Add reading to create another DELTA row. This row shows
the resources used when the form was submitted to the system.
9. Continue to advance the case and review the results in the Performance tool until you have
completed the case.
As you proceed through your performance analysis, you can save the results to review against later
performance tests. On the Performance tool header, click Save to download the results to an Excel
spreadsheet.
Note: The Performance tool also provides access to DB Trace and the Performance Profiler. For more
information, see the help topic Understanding system resources.

170
©2019 Pegasystems
Exercise: Designating a relevant record
Scenario
The Human Resources (HR) department wants to allow HR business partners to update the start date
for an employee while the onboarding case is open. If the start date changes, both the employee and
the manager receive a confirmation email.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Create a process to allow an HR business partner to update the start date for an employee. Create the
process in Dev Studio so that you have more control over which records are made available to
developers in App Studio. Configure the process with:
1. An assignment shape with the preconfigured flow action AdjustStartDate. The flow action references
a preconfigured section that has a read-only field that displays the current start date and an
editable field where the HR business partner can set a new start date.
2. A step to send an email to the employee. Create an email correspondence that contains the
following text:
As discussed in our telephone conversation, your start date has changed from <<.Employee.StartDate>> to
<<.NewStartDate>>.
3. A data transform to set the value of the employee start date using the value of the new start date,
then delete the new start date from the clipboard.
Add the process to the Relevant Records list to make the process available in App Studio. In App
Studio, add the process as a case-wide optional action for the Onboarding case type.

Detailed steps
Follow these steps to create a process flow from Dev Studio:
1. From Dev Studio, click Create > Process > Flow .
2. In the Create Flow window, in the Label field, enter Update Start Date.
3. Set the context to the Onboarding case.
4. Click Create and open to create the Update Start Date process flow.

171
©2019 Pegasystems
Configure an assignment shape to edit the start date
Follow these steps to configure the assignment shape Update Start Date, in which an HR business
partner can update the start date for an employee:
Note: The flow rule includes an assignment shape labeled Update Start Date by default.
1. Right-click the connector between the assignment shape and the end shape.
2. Click View Properties to open the connector properties.
3. In the Connector section, in the Flow action field, select AdjustStartDate.

4. Click Submit.

Configure a Send Email step to notify the employee of the start date
change
Follow these steps to add and configure a Send Email step to notify the employee of the start date
change:
1. In the flow rule, click the plus then Automations > Send email to add a Send email shape.
2. Double-click the shape to begin configuration.

172
©2019 Pegasystems
3. In the Automation details section, configure the shape to send the email to the Employee
participant.
4. Enter the email subject as Start date change confirmation.
5. From the Message drop-down list, click Correspondence to compose an email correspondence.
6. In the Correspondence template field, enter UpdateStartDate, then click the crosshairs icon to
create a correspondence rule.
7. On the Create Correspondence form, in the Correspondence Type field, enter or select Email, then
click Create and open to create the rule.
8. In the text field, enter the email body as specified in the Your assignment section. Insert properties
for the employee start date and new start date.
9. Click Save to finish composing the email content.
10. Return to the Update Start Date flow rule.
11. Click Submit to complete the Send Email step configuration.

12. Adjust the connectors so that the connector from Update Start Date leads to Send email.

173
©2019 Pegasystems
13. Add a connector from Send email shape to the end shape.

Configure a data transform to set the new start date


Follow these steps to create a data transform to update the Employee Start Date to match the New
Start Date, then remove the New Start Date from the clipboard:
1. Click Create > Data Model > Data Transform to create a new data transform.
2. In the Label field, enter the name of the data transform as Adjust Start Date to New Date.
3. Set the context to the Onboarding case.
4. Click Create and open to create the data transform.
5. In the Definition tab, in the first step of the data transform, set the .Employee.StartDate equal to
.NewStartDate.
6. Add a second step to the data transform to remove .NewStartDate from the clipboard.

7. Click Save to save the data transform.


8. Return to the Update Start Date flow rule.
9. Double-click the connector between the Send email step and the end shape.
10. In the Set properties section, select the Apply data transform radio button.

174
©2019 Pegasystems
11. Select the data transform AdjustStartDateToNewDate.

12. Click the Submit to complete the configuration on the connector.

Designate the process as a relevant record


Follow these steps to designate the Update Start Date process as a relevant record and make the
process available in App Studio:

175
©2019 Pegasystems
1. From the flow rule, click the Actions menu and select Mark as relevant record.

2. Click Save to save the flow rule.

Add the process to the Onboarding case type


Follow these steps to add the Update Start Date to the Onboarding case type as an optional action:
1. Switch to App Studio.
2. In the Onboarding case life cycle, click Optional actions.

176
©2019 Pegasystems
3. Below Case wide actions, click + Action > More > Processes to locate the Update Start Date
process.

4. Click Update Start Date > Select.

177
©2019 Pegasystems
5. Click Save to finish adding the Update Start Date process to the Onboarding case type.

Verify your work


Follow these steps to test the Update Start Date process:
1. Create a new Onboarding case, making a note of the case ID.
2. From the Collect Employee Info view, fill out the required fields, including Start date, and advance
the case.
3. From the Actions menu, click Add Work > Update Start Date.
4. From the Update Start Date view, specify a new date in the New start date field.

5. Click Submit.

178
©2019 Pegasystems
6. In the Onboarding case, open the Start date change confirmation email and verify that the
EmployeeStartDate and NewStartDate properties are properly populated.
7. From the bottom-right corner, click the Gear icon and open the Clipboard tool.
8. In the Clipboard tool, ensure the Thread matches the Onboarding case ID.
9. Navigate to User Pages > pyWorkPage (TGB-HRApps-Work-Onboarding).
10. Verify that the EmployeeStartDate matches the NewStartDate value you previously entered.
11. Verify that the NewStartDate is blank.

179
©2019 Pegasystems
Exercise: Migrating an application
Scenario
Now that development of the HRApps application is complete, you have been asked to migrate the
application to a testing system. The quality assurance (QA testers) require that you provide them with
an application archive of the HRApps application. The QA testers will import the application archive on
the testing system to test the application ahead of application delivery. Your application contains a
ruleset for delegating rules in a production environment, which must be kept unlocked.
The following table provides the credentials you need to complete the exercise.

Role Operator ID Password


Senior System ssa@tgb rules
Architect

Your assignment
l Use the Application Packaging wizard to create a product rule for the current version of the HRApps
application. Include the product rule in an unlocked application ruleset. The product rule includes
all of the associated data types and data instances and the built-on application (not PegaRULES).
The rule also includes all the developer documentation added in the rule History tabs.
l Modify the product rule so that the delegated production ruleset is included in the archive. Then,
verify that contents of the product rule are complete before creating the archive. Finally, use the
product rule to create and save the application archive to your system.

Detailed steps
Create the product rule
1. In Dev Studio, from the Configure menu, select Application > Distribution > Package to open the
Application Packaging wizard.
2. In the 1. Application step, select the highest version of the HRApps application, and then select the
highest unlocked version of the HRApps ruleset.

180
©2019 Pegasystems
3. Click Next to advance to the next step.
4. In the 2. Application stack step, accept the default selections and click Next to include both your
implementation and the built-on application, HRFW.
5. In the 3. Application dependencies step, leave the field blank and click Next.
6. In the 4. Organizational elements step, leave the default selections and click Next.
7. In the 5. Access groups step, leave the default selections and click Next.
8. In the 6. Operators step, leave the default selections and click Next.
9. In the 7. Work queues step, leave the default selections and click Next.
10. In the 8. Work groups step, leave the default selections and click Next.
11. In the 9. Data tables step, leave the default selections and click Next.
12. In the 10. Code archives step, leave the field blank and click Next.
13. In the 11. Database storage step, leave the default selections and click Next.

181
©2019 Pegasystems
14. In the 12. Integration resources step, leave the default selections and click Finish. The wizard
creates a product rule in the ruleset you specified.

Modify the product rule


1. When you click Finish, the following landing page is displayed. Click Modify to open the product
rule.

2. Select the Custom/Production rulesets check box for the HRApps application so that the
delegated ruleset is added to the application archive. Do not modify the other default settings. This
ensures that data associated with the application rulesets, rule history instances, and the
application's data types are added to the archive.

3. At the bottom of the form, select the Allow unlocked ruleset versions? check-box. Selecting this
option ensures that an error does not occur when you attempt to create the archive because the
delegated ruleset must remain unlocked.

4. Save your changes to make the product rule ready for packaging into an application archive.

182
©2019 Pegasystems
Verify your work
1. Click Preview product file to review and verify the rules, data, and other objects that you specified
are packaged in the application archive.

2. In the following example, under the Instances column, you can click the number to verify the data
instances. Your results may vary depending on how you completed the exercises.

183
©2019 Pegasystems
3. Click Submit to close the dialog.
4. On the landing page, click Export to start the archive process to display the Create Product File
dialog.

184
©2019 Pegasystems
5. Enter a name for the application archive.

6. Click OK to start the archive process and display the progress dialog. The number of records may
vary depending on how you completed the exercises.

7. When the process is finished (100%), click the Archive created link to save the .zip file to your
system. The archive is available for import into the QA system.

185
©2019 Pegasystems
Exercise: Deploying a mobile app for Pega
Platform
Scenario
The HR department wants to allow new employees to enroll in a health insurance plan on their first
day of employment. To ensure that new employees can enroll in a plan before obtaining a company-
issued laptop, the HR department plans to purchase a set of Apple iPads. During the orientation
session, a new employee can complete a benefits enrollment case using an iOS app.
Important: To build and deploy an iOS mobile app, you need an iOS mobile device, a certificate set for
developing apps for the device, and HTTPS access to Pega Platform™. Due to the restrictions on
certificate sets, Pega Academy cannot provide students with an iOS certificate. As a result, this
exercise guides you through building an unsigned app.
The following table provides the operator credentials you need to complete the exercise.

Role Operator ID Password


Senior System SSA@TGB rules
Architect

Your assignment
Tip: If your exercise environment is configured to support access through HTTPS, and you have access
to valid certificates and provisioning files, you can build a signed app and download the app to your
device. For more information about generating a certificate set using the Apple Developer Portal, see
the Pega Community article Generating mobile certificates for the iOS platform.
Configure an unsigned iOS mobile app for the HRApps application.
1. Create a certificate set for an unsigned iOS app.
2. Configure a mobile channel interface for the HRApps application to build an iOS app. Configure the
app to:
a. Time out after three minutes
b. Unlock after timing out with a device PIN
c. Display custom branding
3. Build the iOS app using the certificate set you create. Update the app version to 1.0.0.
Note: Access credentials to the build server are available with a license for Pega Mobile Client. For this
exercise, build server access is already configured.

Before you begin


Before you begin this exercise, download the branding-assets-7-40.zip file from the Related Content
section of this page. If the link is unavailable, download the file from
http://pegasystems2.http.internapcdn.net/pegasystems2/exercise_guides/L-9056-branding-assets.zip.

186
©2019 Pegasystems
Note: For information about how to customize branding assets for your application, refer to the help
topic Preparing custom branding assets.

Detailed steps
Configure an iOS certificate set
1. Log in to Pega Platform in the System Architect role as SSA@TGB using password rules.
2. Switch to App Studio.
3. In the Explorer panel, click Settings.
4. Click Mobile certificates to open the certificate set manager.

5. To the right of the certificate set manager, click Add certificate set to add a new certificate set.

187
©2019 Pegasystems
6. Below Adding new certificate set, click iOS to select the iOS platform.
Note: The selected platform has white text.

7. Expand Advanced to view the advanced configuration section.


8. Select the Enable a simplified a simplified certificate set (unsigned application) check box to
generate an unsigned app.
Note: iOS devices require a signed certificate for app access and installation. Pega Platform
generates a zip file that contains the app, which the developer downloads and signs locally.
9. In the App ID (Bundle ID) field, enter com.pega.hrapp.
10. Optionally, select an existing or upload a new push notification certificate.
11. In the upper-right corner, click Save to save the unsigned application certificate set.
12. In the upper-left corner, click the back arrow to return to the certificate set manager to confirm the
certificate set is on the list.

188
©2019 Pegasystems
Configure the mobile channel interface
1. From the Explorer panel, select Interfaces to view the Channels & Interfaces landing page.
2. Below Create new channel interface, click Mobile to configure a new mobile app.
3. On the Configuration tab, in the Mobile app name field, enter HRApp.
4. Under Mobile app type, select Pega Mobile Client.
5. Expand Security to configure the app security options.
a. Click the Enable additional app protection check box.
b. Click Enable device lock to allow the user to reestablish their session using their device unlock
credentials.
c. Select Enable interaction timeout so that the app times out after a determined period of
inactivity.

189
©2019 Pegasystems
d. In the minutes field, enter 3 so the app times out after three minutes of inactivity.

6. Click the Layout tab to configure the app appearance.


7. In the App branding section, below Custom, click the Plusicon to upload a custom theme.

190
©2019 Pegasystems
8. Click Upload zip file to upload the branding package you downloaded at the beginning of the
exercise. After the upload completes, an image replaces the Plus icon.

191
©2019 Pegasystems
9. In the Build your application section, under Select platforms, select the switch to the left of iOS to
display the Certificate Set drop-down and the Build Now button.

10. From the Certificate Set drop-down, select the certificate set you uploaded earlier.
11. Expand the Advanced section to display the Version field.
a. Clear the Auto-increment version with each build check box to modify the app version
number.
b. Change the version number to 1.0.0.
12. Click Save to commit your changes.

Verify your work


1. To the right of the iOS switch, click Build Now to open communication with the build server and
begin the app build.

The following image and process bar are displayed while the build server builds your app.

192
©2019 Pegasystems
2. When the build is complete, an active Download link is displayed.

193
©2019 Pegasystems
194
©2019 Pegasystems

Вам также может понравиться