You are on page 1of 87

Pega 7 Fundamentals

Exercise Guide
PRPC v.7.1

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

Table of Contents
Pegasystems Overview...............................................................................

Use the Case Manager to Process a Case........................................................................

Using the Pega Designer Studio.................................................................

Get Familiar with Designer Studio....................................................................................

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

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.

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 Manager in the header indicates youre using a Case Manager portal (and not
Designer Studio).
2. Create is used to create a new instance of a case type.
3. The Next Assignment allows 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.

Procedure
Follow the steps below:
1. Log into the Pega 7 environment with the Username and Password listed in the Scenario.

2014 Pegasystems Inc.

2. Select Create Candidate Case from the Create menu.

2014 Pegasystems Inc.

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 the Submit button.

2014 Pegasystems Inc.

4. In the Collect Professional Info screen:


a. Note that at least one entry is required.
b. Use the Add Item icon to add additional entries
Enter job information for the Candidate and then click the Submit button.

2014 Pegasystems Inc.

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.

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 Studio in the header indicates youre using the Designer Studio portal.
3. + Create is 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.

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 Cases from the list of explorer menus on the left of the screen and then select the
Candidate case type.

8. Familiarize yourself with the Case Designer landing page. Try the following:

Click Run to create an instance of the case type

Select Legend from the Actions menu 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 App from the list of explorer menus on the left of the screen and then expand
Candidate User Interface Section to see the list of UI sections for this case type. Click
CollectPersonalInfo to view the UI section that is used to collect personal information for
the job candidate.

2014 Pegasystems Inc.

The UI section will open in the work area.

2014 Pegasystems Inc.

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 Application to start the Application Creation Wizard.
Use the following information to describe the application.
Application:
Application Short Name:
Description:
Build on Application:
Application and Structure:
Organization:
Organization short name:
Business objectives:
Case types:
Data objects:

Employee Reimbursements
EmpReimb
This application will be used to process employee
reimbursements for all types of expenses.
PegaRULES
Implementation Only
MainCo
MainCo
Keep track of employee expenses and reimbursements
ExpenseVoucher
TravelVoucher
(none)

Hints
1. You can return to any step to change values before clicking Create to create the application.
2. Data objects can be added now, or while editing the case type.

2014 Pegasystems Inc.

10

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 Application from the Application menu.

3. After reading the information about creating a new application, click the Create New
Application icon.

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

Select Implementation only structure, 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

6. In Step 3, name the first case type: ExpenseVoucher and the second case type
TravelVoucher and 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

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 Overview from the Application
menu.

IMPORTANT NOTES:

The default application for this operator ID becomes the application that was just created.
Select Switch Application from the Application menu to switch back to the Candidate demo.

The new operator IDs created by App Express will match the organization that you entered
in 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

Exercise: Define Stages for Expense Voucher Case Type


Scenario
Employee 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.

Submit
Expenses

Review
Expenses

Reimburse
Expenses

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 Cases from 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?

2014 Pegasystems Inc.

15

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 Cases from the list of explorer menus and then select the ExpenseVoucher case.

3. Name the stages to match those in the scenario flow. Begin by selecting Configure stage
behaviors from the Stage 1 pull-down menu.

2014 Pegasystems Inc.

16

4. Rename this stage from the default Stage 1 to Submit Expenses and then click OK.

5. Name the next two stages so that they match the scenario stage names.

6. Click Save to 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 Run button.

Select Expense Voucher Case from the Create a Case menu.

8. Click Submit at 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

Exercise: Define Steps


Scenario
The process for employees to have expenses reimbursed is shown in the following illustration.

Submit
Expenses

Review
Expenses

Reimburse
Expenses

Complete Expenses

Verify Receipt

Issue reimbursement

Deliver Expenses

Determine Approval

Resolve

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 behaviors for 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.

2014 Pegasystems Inc.

18

Procedure
Part 1 Add steps to each stage.
1. Select ExpenseVoucher from the Cases explorer. In the Case Designer landing page for
case type ExpenseVoucher, click Default Step under the Submit Expenses stage. In the
resulting text field, enter Complete Expenses.

2. Click +Add step under 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

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 Process from the Step type menu and then click OK.

6. Click Save to save changes to the case type.

2014 Pegasystems Inc.

20

Part 3 Test flow


7. Click Run to 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

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 Run or by selecting Expense
Voucher Case from 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 form icon.

2014 Pegasystems Inc.

22

11. Add two fields, such as Employee Name or 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

Exercise: Edit Process Flow


Scenario
The process for employees to have expenses reimbursed is shown in the following illustration.

Submit
Expenses

Review
Expenses

Reimburse
Expenses

Complete Expenses

Verify Receipt

Issue reimbursement

Deliver Expenses

Determine Approval

Resolve

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

Approach
From 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.

2014 Pegasystems Inc.

24

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 detail link below the last step.

2014 Pegasystems Inc.

25

2. In the Process Modeler flow diagram for Determine Approval, right-click the first green
assignment shape and select Delete to remove it from the flow.

3. Open the Flow Shapes menu and select a Decision shape. 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

5. Right-click the decision shape and select View Properties to open the properties dialog.

6. Call the decision Needs Approval. Select Decision Tree from 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. Add a connector from the Decision shape to the new End shape, right-click the connector
and select View properties from the pull-down menu.

9. Call the connector No. Select Result from 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 properties from the pull-down menu.

2014 Pegasystems Inc.

28

11. Call the connector Yes. Select Result from 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 Step2 assignment shape and select View Properties from the pull-down
menu.

2. If the total expense amount is over the limit, we want the approval to be performed by a
manager. To do this, set the following properties:

Assignment Name: Get Approval

Route to: Operator

Operator: Manager@MainCo

2014 Pegasystems Inc.

29

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 Properties from the pull-down menu.

2014 Pegasystems Inc.

30

4. Call the connector Approve Voucher. Select Approve from the More... choices in the autocomplete list of flow actions, set likelihood to 75, add an audit note and then click OK.

5. Click Save to save changes to the ExpenseVoucher case type.

2014 Pegasystems Inc.

31

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 stages to 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

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 Delete from the pop-up menu. Then, add a Send Email smart shape to the
flow diagram.

2014 Pegasystems Inc.

33

7. Open the Send Email smart shape and set properties to send to a Party. Set parties to be
the Owner of 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 Properties and then select Resolved-Rejected from
the list of available Work status.

10. After completing changes to the Reject Expense stage, Save all changes and return Back to
Stages.

2014 Pegasystems Inc.

34

Part4Followthestepsbelowtoroutecontroltothealternatestageifexpensesarerejected.
1. Select Configure Process Detail for the Review Expenses stage.
2. Return to the Determine Approval step flow diagram.

3. Add a Change Stage smart 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

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 Expense stage. 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 Reject from the More... choices in the autocomplete list. Set likelihood to 25, add an audit note and then click OK.

2014 Pegasystems Inc.

36

8. Click the % Likelihood icon to see the likelihood that different branches will be taken.

9. Save changes to the case type and then return Back to Stages.
10. Click Run to 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 Submit to 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

Module 04: Working with Data

This lesson group includes the following lessons:

Creating Data Object Types

Creating the User Interface

2014 Pegasystems Inc.

38

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 new
data 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 can
also 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

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 types to add a new data class.

2. In the Data Object Types screen, click Create New to create a new data class.

3. In the Display Name field, enter ContactInfo and then expand ID, INTERITANCE AND
RULESET SETTINGS.

2014 Pegasystems Inc.

40

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 Enter key.

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

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 Next to continue.

8. View property details and then click Next.

2014 Pegasystems Inc.

42

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-D into
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

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-EmpReimbWork and select Create Data Model Property from 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

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-DataContactInfo, and then using the down-arrow () to select from the list that pops up and
clicking 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

5. To view your results, go to the Application Explorer. Ensure you are viewing the Work class
and select Refresh from 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

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

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 Create to create the application.
2. Data objects can be created now, or while editing the case type.

Procedure
Part 1 Begin creating the Expense Voucher case types user interface.
3. Open the Expense Voucher case in the Case Designer and then click Configure Process
detail to open the process outline for the Submit Expenses stage.

4. Select the Complete Expenses step. 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 form to configure fields for this form,
using the data object that was created.

2014 Pegasystems Inc.

48


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 X to 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. Save changes to the case type and then Run the process to test flow in an Expenses Voucher
case.

2014 Pegasystems Inc.

49

Part 2 Edit the Section


7. Return to the process view and click Open Section (under the Action name) to open the UI
section that was created by the form builder.

2014 Pegasystems Inc.

50

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 double and then click OK to save this change.

2014 Pegasystems Inc.

51


10. Notice that the layout properties change to display a two-column grid format. Click Save to
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

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 Close the rule form.

2014 Pegasystems Inc.

53

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 Inspector icon 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

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

2014 Pegasystems Inc.

56

Module 05: Wrap-Up

This lesson group includes the following lessons:

Additional Features and Resources

2014 Pegasystems Inc.

57

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

Hints
When creating a new case, note some of the following.
1. You can return to any step to change values before clicking Create to 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 types from the Data Explorer menu.

2. Click +Create New in the Data Object Types dialog.

2014 Pegasystems Inc.

59

3. Set Display Name to Line Item Detail and then expand ID, INHERITANCE AND RULESET
SETTINGS. Set Parent Class (Directed) to Data- and Parent Class (Pattern) to MainCoEmpReimb-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 pxCurrency and
then click Next.

2014 Pegasystems Inc.

60

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

Part 2 Create a Property Record in Work.


1. Open the Data Explorer and select Create Data Model Property from the menu.

2. Name the new Property Record Expense Line Items and give it the record identifier short
name of ExpenseLines and then click Create and open.

2014 Pegasystems Inc.

62

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 Save to 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

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 section under the flow action name CompleteExpenses.

2014 Pegasystems Inc.

64

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

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 Inline and then click OK.

2014 Pegasystems Inc.

66

7. Select the first column in the grid, add two columns to the right and then Save your changes.

2014 Pegasystems Inc.

67

8. Drag the Expense Lines properties into the grid cells.

9. Save changes.

2014 Pegasystems Inc.

68

10. Save changes, close the Section form and then test by running the process to create an
Expense Voucher case.

2014 Pegasystems Inc.

69

Exercise (Optional): Create Decision Tree Rule


Scenario
It has been determined that expenses over $100 will require approval. A decision rule needs to be
created that will send vouchers over this predetermined amount to a manager for approval.
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:

Open the Review Expenses process diagram.

Add a decision tree rule to determine if expenses are over a specified limit

Hints
1. View properties for a decision shape to see the name of the rule associated with that shape.
2. Open the decision rule form to edit the decision rule.

Procedure
In this exercise, we will determine if the expense voucher is for an amount over $100, in which case
it will need to be approved.
1. Open the Review Expenses stage in the process view.

2014 Pegasystems Inc.

70

2. Select the Determine Approval step, right-click the Needs Approval decision shape and
then select View Properties.

3. Click the Open Rule Form icon for the NeedsApproval rule.

4. In the Create Decision Tree form, click Create and open.

2014 Pegasystems Inc.

71

5. In the Decision Tree rule form, set the decision rule to:
If .TotalExpense > 100 then return yes
otherwise 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

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

Issue Reimbursement

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

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 Receipt step 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

4. Select the Verify Receipt step. Delete both the Verify Receipt and Step2 assignments by
right-clicking the shape and selecting Delete from the menu. Delete the connectors that left
each of the deleted shapes.

5. Add a Send Email smart shape to the diagram.

6. Ensure connectors are attached to, and from the Send Email smart shape.

2014 Pegasystems Inc.

75

7. Right-click the Send Email smart shape and select View Properties from the pop-up menu.

8. In the Send Email form, select to send to a Party, select the Owner party 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:
Parties:
Subject:
Message:

Party
Owner
Expensesapproved
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

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

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

1. To add a Declare Expression, select +Create Decision Declare Expression from 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

4. To set the expression, first select to set Total Expense to be equal to the Sum of. Type a dot
(.) and then use the down-arrow to select ExpenseLines(). Type another dot and then
select LineCost from the smart prompt list. When your expression matches the form below,
click Save and then close the form.

5. Run the process to create an Expense Voucher case. Add line items to see if the total
automatically updates.

2014 Pegasystems Inc.

80

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

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

4. When you reach the Deliver Expenses step, click Yes, Ill add a form now.

5. Click the Create a new form link.

6. Enter some of the fields that were entered on the expense voucher and then save.

2014 Pegasystems Inc.

83

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

2014 Pegasystems Inc.

84

You might also like