+ All Categories
Home > Software > Pega poc | Pega projects

Pega poc | Pega projects

Date post: 07-Jan-2017
Category:
Upload: ashock-roy
View: 5,507 times
Download: 136 times
Share this document with a friend
57
TRAVEL BOOKING The following is a training exercise to walk you through the process of building a new application from scratch. You will be presented with business requirements and business flows to explain the application. You will then be taken through a step by step process to help you understand the components required and to gain a good understanding of the building blocks of PRPC and how they fit together. The exercise will cover the following topics: Class Explorer Process Flows Properties Portals Sections Harnesses Interfaces User profiles Access groups Privileges Case Management Statuses Declarative rules
Transcript
Page 1: Pega poc | Pega projects

TRAVEL BOOKINGThe following is a training exercise to walk you through the process of building a new application from scratch. You will be presented with business requirements and business flows to explain the application. You will then be taken through a step by step process to help you understand the components required and to gain a good understanding of the building blocks of PRPC and how they fit together.

The exercise will cover the following topics: Class Explorer Process Flows

Properties

Portals

Sections

Harnesses

Interfaces

User profiles

Access groups

Privileges

Case Management

Statuses

Declarative rules

Reporting

Activities

Correspondence

Page 2: Pega poc | Pega projects

SLAs

Create an application to process travel bookings

Overview of application.

The business wish to create a new application to process, manage and report on their growing travel business. The business is currently concentrating on European destinations but there are future plans to extend this to the rest of the world. The business already has an Oracle database which contains hotels and villas available for rent in Europe which they intend to keep.

The business drivers for this new application are:- Faster processing of bookings- Immediate view of status of bookings- Reduce costs and increase revenue- Management Information reporting for greater visibility

The application must provide the following: Ability to create a new travel booking Update/amend an existing booking

Cancel a booking

Automatically send out correspondence to confirm booking

Send out customer satisfaction survey

Different views for users and managers

Provides alerts and reminders to ensure timely processing of the booking

Page 3: Pega poc | Pega projects

Management reporting to include:- Bookings still awaiting payment- No of bookings made- Bookings by country

Travel Booking DetailsIn order to book a holiday, the following information is required:

Address of Passenger Contact Number of Passenger

Email address of Passenger

Number of Passengers

Destination - town

Name of Hotel or Villa

Duration of travel

Departure Date – Outward journey

Departure Time – Outward journey

Flight No – Outward journey

Departure Date – Return journey

Departure Time – Return journey

Flight No – Return journey

Cost of flight

Total Cost of flights

Page 4: Pega poc | Pega projects

Accommodation Cost

Total Cost of holiday

We are going to build three basic flows:- Create a new booking- Amend an existing booking- Cancel a booking

Below are displayed the high level business flows for New Travel Booking, Amend a Booking and Cancel a Booking. Use them as a guide to build your application; however, be mindful that there will undoubtedly be changes.

Page 5: Pega poc | Pega projects

New Travel Booking Flow

Page 6: Pega poc | Pega projects
Page 7: Pega poc | Pega projects

Amend Travel Booking Flow

Page 8: Pega poc | Pega projects
Page 9: Pega poc | Pega projects

Cancel Travel Booking Flow

Page 10: Pega poc | Pega projects
Page 11: Pega poc | Pega projects

We are going to begin by using two tools provided by Pegasystems which will provide a basic framework for your application. Application Profile Enterprise Application

The Application Profile enables you to create and gather information related to the type of work you are doing, who is doing it, how long you estimate the project to take, etc. It produces a project document and then integrates with the Enterprise Application to enhance the information already captured.

We will start with the Application Profile and move on to the Enterprise Application.

Having read the business requirements and worked through the business flows you are now in a position to complete the Application Profile.

Page 12: Pega poc | Pega projects

Note: Depending upon your user profile, your main screen may look different.

To start the APPLICATION PROFILE choose File from the menu and select New and Application Profile.

The following screen will be displayed.

Page 13: Pega poc | Pega projects

The Application Profile tool will take you through a series of screens which you need to complete.

Get Started Overview

Actors

Requirements

Work Types

Page 14: Pega poc | Pega projects

Interfaces

Reports

Correspondence

Assumptions

Participants

Sizing

Document

The information entered will provide the basis for your application and for the Application Profile document that is generated at the end. Each section will provide the basic structure for your application. They can, however, easily be changed later.

Enter a Project Name - in this case Travel Booking and a Project description. Leave the other fields as they are. Click on the Next button

Page 15: Pega poc | Pega projects

Click Generate application button

Building the Travel Booking Flow

The Enterprise Application will take you through a number of screens which have already been populated with the information you entered in the Application Profile. Here you may make changes and add additional information.

Application Background Base and RulesSets

Page 16: Pega poc | Pega projects

Actors

Roles

WorkType

Class Structure

Flow

Requirements

Reports

Correspondence

Review Application

Make any changes you wish but as this is a starting point for our exercise, please feel free to leave the information as it is. The last section, Review Application, shows you the rules and the class structure that the Enterprise Application will create.

Press the Create button.

The system will now create the basic rules. When it has completed press the Finish button. You will receive a message that the application has been created.

Click on the Switch to New Application button.

Let's start by seeing what the ENTERPRISE APPLICATION wizard has created.

Page 17: Pega poc | Pega projects

On the left hand side of the screen is the Class Explorer. The Class Explorer allows you to view the rules in your application in a number of different ways. The three tabs at the top of the Class Explorer represent:

- App Explorer - shows rules grouped by application- Class Explorer - shows rules grouped by Class- Rules by Type - shows rules grouped by type

The Enterprise Application has created a basic class structure and rules, visible under the App Explorer tab.

From the Class Explorer, select Pega-FW-TravelBookingFW-Work, click on Process and then click on Flow. The default flow (TravelBookingMainFlow) is listed in the main window. Select the flow to display it.

Page 18: Pega poc | Pega projects

Before we begin to make any changes, lets "run" the flow to see what an end user will see. Click on the icon.The following screen will appear.

Page 19: Pega poc | Pega projects

Enter some dummy information and press the Create button. PRPC has created a new case and assigned it an ID.

Although functional, neither the screen nor the flow reflect the business requirements. We need to change the screen, and add new fields (properties). We also need to change the flow. Let's start by changing the screen.

Adding new properties

We are now going to add the new properties we need. For this exercise, we are going to create them under the Pega-FW-TravelBookingFW-Work class.NOTE: Remember when building a real application, the properties may be created at different levels in the class structure.

We are going to be adding the following properties: Passenger Name - Text Field Address of Passenger - Text Field

Contact Number of Passenger - Text Field

Email address of Passenger - Text Field

Page 20: Pega poc | Pega projects

Number of Passengers - Integer Field

Destination - town - Text Field

Name of Hotel or Villa - Text Field

Duration of travel - - Text Field

Departure Date – Outward journey - Date Field

Departure Time – Outward journey - Time Field

Flight No – Outward journey - Text Field

Departure Date – Return journey - Date Field

Departure Time – Return journey - Time Field

Flight No – Return journey - Text Field

Has payment been received - True/False Field

Cost of flight - Decimal Field

Total Cost of flights - Decimal Field

Accommodation Cost - Decimal Field

Total Cost of holiday - Decimal Field

In the Class Explorer: - Right click on the Pega-FW-TravelBookingFW-Work class, click on New and then Property

Page 21: Pega poc | Pega projects

Enter the name of the property you wish to create, in this case the first name of the passenger - for example, FirstName. This is a text field so leave the Type as Text. Then press the Quick Create button. Repeat this for all the other properties you wish to add, making sure you change the Type as appropriate. Don't worry if you make a mistake, you can change the Type later.

Once you have added the properties, they will appear in the Class Explorer

Page 22: Pega poc | Pega projects

Note: To quickly add lots of properties you can use the Define Properties Wizard

Now that we have our properties, we need to add them to the screens.

Building the Travel Booking Flow

The Enterprise Application will take you through a number of screens which have already been populated with the information you entered in the Application Profile. Here you may make changes and add additional information.

Application Background Base and RulesSets

Page 23: Pega poc | Pega projects

Actors

Roles

WorkType

Class Structure

Flow

Requirements

Reports

Correspondence

Review Application

Make any changes you wish but as this is a starting point for our exercise, please feel free to leave the information as it is. The last section, Review Application, shows you the rules and the class structure that the Enterprise Application will create.

Press the Create button.

The system will now create the basic rules. When it has completed press the Finish button. You will receive a message that the application has been created.

Click on the Switch to New Application button.

Let's start by seeing what the ENTERPRISE APPLICATION wizard has created.

Page 24: Pega poc | Pega projects

On the left hand side of the screen is the Class Explorer. The Class Explorer allows you to view the rules in your application in a number of different ways. The three tabs at the top of the Class Explorer represent:

- App Explorer - shows rules grouped by application- Class Explorer - shows rules grouped by Class- Rules by Type - shows rules grouped by type

The Enterprise Application has created a basic class structure and rules, visible under the App Explorer tab.

From the Class Explorer, select Pega-FW-TravelBookingFW-Work, click on Process and then click on Flow. The default flow (TravelBookingMainFlow) is listed in the main window. Select the flow to display it.

Page 25: Pega poc | Pega projects

Before we begin to make any changes, lets "run" the flow to see what an end user will see. Click on the icon.The following screen will appear.

Page 26: Pega poc | Pega projects

Enter some dummy information and press the Create button. PRPC has created a new case and assigned it an ID.

Although functional, neither the screen nor the flow reflect the business requirements. We need to change the screen, and add new fields (properties). We also need to change the flow. Let's start by changing the screen.

Adding new properties

We are now going to add the new properties we need. For this exercise, we are going to create them under the Pega-FW-TravelBookingFW-Work class.NOTE: Remember when building a real application, the properties may be created at different levels in the class structure.

We are going to be adding the following properties: Passenger Name - Text Field Address of Passenger - Text Field

Contact Number of Passenger - Text Field

Email address of Passenger - Text Field

Page 27: Pega poc | Pega projects

Number of Passengers - Integer Field

Destination - town - Text Field

Name of Hotel or Villa - Text Field

Duration of travel - - Text Field

Departure Date – Outward journey - Date Field

Departure Time – Outward journey - Time Field

Flight No – Outward journey - Text Field

Departure Date – Return journey - Date Field

Departure Time – Return journey - Time Field

Flight No – Return journey - Text Field

Has payment been received - True/False Field

Cost of flight - Decimal Field

Total Cost of flights - Decimal Field

Accommodation Cost - Decimal Field

Total Cost of holiday - Decimal Field

In the Class Explorer: - Right click on the Pega-FW-TravelBookingFW-Work class, click on New and then Property

Page 28: Pega poc | Pega projects

Enter the name of the property you wish to create, in this case the first name of the passenger - for example, FirstName. This is a text field so leave the Type as Text. Then press the Quick Create button. Repeat this for all the other properties you wish to add, making sure you change the Type as appropriate. Don't worry if you make a mistake, you can change the Type later.

Once you have added the properties, they will appear in the Class Explorer

Page 29: Pega poc | Pega projects

Note: To quickly add lots of properties you can use the Define Properties Wizard

Now that we have our properties, we need to add them to the screens.

We are going to add two new sections:

Customer Information Booking Information

Page 30: Pega poc | Pega projects

PRPC provides you with a number of tools to help you design and layout your screens. Click on the down arrow to the right of the Layout tool at the top of the screen.

Select Layout and drag it to below the Reason field. A default layout is display.

The first thing we are going to change is the title of the layout. Click on the magnifying glass to the right of Layout2. Change the Format to Standard and change the title to Customer Information.

Page 31: Pega poc | Pega projects

We now need to add the labels and fields to reflect our travel booking process. Let's start by adding the labels. Click in the first label box and type First Name. Click in the second label box and type Last Name. To add new rows simply right click the mouse and select insert row. Add the rest of the property labels.

The screen should look something like this:

Page 32: Pega poc | Pega projects

Add another layout section for the Booking Information the same as we have done for Customer Information. Then add the labels. The completed screen should look something like this:

Page 33: Pega poc | Pega projects

Save the changes and check your rule back in again by click on the Check In icon at the top of the screen.

Before we continue run the your flow again to make sure you are happy with the entry screen. Enter the travel booking information and create a

Page 34: Pega poc | Pega projects

new booking case.

The basic entry screen is now ready to use. However, we do not want the user to type in all the information on the screen. Some of the fields such as:

Duration Total Flight Costs

Total Accommodation Costs

Total Cost

can all be calculated automatically and simply displayed to the user.

PRPC uses Declare Expressions to automatically calculate (and recalculate) certain properties any time a value is added or changed. We will create a Declare Expression for each of the above properties starting with Total Flight Costs.

In the class explorer, right click on the Pega-FW-TravelBookingFW-Work class. Select New, Decisions and Declare Expressions. The following screen will appear.

Page 35: Pega poc | Pega projects

Enter the name of the property that will display the result of the Declare Expression (in this case TotalFlightCost) and click OK.

We want to multiply the cost of the flight by the number of passengers so the syntax is the following:

Page 36: Pega poc | Pega projects

Save the rule file.

Do the same for the Total Accommodation Cost and for the Total Cost of the booking.

TESTING

Let's test that the declare expressions are performing the correct calculations. Run your flow again and enter a new work object.

All the information you enter is stored in the clipboard as are the results of the declare expression calculations. In order to view what is currently on the clipboard, choose Tools from the menu and select Clipboard.

Page 37: Pega poc | Pega projects

The clipboard is divided into pages which contain different types of information. For our purposes we are interested in the page called User Pages. Expand the User Pages and select pyWorkPage.

Page 38: Pega poc | Pega projects
Page 39: Pega poc | Pega projects

Scroll down on the right hand side of the screen until you see your Declare Expressions. If the calculations are not correct, review your Declare Expressions and their associated properties and run through the process again.

Our entry screen is almost complete. However we are going to make a few changes to make it easier for a user to enter information. Currently the calculated fields are input fields on the screen which we do not want. We want the fields to be read only. To do this we are going to edit the screen again. This time go to the Application Explorer, expand User Interface and select Section. and then CoreSummary.

We need to change the following fields to be read only: Total Flight Costs Total Accommodation Costs

Total Cost

Click in the Total Flight Costs field and click on the magnifying glass.

Page 40: Pega poc | Pega projects

Select the Read Only check box and click on OK. Do the same thing for the other two properties.

The next change we want to make is to the date fields. At the moment the user has to type in the date for the Departure Date and the Return Date. It would be easier for the user to select the date.

Click in the Departure Date field and click on the magnifying glass.

Page 41: Pega poc | Pega projects

In the Display As option, press the down arrow and select Date-Calendar. Do the same for the Return Date field.

Your screen will now look something like this.

Page 42: Pega poc | Pega projects

Note: Remember to save the section rule and check the rule back in

The entry screen is now complete. When the user presses the create button a work object is created, given an id and a confirmation screen is displayed to the user. However, the information that is displayed is basic and does not show any information about the travel booking itself. So, as we did with the initial entry screen, we are going to make some changes.

Page 43: Pega poc | Pega projects

The section rule that displays the confirmation screen is called Header. Go to the Application Explorer, expand User Interface and select Section. and Header.

Check out the section rule and add a new layout.

Page 44: Pega poc | Pega projects

Add the labels and properties you wish to display to the user.

Page 45: Pega poc | Pega projects

Remember to save and check in your section rule. Run your process again to view the results.

There are a lot more changes we could make to the screens but we are now going to concentrate on the business process requirements. Lets's go back to the booking entry flow to understand what we have completed and what is the next requirement.

Page 46: Pega poc | Pega projects
Page 47: Pega poc | Pega projects
Page 48: Pega poc | Pega projects

We have completed the basic entry and confirmation screens. The next steps are to decide if a payment has been made and to send out correspondence to confirm the booking. We will start with the correspondence

The basic correspondence rules were created automatically by the Application Profile and Enterprise Application wizards we used at the beginning of this exercise. To see what was created, go to the Application Explorer, select Process and Correspondence.

Select the Booking Confirmation Email.

Page 49: Pega poc | Pega projects
Page 50: Pega poc | Pega projects

We will change the default text of the correspondence to reflect the business requirement. Check out the correspondence rule and make the required changes to the text. Don't forget to save the rule file and then check it in again.

Page 51: Pega poc | Pega projects
Page 52: Pega poc | Pega projects

Now that we have created our correspondence, we need to add it to our business flow.

Adding Correspondence to the business flow

From the Application Explorer, select your flow rule and check it out.

We now need to change the flow so that it sends out correspondence. Click on the Flow Editor icon at the top of the screen.

This will open up the flow in Visio

Page 53: Pega poc | Pega projects

Recommended