Upload
manmohan-jangid
View
253
Download
0
Embed Size (px)
Citation preview
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
1/87
Pega 7 Fundamentals
Exercise GuidePRPC v.7.1
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
2/87
Copyright 2014
Pegasystems Inc., Cambridge, MA
All rights reserved.
This document describes products and services of Pegasystems Inc. It may contain trade secrets and proprietary information.
The document and product are protected by copyright and distributed under licenses restricting their use, copying,
distribution, or transmittal in any form without prior written authorization of Pegasystems Inc.
This document is current as of the date of publication only. Changes in the document may be made from time to time at the
discretion of Pegasystems. This document remains the property of Pegasystems and must be returned to it upon request.
This document does not imply any commitment to offer or deliver the products or services provided.
This document may include references to Pegasystems product features that have not been licensed by your company. If you
have questions about whether a particular capability is included in your installation, please consult your Pegasystems service
consultant.
PegaRULES, Process Commander, SmartBPM
and the Pegasystems logo are trademarks or registered trademarks of
Pegasystems Inc. All other product names, logos and symbols may be registered trademarks of their respective owners.
Although Pegasystems Inc. strives for accuracy in its publications, any publication may contain inaccuracies or typographical
errors. This document or Help System could contain technical inaccuracies or typographical errors. Changes are periodically
added to the information herein. Pegasystems Inc. may make improvements and/or changes in the information described
herein at any time.
This document is the property of:
Pegasystems Inc.
1 Rogers Street
Cambridge, MA 02142
Phone: (617) 374-9600
Fax: (617) 374-9620
www.pega.com
DocumentName:P7F_71ML6_ExerciseGuide_20140929
Date: 20140929
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
3/87
Table of Contents
Pegasystems Overview............................................................................... 1
Use the Case Manager to Process a Case........................................................................ 2
Using the Pega Designer Studio................................................................. 6Get Familiar with Designer Studio.................................................................................... 7
Use the Application Wizard Application Express......................................................... 10
Define Stages for Expense Voucher Case Type............................................................... 15
Define Steps......................................................................................................................... 18
Edit Process Flow................................................................................................................. 24
Working with Data....................................................................................... 38
Create Data Object Type and Property Record.............................................................. 39
Create User Interface.......................................................................................................... 47
Wrap-Up........................................................................................................ 57
Add Repeating Grid Lines................................................................................................... 58
Create Decision Tree Rule.................................................................................................. 70
Send Notification Email...................................................................................................... 73
Create Declare Expression................................................................................................. 78
Display Expenses................................................................................................................. 81
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
4/87
Module 02: Pegasystems Overview
This lesson group includes the following lessons:
Why Pega? (no exercise)
Operators, Portals and Cases
Project Management (no exercise)
2014 Pegasystems Inc. 1
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
5/87
Exercise: Use the Case Manager to Process a Case
Scenario
The Case Manager portal can be used by Pega 7 work users who will manage cases that flow
through a Pega 7 application. The HR Services application gives users an opportunity to view the
default Pega 7 Case Manager portal. This sample does not contain all of the complex features
available from Pega 7. Its purpose is to demonstrate a sample case type that can be created by the
application design wizard and Pega Designer Studio. In this exercise, you will log in as an HR
Recruiter who is processing a candidate for an open job position.
Role: HR Recruiter
User Name: HR_Recruiter
Password: password
Approach
Log onto the Pega 7 system and become familiar with the Case Manager portal for an HR Recruiter.
From the HR Recruiters Case Manager portal, try the following:
Create a Candidate case.
Note the different types of field validation options available from Pega
Hints
1. The Case Managerin the header indicates youre using a Case Manager portal (and not
Designer Studio).
2. Createis used to create a new instance of a case type.
3. The Next Assignmentallows a case manager to work on the next available assignment.
4. An asterisk (*) indicates a required field.
5. The calendar icon indicates a date field.
ProcedureFollow the steps below:
1. Log into the Pega 7 environment with the Username and Password listed in the Scenario.
2014 Pegasystems Inc. 2
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
6/87
2. Select Create Candidate Casefrom the Create menu.
2014 Pegasystems Inc. 3
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
7/87
3. In the initial screen, note the:
a. Case number that is displayed to the right of the case type (in this example, its C-3).
b. Orange asterisk that indicates a required field.
Enter information into each screen and then click theSubmit
button.
2014 Pegasystems Inc. 4
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
8/87
4. In the Collect Professional Info screen:
a. Note that at least one entry is required.
b. Use the Add Itemicon to add additional entries
Enter job information for the Candidate and then click theSubmit
button.
2014 Pegasystems Inc. 5
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
9/87
Module 03: Using the Pega Designer Studio
This lesson group includes the following lessons:
Tour of the Designer Studio
Creating a New Pega 7 Application
Adding Stages to the Case Type
Adding Steps to Case Stages
Configuring Process Flow
2014 Pegasystems Inc. 6
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
10/87
Exercise: Get Familiar with Designer Studio
Scenario
The Designer Studio portal can be used by Pega 7 System Architects and Developers who will be
creating case types and process flows.
Role:System Architect
User Name: SAE1Architect
Password: password
Approach
Log onto the Pega 7 system and become familiar with the Designer Studio portal.
From the Designer Studio portal, try the following:
Use the Case Explorer to open a case type.
Use the Application Explorer to view UI sections
Hints
1. Icons help you to navigate through Pega 7 create case forms
2. Designer Studioin the header indicates youre using the Designer Studio portal.
3. + Createis used to create a new instance of a case type.
4. Tabs at the top of the work area indicate the open items that are currently available.
Procedure
Part 1 Use the Cases explorer menu.
5. Log into the Pega 7 environment with the Username and Password listed in the Scenario.
2014 Pegasystems Inc. 7
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
11/87
6. If the explorer panel is not visible on the left of the screen, make the window wider, or click
the menu icon to the left of the Pega 7 icon.
7. Select Casesfrom the list of explorer menus on the left of the screen and then select the
Candidatecase type.
8. Familiarize yourself with the Case Designer landing page. Try the following:
Click Runto create an instance of the case type
Select Legendfrom the Actionsmenu to view the stage and process legend.
Part 2 Use the Application explorer menu.
Sections are used to define User Interface (UI) layouts. View some of the sections used in the
Candidates case type by finding them in the Application Explorer menu.
1. Select Appfrom the list of explorer menus on the left of the screen and then expand
Candidate User Interface Sectionto see the list of UI sections for this case type. Click
CollectPersonalInfoto view the UI section that is used to collect personal information for
the job candidate.
2014 Pegasystems Inc. 8
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
12/87
The UI section will open in the work area.
2014 Pegasystems Inc. 9
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
13/87
Exercise: Use the Application Wizard Application Express
Scenario
Employees submit expense vouchers for any number of expense types. Our Business Analyst has
determined that this process should be automated.
The Lead System Analyst (LSA) usually performs some evaluation and then begins creating the
foundation that will be built upon for the enterprise solution. To set up this foundation for the next
several lab exercises, run the Application Creation Wizard (App Express) using information provided
in the Approach section below.
For this exercise, you will be performing the role of System Architect / Developer.
User Name: Developer01
Password: password
Approach
Log onto the Pega 7 system and create an application to process Employee Reimbursements. In this
exercise, you will be using the Application Creation Wizard (App Express).
From the DesignerStudio portal, select New Applicationto start the Application Creation Wizard.
Use the following information to describe the application.
Application: Employee Reimbursements
Application Short Name: EmpReimb
Description:This application will be used to process employee
reimbursements for all types of expenses.
Build on Application: PegaRULES
Application and Structure: Implementation Only
Organization: MainCo
Organization short name: MainCo
Business objectives: Keep track of employee expenses and reimbursements
Case types:ExpenseVoucher
TravelVoucher
Data objects: (none)
Hints
1. You can return to any step to change values before clicking Createto create the application.
2. Data objects can be added now, or while editing the case type.
2014 Pegasystems Inc. 10
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
14/87
Procedure
Create a new application using App Express.
1. Log into the Pega 7 environment with the Username and Password listed in the Scenario.
2. Select New Applicationfrom the Application menu.
3. After reading the information about creating a new application, click the Create New
Applicationicon.
4. Fill in application settings using values specified in the Scenario for this exercise.
Note: It is recommended that you edit short names for ease of use and to
synchronize your results with the sample solutions in this Exercise Guide.
2014 Pegasystems Inc. 11
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
15/87
Select Implementation onlystructure, ensure short names match those shown in the
screen capture below and then click Next.
IMPORTANT: Ensure that your organization short name matches the
screen above (MainCo) so that the operator IDs generated by the
application creation wizard will match the Exercise Guide.
5. In Step 2, fill in the applications business objectives and then click Next.
2014 Pegasystems Inc. 12
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
16/87
6. In Step 3, name the first case type: ExpenseVoucherand the second case type
TravelVoucherand then click Next.
Note that we will not be creating the TravelVoucher case type, but this gives you an
opportunity to see how simple it is to add multiple case types while defining the application.
7. In Step 4, dont add any data objects at this time. They will be added later. Before creating
the case, you can click any of the previous steps to modify them, or Preview the application
definition. When all of the values have been correctly entered, click Create.
2014 Pegasystems Inc. 13
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
17/87
As part of the creation process, the system generates the following operators for your
organization. Note that the organization will match the organization name you entered in
Step 1 of the Application Creation Wizard.
Admin@MainCo
Manager@MainCo
User@MainCo
Each operator is assigned the default password: rules.
8. Log off and log back in using the administrator account created with the new application. To
view the Application Overview at any time, select Open Overviewfrom the Application
menu.
IMPORTANT NOTES:
The default application for this operator ID becomes the application that was just created.
Select Switch Applicationfrom the Application menu to switch back to the Candidate demo.
The new operator IDs created by App Express will match the organization that you enteredin the first screen. If you did not name your organization MainCo, your new operator IDs
may not match those found in the Exercise Guide.
2014 Pegasystems Inc. 14
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
18/87
Exercise: Define Stages for Expense Voucher Case Type
ScenarioEmployee expenses are reimbursed in three, simple stages:
An employee submits an expense voucher
Manager evaluates expenses Required approval depends upon total expense amount
Accounting reimburses expenses
This can be displayed visually, as follows.
A foundation for expense tracking has been created in App Express. An initial Expense Voucher case
type was listed while the application creation wizard was run. In this exercise, you will rename the
stages from default names to those listed above.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard.
User Name: Admin@MainCo
Password: rules
Approach
Log onto the Pega 7 system and name the stages for the Employee Reimbursements application.
From the DesignerStudio portal, select Casesfrom the explorer menus and then click the
ExpenseVoucher case.
Name the stages in the ExpenseVoucher case using the information found in the Scenario.
Hints
1. The following should be considered when defining stages:
Which steps in the workflow belong together?
Is there a group of steps that are performed by the same organization?
2. The following considerations should be given to a stage before configuration:
Does stage entry require the completion of another stage, or validation of some state?
SubmitEx enses
ReviewEx enses
Reimburse
Ex enses
2014 Pegasystems Inc. 15
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
19/87
Can the stage be skipped in some instances?
Is transition to the next stage automatic, or does it require manual transition?
Procedure
Part 1 Name the case type stages.
1. Log into the Pega 7 environment with the Username and Password listed in the Scenario.
2. Select Casesfrom the list of explorer menus and then select the ExpenseVouchercase.
3. Name the stages to match those in the scenario flow. Begin by selecting Configure stage
behaviorsfrom the Stage 1 pull-down menu.
2014 Pegasystems Inc. 16
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
20/87
4. Rename this stage from the default Stage 1 to Submit Expensesand then click OK.
5. Name the next two stages so that they match the scenario stage names.
6. Click Saveto save changes to the case type.
Part 2 Test the case flow.
7. Each time you make changes to your case type, you should run a sample case to check that it
follows your intended flow. Do this in either of the following ways:
Click the Runbutton.
Select Expense Voucher Case from the Create a Case menu.
8. Click Submitat each step. As you run through the case, notice that none of the flow actions
(assignment steps that interact with the operator) exist.
2014 Pegasystems Inc. 17
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
21/87
Exercise: Define Steps
Scenario
The process for employees to have expenses reimbursed is shown in the following illustration.
In previous exercises, we created the application foundation using App Express and added stage
names. In this exercise, we will add steps to each stage.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard (App Express).
User Name: Admin@MainCo
Password: rules
Approach
Log onto the Pega 7 system and add steps to the stages, using information in the scenario. After
adding all step names, Configure step behaviorsfor the Determine Approval step and make it a
Multi Step Process.
Run the case type to test process flow.
Hints
When adding steps to a case, note some of the following:
1. Add step names first.
2. Use the Configure Step Behaviors menu option to indicate step type, and when step begins.
SubmitEx enses
Complete Expenses
Deliver Expenses
ReviewEx enses
Verify Receipt
Determine Approval
ReimburseEx enses
Issue reimbursement
Resolve
2014 Pegasystems Inc. 18
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
22/87
Procedure
Part 1 Add steps to each stage.
1. Select ExpenseVoucherfrom the Cases explorer. In the Case Designer landing page for
case type ExpenseVoucher, click Default Stepunder the Submit Expenses stage. In the
resulting text field, enter Complete Expenses.
2. Click +Add stepunder Complete Expenses and type Deliver Expenses.
3. Add step names to the remaining stages using information in the Scenario.
Reminder: ItsagoodhabittoclickSaveoften,tosavechangestothecasetype.
2014 Pegasystems Inc. 19
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
23/87
Part 2 Configure step type
4. The Determine Approval step will require a decision, which means it should be a multi-step
process. Hover your mouse to the right of the Determine Approval step, open the pull-down
menu and select Configure step behaviors.
5. Select Multi Step Processfrom the Step type menu and then click OK.
6. Click Saveto save changes to the case type.
2014 Pegasystems Inc. 20
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
24/87
Part 3 Test flow
7. Click Runto create an instance of the ExpenseVoucher case and test the flow.
8. If you see an option to add a form at this time, click No thanks, maybe later. As you run
through the case, notice that none of the flow actions exist.
Oncetheprocedureforastephasbeendefined,youcantestthecasebyclickingSubmitateachstep.
2014 Pegasystems Inc. 21
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
25/87
Part 4 Add a form
In this section, we will create a form to contain employee name and total expenses.
9. Create a new instance of the case type either by clicking Runor by selecting Expense
Voucher Casefrom the Case menu.When the No form has been added message appears for the Complete Expenses step in
the Submit Expenses stage, click Yes, Ill add a form now.
10.
On the next screen, click the Create a new formicon.
2014 Pegasystems Inc. 22
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
26/87
11.Add two fields, such as Employee Nameor Expense Purpose (text, required) and Total
Expense(currency, required) and then click Save.
Note: This initial form is used to demonstrate the Form Builder. As
you become familiar with additional features, the form can be
modified to provide more detailed information.
12.
Close the case after you have tested case flow.
2014 Pegasystems Inc. 23
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
27/87
Exercise: Edit Process Flow
Scenario
The process for employees to have expenses reimbursed is shown in the following illustration.
The Business Analyst has determined that a maximum voucher total should be set, and expenses
that exceed that amount will need additional approval. Once an expense voucher case has been
created, and expenses are totaled, the application will determine if the voucher requires approval.
This is done using a Decision Tree.
In previous exercises, we created the application foundation using App Express, added stage names
and then added steps for each stage. In this exercise well begin to define process flow.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard (App Express).
User Name: Admin@MainCo
Password: rules
ApproachFrom the DesignerStudio portal, select the Cases explorer menu and then select the Expense
Voucher case.
Configure process detail for the Determine Approval stage and add a Decision Tree to determine if
the expense voucher requires approval. Note that there is 75% likelihood that the expense voucher
will not need approval, and 25% likelihood that it will need approval.
SubmitEx enses
Complete Expenses
Deliver Expenses
ReviewEx enses
Verify Receipt
Determine A roval
ReimburseEx enses
Issue reimbursement
Resolve
2014 Pegasystems Inc. 24
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
28/87
If the expense voucher needs approval, flow should be directed to the Get Approval assignment and
work should be routed to a manager to approve or reject the expense.
Hints
1. When editing the flow of a step, note some of the following.
For an Assignment step, you will see a step property configuration form.
For a multi-step processes, you will see a process flow diagram.
2. Working with connectors:
To create a new connector, left-click on the first shape and drag to the second shape.
Green highlight indicates a connection has been made to a shape.
Select and move shapes around to see if the connector follows the shape. If it does
not, you may need to reattach the connector.
3. Remember to click Save frequently to save changes to the case type.
Procedure
Part 1 Follow the steps below to add a decision shape to the Determine Approval flow. This will be
used to determine if the voucher is over a specific limit, and requires approval.
1. In the Case Designer landing screen for the Expense Voucher case type, hover over the
Review Expenses stage and then click the Configure process detaillink below the last step.
2014 Pegasystems Inc. 25
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
29/87
2. In the Process Modeler flow diagram for Determine Approval, right-click the first green
assignment shape and select Deleteto remove it from the flow.
3. Open the Flow Shapes menu and select a Decisionshape. Move the decision shape to the
open space.
4. Select connector ends and adjust them until they attach to the new decision shape.
Note: Once connectors have been attached, select and move the
decision shape around to ensure connectors move with it. If not, try
attaching connectors again.
2014 Pegasystems Inc. 26
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
30/87
5. Right-click the decision shape and select View Propertiesto open the properties dialog.
6. Call the decision Needs Approval. Select Decision Treefrom the decision type pull-down
menu, name the rule NeedsApproval, add an audit note and then click OK.
7. Add a new end shape under the decision shape.
2014 Pegasystems Inc. 27
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
31/87
8. Add a connector from the Decision shape to the new End shape, right-click the connector
and select View propertiesfrom the pull-down menu.
9. Call the connector No. Select Resultfrom the condition type pull-down menu, name the
result No, set likelihood to 75, add an audit note and then click OK.
10.Right-click the connector from the Decision shape to the green Assignment shape and select
View propertiesfrom the pull-down menu.
2014 Pegasystems Inc. 28
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
32/87
11.Call the connector Yes. Select Resultfrom the condition type pull-down menu, name the
result Yes, set likelihood to 25, add an audit note and then click OK.
Part 2 Follow the steps below to add the necessary flow shapes that will allow you to use the Pega
built-in Approve and Reject flow actions. To require manager approval, the assignment will be
routed to a manager
1. Right-click the Step2assignment shape and select View Propertiesfrom the pull-down
menu.
2.
If the total expense amount is over the limit, we want the approval to be performed by amanager. To do this, set the following properties:
Assignment Name: Get Approval
Route to: Operator
Operator: Manager@MainCo
2014 Pegasystems Inc. 29
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
33/87
ClickOK.
Note: Remember to click Save frequently, to save all changes.
3. Right-click the connector between the Get approval assignment shape and the end shape,
and select View Propertiesfrom the pull-down menu.
2014 Pegasystems Inc. 30
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
34/87
4. Call the connector Approve Voucher. Select Approvefrom the More...choices in the auto-
complete list of flow actions, set likelihood to 75, add an audit note and then click OK.
5. Click Saveto save changes to the ExpenseVoucher case type.
2014 Pegasystems Inc. 31
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
35/87
Part 3 Follow the steps below to create an alternate stage that control can be routed to if the
voucher is rejected.
1. After saving all changes, click Back to stagesto return to the case stages. From the Actions
menu, select Configure Alternate Stages.
2. Name the alternate stage Reject Expense. Rename the default step to Send Rejection
Email.
3.
Save your changes and then open the Step Configuration dialog for Send Rejection Email.
2014 Pegasystems Inc. 32
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
36/87
4. Make the Send Rejection Email step a multi-step process.
5. Configure process detail for the Reject Expense stage.
6. Remove the two green assignment shapes and their associated connectors by right-clicking
and selecting Deletefrom the pop-up menu. Then, add a Send Email smart shape to the
flow diagram.
2014 Pegasystems Inc. 33
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
37/87
7. Open the Send Email smart shape and set properties to send to a Party. Set parties to be
the Ownerof this case by selecting from the list. Enter a subject line and message text and
then click OK.
8. Ensure there is a connector from the Start shape to the Send Email Smart shape, and
another from the Send Email Smart Shape to the End shape.
9. Right-click the End shape, select View Propertiesand then select Resolved-Rejectedfrom
the list of available Work status.
10.After completing changes to the Reject Expense stage, Saveall changes and return Back to
Stages.
2014 Pegasystems Inc. 34
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
38/87
Part4Followthestepsbelowtoroutecontroltothealternatestageifexpensesarerejected.
1. Select Configure Process Detailfor the Review Expenses stage.
2. Return to the Determine Approval step flow diagram.
3. Add a Change Stagesmart shape below the Get Approval assignment shape.
4. Add a connector from the Get Approval assignment shape to the Change Stage smart shape.
2014 Pegasystems Inc. 35
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
39/87
5. Right-click the Change Stage shape and select View Properties. Set the Change Stage utility
properties to Select a stage, and then select the Reject Expensestage. Add an audit note
and then click OK.
6. Right-click the connector between the Get Approval assignment and the Change Stage shape
and select View Properties.
7. Call the connector Reject Voucher. Select Rejectfrom the More...choices in the auto-
complete list. Set likelihood to 25, add an audit note and then click OK.
2014 Pegasystems Inc. 36
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
40/87
8. Click the % Likelihood iconto see the likelihood that different branches will be taken.
9. Save changes to the case type and then return Back to Stages.
10.Click Runto test a sample case. If there is no form for a step, indicate that it will be created
later by clicking No thanks, maybe later.
11. If information required for a decision shape is incomplete, manually select a connector to
take. If a portion of the step is ready to run, but it is not complete, click Submitto continue
to the next step.
If you get errors about missing branches, see hints about ensuring that all connectors are attached
correctly.
2014 Pegasystems Inc. 37
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
41/87
Module 04: Working with Data
This lesson group includes the following lessons:
Creating Data Object Types
Creating the User Interface
2014 Pegasystems Inc. 38
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
42/87
Exercise: Create Data Object Type and Property Record
Scenario
The process for employees to have expenses reimbursed is shown in the following illustration.
The following contact information is required to be entered on each voucher submitted for
reimbursement.
This contact information is collected for many applications. So, it has been determined that a newdata object type should be created that includes the employee contact information fields.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard (App Express).
User Name: Admin@MainCo
Password: rules
Approach
This exercise provides an opportunity to see how you can create your own data object type that can
be used by any case type in the application. The data value properties in this data object type canalso be used to simplify creation of UI for collecting employee contact information.
From the Data explorer, create a data object type named ContactInfo that includes contact
information for an employee, as shown in the Scenario.
Use this data object type to define a data model property (named Employee Contact Information,
with a short name of EmpContInfo) that can be used from any case type within the application.
2014 Pegasystems Inc. 39
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
43/87
Hints
Whencreatinganewdataobjecttype,notesomeofthefollowing:
Data Object Type is created in Data.
Property Record that is modeled on new Data Object Type is created in Work.
Procedure
Part 1 - Follow the steps below to add a data object that can be used from anywhere in the
application.
1. Click the Data explorer icon to open the data explorer, open the Manage Data Objects menu
and select Add/remove data object typesto add a new data class.
2. In the Data Object Types screen, click Create Newto create a new data class.
3. In the Display Name field, enter ContactInfoand then expand ID, INTERITANCE AND
RULESET SETTINGS.
2014 Pegasystems Inc. 40
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
44/87
4. The new class youre defining can inherit properties from one or two parents. The details of
inheritance are beyond this level of training, but will be summarized to help you correctly fill
out the Data Object Type rule form.
Directed parent class inheritance allows you to specify an immediate parent. For this
exercise, use Data-Party. Begin typing Data-Party and then use the down-arrow () to find it
in the list. When Data-Party is highlighted, select it by pressing the Enterkey.
5. Pattern parent class inheritance searches through all classes linked in the hierarchy of the
pattern specified. To keep within our application, use the down-arrow () to search for the
organization that owns this application (MainCo) concatenated with the application name(EmpReimb) concatenated with the word Data.
2014 Pegasystems Inc. 41
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
45/87
6. Click OK.
7. Add the properties listed below to the Contact Information data object type (class). Note
that all property types will remain as the default Text. Click Nextto continue.
8. View property details and then click Next.
2014 Pegasystems Inc. 42
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
46/87
9. Confirm property creation by clicking Submit.
10.After clicking Submit, a data object type (class) has been defined in the Data class. To view
the data object type, click the App explorer icon , begin to type MainCo-EmpReimb-Dinto
the auto complete form at the top of the application explorer and then use the down arrow
to select MainCo-EmpReimb-Data. Expand ContactInfo> Data Model> Property. You
may need to refresh the Application Explorer to see the new data object type.
Next, allocate a data page to store information of this object type.
2014 Pegasystems Inc. 43
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
47/87
Part 2 Follow the steps below to create a page property to hold contact information values.
1. Click the App explorer icon and then select MainCo-EmpReimb-Work as the context (begin
typing MainCo-EmpReimb and then use the down-arrow to select from auto-complete
choices). When the MainCo-EmpReimb-Work tree appears, right-click MainCo-EmpReimb-
Workand select Create Data Model Propertyfrom the menu.
2. Name the property record Employee Contact Information.
Note: For clarity and ease of use, give the property record the short name
EmpContInfo.
Ensure the Record Context is MainCo-EmpReimb-Work. Click Create and open.
2014 Pegasystems Inc. 44
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
48/87
3. Change the property from the default type Text to Single Page(since it will contain more
than a single value).
4. Specify that the values in this page will be defined by the ContactInfo data type that was
defined earlier in this exercise. Do this by starting to type MainCo-EmpReimb-Data-
ContactInfo, and then using the down-arrow () to select from the list that pops up andclicking Enter.
Note: If the ContactInfo data type appears in the Application Explorer data
class, but is not on the list, type it manually.
Click Save.
2014 Pegasystems Inc. 45
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
49/87
5. To view your results, go to the Application Explorer. Ensure you are viewing the Work class
and select Refreshfrom the Application Explorer menu. Then, expand Data Model
Property.
The resulting data model can now be used in any case within the Employee Reimbursements
application.
2014 Pegasystems Inc. 46
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
50/87
Exercise: Create User Interface
Scenario
Employees submit expense vouchers for any number of expense types. The voucher looks as
follows:
An Employee Contact Information (EmpContInfo) property record has been created for this case
type. Utilize it to create a UI for the first part of this form.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard (App Express).
User Name: Admin@MainCo
Password: rules
Approach
In this exercise, you will:
Name the Flow Action for the Complete Expenses step to CompleteExpenses.
Use the Add Fields link below the CompleteExpenses flow action name to open the Edit
Fields screen.
Add a page mode Employee Information field described by the ContactInfo data object type.
Save the Edit Fields updates and then Run the case type to create an instance of
ExpenseVoucher.
Use the UI Inspector to change the layout format to Inline grid double.
2014 Pegasystems Inc. 47
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
51/87
Save changes to the case type and then Run the process to create an instance of
ExpenseVoucher to you can view the new User Interface.
Hints
When creating a new case, note some of the following.1. You can return to any step to change values before clicking Createto create the application.
2. Data objects can be created now, or while editing the case type.
Procedure
Part1BegincreatingtheExpenseVouchercasetypesuserinterface.
3. Open the Expense Voucher case in the Case Designer and then click Configure Process
detailto open the process outline for the Submit Expenses stage.
4. Select the Complete Expensesstep. If you previously visited this step using the form
builder, you will see an Open section link below the action name and may already have fields
in the Form Configuration dialog. Click Configure formto configure fields for this form,
using the data object that was created.
2014 Pegasystems Inc. 48
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
52/87
5. If you already added fields to this step, they will appear in the on the Form Configuration
dialog. Add the Employee Contact Information (EmpContInfo) property that was created
using the data object type ContactInfo. If a match is found, the property will be set to Object
and the Data Type will be set to ContactInfo. If an Employee Name field was added
previously, click the Xto the right to delete this field. Add an Expense Purpose text field.
The fields for employee contact information should appear, automatically, after youve
entered Employee Contact Info. Ensure that your Form Configuration dialog matches the
screen below before clicking Save.
6. Savechanges to the case type and then Runthe process to test flow in an Expenses Voucher
case.
2014 Pegasystems Inc. 49
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
53/87
Part2EdittheSection
7.
Return to the process view and click Open Section(under the Action name) to open the UIsection that was created by the form builder.
2014 Pegasystems Inc. 50
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
54/87
8. Click in the dynamic layout action area that contains the employee contact information and
then click the View Properties icon.
9. Change the layout format to Inline grid doubleand then click OKto save this change.
2014 Pegasystems Inc. 51
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
55/87
10.Notice that the layout properties change to display a two-column grid format. Click Saveto
save changes to the case type. Then, select the First Name field and drag it to the left
position in the top row. Select the Last Name field and drag it to the right in the top row.
2014 Pegasystems Inc. 52
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
56/87
11.Adjust any other Employee Contact Information fields to display in your preferred location
within the layout. Then, click the anchor of the Employee Contact Information section and
drag it to the top of the layout (above expense purpose and total expense).
12.Save changes to the layout and then Closethe rule form.
2014 Pegasystems Inc. 53
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
57/87
Part
3
Change
a
cell
display
format
using
the
UI
Inspector
13.Create an Expense Voucher case and stop at the first screen.
14.Click the UI Inspectoricon n the Developer Toolbar to toggle the UI Inspector on. Move
the cursor until the Total Expense cell is in the red UI wireframe.
15.When the information dialog opens, click the section name.
Note: This provides an alternate way to access sections and properties
while running a case instance. You can also open the section from the
process view and then open the property within the section.
2014 Pegasystems Inc. 54
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
58/87
16.View properties for the Total Expense cell.
17.Change the property control to Currency.
18.Using the Presentation tab, you can optionally change the alignment to left-aligned. Save
changes and then create a new Expense Voucher case to see changes to the Total Expense
cell.
2014 Pegasystems Inc. 55
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
59/87
2014 Pegasystems Inc. 56
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
60/87
Module 05: Wrap-Up
This lesson group includes the following lessons:
Additional Features and Resources
2014 Pegasystems Inc. 57
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
61/87
Exercise (Optional): Add Repeating Grid Line Items
Scenario
Employees submit expense vouchers for any number of expense types. The voucher looks as
follows:
The expense voucher case contains an expense type and amount. Line item details need to be
added to the form that will be used to track expenses.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard (App Express).
User Name: Admin@MainCo
Password: rules
Approach
In this exercise, you will:
Create a Line Item data object type in the -Data Class.
Create a page list property record in the -Work class
Add new Line Item page list fields to the Flow Action section.
Save the updates and then run the process to create an ExpenseVoucher case to view the
updated section.
2014 Pegasystems Inc. 58
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
62/87
Hints
When creating a new case, note some of the following.
1. You can return to any step to change values before clicking Createto create the application.
2.
Data objects can be created now, or while editing the case type.
Procedure
This exercise is optional. It walks through the steps of creating a data object type for a line item, and
then creating a page list of line items. Finally, the line items will be added to the User Interface.
Part 1 Create a Line Item Data Object Type in Data.
1. Select Add/remove data object typesfrom the Data Explorer menu.
2. Click +Create Newin the Data Object Types dialog.
2014 Pegasystems Inc. 59
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
63/87
3. Set Display Name to Line Item Detailand then expand ID, INHERITANCE AND RULESET
SETTINGS. Set Parent Class (Directed) to Data-and Parent Class (Pattern) to MainCo-
EmpReimb-Data.
4. Create fields for the line item as shown below. Ensure all Modes and Types are correct
before clicking Next.
Transaction Date - Type: Date
Item Description - Type: Text
Line Cost - Type: Decimal
5. When the Define Display dialog opens, change the format for Line Cost to pxCurrencyand
then click Next.
2014 Pegasystems Inc. 60
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
64/87
6. Confirm properties by clicking Submit.
7. View the data object type in the EmpReimb-Data class after refreshing the Application
Explorer.
2014 Pegasystems Inc. 61
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
65/87
Part 2 Create a Property Record in Work.
1. Open the Data Explorer and select CreateData ModelPropertyfrom the menu.
2. Name the new Property Record Expense Line Itemsand give it the record identifier short
name of ExpenseLinesand then click Create and open.
2014 Pegasystems Inc. 62
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
66/87
3. Change the mode of the property record from Single-Value Text to Page List, so we can
create a list of line items. Set the page definition to be the LineItemDetail class created
earlier.
4. Click Saveto save the new property type, refresh the Application Explorer and expand the
MainCo-EmpReimb-Work class ExpenseVoucher Data Model to view the new ExpenseLines
Property.
2014 Pegasystems Inc. 63
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
67/87
5. When fields are added using the Form Builder, PRPC creates the data object type and then
the property of that type. PRPC also initializes the first element to reserve memory for the
property. Since we created this manually, we need to add the initialization manually. Do this
by opening up the pySetFieldDefaults data transform in the ExpenseVoucher class and
adding initialization for the first member of the expense list.
Part 3 Add new Line Item page list fields to the Flow Action section.
1. From the process outline for the Complete Expenses step in the Submit Expenses stage, click
Open sectionunder the flow action name CompleteExpenses.
2014 Pegasystems Inc. 64
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
68/87
2. Add a layout to the bottom of the section.
3. Set the layout type to be a repeating grid.
4. View properties for the new repeating grid.
2014 Pegasystems Inc. 65
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
69/87
5. Type a dot and then use the down-arrow to select the List/Group to match the property you
created for the line items.
6. In the layout properties Operations tab, set Row editing to Inlineand then click OK.
2014 Pegasystems Inc. 66
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
70/87
7. Select the first column in the grid, add two columns to the right and then Saveyour changes.
2014 Pegasystems Inc. 67
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
71/87
8. Drag the Expense Lines properties into the grid cells.
9. Save changes.
2014 Pegasystems Inc. 68
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
72/87
10.Save changes, close the Section form and then test by running the process to create an
Expense Voucher case.
2014 Pegasystems Inc. 69
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
73/87
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
74/87
2. Select the Determine Approvalstep, right-click the Needs Approval decision shape and
then select View Properties.
3.
Click the Open Rule Form iconfor the NeedsApproval rule.
4. In the Create Decision Tree form, click Create and open.
2014 Pegasystems Inc. 71
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
75/87
5. In the Decision Tree rule form, set the decision rule to:
I f . Tot al Expense > 100 t hen r etur n yes
otherwi se return No
6. Save and then close the decision tree form. Click OK to close the Decision Properties form.
7. Save changes to the Determine Approval process diagram.
8. Run the process to create a case and view process flow. Set the Total Expense to a value
over 100, and then run the process again, setting the Total Expense to a value under 100.
Notice that the approval step is not required for the lower expense amount.
2014 Pegasystems Inc. 72
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
76/87
Exercise (Optional): Send Notification Email
Scenario
Email should be sent to expense voucher originators to keep them updated on reimbursement
status. Emails should be sent in each of the following cases:
After an expense voucher has been submitted, to notify the originator that the voucher has
been received.
When an expense voucher has been approved
When an expense voucher has been rejected.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard (App Express).
User Name: Admin@MainCo
Password: rules
Approach
In this exercise, you will:
Change the following steps to be multi-step processes:
o Verify Receipt
o Issue Reimbursement
o
Send Rejection Email
Open the process outline for the Review Expenses stage.
For each of the steps listed above, open the process diagram and add a Send Email smart
shape to send a message to the expense voucher originator.
Note: If a Send Email smart shape has already been added to one of the steps listed above, ignore
any suggested changes.
Hints
1.
To add smart shapes to a step, it must be a multi process step type.
2. Move process diagram shapes around to ensure connectors are fully attached.
2014 Pegasystems Inc. 73
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
77/87
Procedure
In this exercise, we will add a Send Email smart shape to the Verify Receipt, Issue Reimbursement
and Send Rejection Email steps. Text will inform the owner of the current status of their expense
voucher.
1.
To add a smart shape, a step needs to be a multi-step process. Open step behaviors for the
Verify Receiptstep and set the Step type to Multi step process.
2. Set the Issue Reimbursement and Send Rejection steps to be Multi step process step type
and then save changes to the case type.
3. Open the process outline (click Configure process detail) for the Review Expenses stage.
2014 Pegasystems Inc. 74
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
78/87
4. Select the Verify Receiptstep. Delete both the Verify Receipt and Step2 assignments by
right-clicking the shape and selecting Deletefrom the menu. Delete the connectors that left
each of the deleted shapes.
5.
Add a Send Emailsmart shape to the diagram.
6. Ensure connectors are attached to, and from the Send Email smart shape.
2014 Pegasystems Inc. 75
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
79/87
7. Right-click the Send Email smart shape and select View Propertiesfrom the pop-up menu.
8. In the Send Email form, select to send to a Party, select the Ownerparty and then set a
subject line that indicates that the expense voucher has been received.
Important:Avoidusingspecialcharacters,suchas.inthesubjectline.
9. Save changes to the Verify Receipt process diagram.
10.Perform steps 3-9 to add a Send Email smart shape to the Issue Reimbursement step. Set
the email parameters to:
Sendto: Party
Parties: Owner
Subject: Expensesapproved
Message: Yourexpensevoucherhasbeenapproved.
11.Run the process to create a case.
Note:Ignorethefollowing,whichwilloccurbecausethereisnoserver
configuredtoactuallysendemail:
Link to "Fix Correspondence" Error "** Caught javax.mail.internet.AddressException"
2014 Pegasystems Inc. 76
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
80/87
12.When the Verify Receipt step in the Review Expenses stage has completed, the case will have
an attachment associated with it.
13.Open the attachment to see the email message that was created.
OptionalSteps:
1.
If you are logged on as Admin@MainCo, try the following:2. Log off from the Admin@MainCo operator ID.
3. Log on as the operator User@MainCo, pw: rules.
4. Create an Expense Voucher case and run through until the Deliver Expense step has
occurred.
5. Note the current case number and then log off.
6. Log on as the operator Manager@MainCo, pw: rules.
7. Click MyWorkList and open the case that you created from the User operator ID.
8.
Continue processing the case.
2014 Pegasystems Inc. 77
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
81/87
Exercise (Optional): Create Declare Expression
Scenario
Approval of an expense voucher is required if the voucher is over a predetermined amount. The
amount should be calculated as a total of all line item costs.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard (App Express).
User Name: Admin@MainCo
Password: rules
Approach
In this exercise, you will:
Create a Declare Expression that will total all line item costs.
Change the Complete Expenses section to make the calculated total display as a read-only
value.
Hints
Declarativerulesoffertheabilitytoperformprocessingwheneverthevalueofaspecifiedproperty
changes,oronsomeothercondition. ADeclareExpressioncanbeusedtoperformanautomatic
computationbasedonexpressions.
1. A Declare Expression is created by selecting from the Decision rule menu.
2. Set the Apply to as the class containing the target property.
Procedure
In this exercise, we will change the Total Expense property from being entered manually, to being
automatically calculated as a total of all line item costs.
2014 Pegasystems Inc. 78
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
82/87
1. To add a Declare Expression, select +Create Decision Declare Expressionfrom the
explorer menu.
2. When the Declare Expression rule form opens, begin by ensuring that the Apply to cell
contains the correct context for the target property. You can check context by finding the
target property in the Application Explorer.
3. Select a label that describes the purpose of the Declare Expression, select the Target
Property from the smart prompt list and then click Create and open.
2014 Pegasystems Inc. 79
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
83/87
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
84/87
Exercise: Display Expenses
Scenario
Once the expense voucher has been completed, we want to display expenses.
For this exercise, you will be performing the role of System Architect using the account generated by
the New Application Wizard (App Express).
User Name: Admin@MainCo
Password: rules
Approach
In this exercise, you will:
Create a new section to display the expense voucher.
Hints
UsefeaturesyouarenowfamiliarwithtoaddanewsectiontothestepusingtheFormBuilder.
Procedure
In this exercise, we will display values from the expense voucher.
1. Select the Expense Voucher case from the Cases Explorer.
2014 Pegasystems Inc. 81
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
85/87
2. From the Application Explorer, expand properties used in the Expense Voucher case so that
they are viewable while you create a form to display values.
3. Create an Expense Voucher Case.
2014 Pegasystems Inc. 82
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
86/87
4. When you reach the Deliver Expenses step, click Yes, Ill add a form now.
5. Click the Create a new formlink.
6. Enter some of the fields that were entered on the expense voucher and then save.
2014 Pegasystems Inc. 83
8/10/2019 P7F 71ML6 ExerciseGuide 20140929
87/87
7. Save all changes, run the process to create a new case, and then toggle on the UI Inspector.
Hover over the section to display the details panel and then click the section name to open
the UI section.
Therestofthisexerciseisleftforstudentstousewhattheyhavelearnedtomodifythedisplayand
completethisstep. Forexample,somethingstotryinclude:
Set cell presentation properties for all fields in this section to Read only (always)
Change the layout to Inline grid double