Extending applications to new business areas
Archived
10 Tasks
5 mins
Advanced
Pega Platform 8.3.1
English
Scenario
Front Stage acquires a company named Opera. Both companies have similar business models of helping customers book and host guests for events. However, Opera manages only indoor events and does not perform parking or weather preparation tasks. Like Front Stage, Opera must also be able to reserve hotel rooms for events.
Front Stage wants to reuse its existing assets to support and promote Opera's business model. At the same time, Front Stage does not want to restrict its outdoor event hosting business model.
The following table provides the credentials you need to complete the exercise.
Role | Operator ID | Password |
---|---|---|
Admin | [email protected] | install |
Admin | admin@Opera | rules |
Detailed Tasks
1 Approach
Recommend a solution that enables Opera to reuse Front Stage's ability to reserve hotel rooms.
2 Possible approaches
There are two possible design approaches.
- Create a new Opera application built on the existing Event Booking application. You define Opera as a new division of Front Stage. Class names within this new layer begin with FSG-OPERA-OPRA.
- Create a new Opera application built on the existing Hotel application. Class names within this new layer begin with FSG-OPRA-.
3 Evaluate the design pros and cons
Design | Pros | Cons |
---|---|---|
Build on the Event Booking application. Opera is a division. |
|
|
Build on the Hotel application. Opera is not a division. |
|
|
4 Recommended design approach
Building the Opera application on the Hotel application provides flexibility. The Opera application is only affected by the release cycle of the Hotel application, which is less complex than the Event Booking application. This approach avoids defining Opera as a Division, which lengthens class names. The Opera organization is free to create a ruleset similar to the FSG ruleset that every Opera-related application utilizes.
5 Detailed steps
- In your exercise system, log in as [email protected].
- From the Records Explorer, open the Hotel application record.
- In the Application wizard tab, if Show this application in the New Application wizard is not selected ,do the following:
- Select the Show this application in the New Application wizard check box,
- In theShort description field, enter Hotel Rooms Request.
- In the Application description field, enter Hotel Rooms Request component Application.The completed Application wizard tab looks like the following image.
- Save the Hotel application record.
- Run the New Application wizard.
- Build the new application on Hotel, Use this application type, Include all case types, and Include all data types.
- Select primary device Responsive and select a color scheme.
- Name your application Opera.
- Complete the Advanced configuration dialog as shown in the following image.Note that the work pool classes are created by the system (for example, FSG-OPRA-Work- RoomsRequest).
- Click Save to save your settings and exit the Advanced configuration dialog.
- Click Create application to create the new Opera application and then click Done to exit the New Application wizard.
6 Create the Admin@Opera operator
- From the Records Explorer, create an operator ID.
- In the new rule form, in the Short description field, enter Admin@Opera. In the Operator ID field, enter Admin@Opera.
- Click Create and open to create the new operator.
- In the Profile tab, enter the following:
Field Setting Title Administrator First name Admin Last name Opera Full name Admin Opera Position/job title Administrator Email Admin@Opera - Select the default access group to Opera:Solution3.
- In the Work tab, in the Organizational unit field, select FSG / Div / Unit.
- In the Security tab, update the password to rules, and select the Allow rule check out check box.
- Save the Admin@Opera operator.
- Log off. You are now ready to configure the Opera application.
- Log on using Operator ID and Remove the FSG and FSGInt Ruleset from Opera Application.
- Log off.
7 Configure the case types
- Log on using the operator ID Admin@Opera.
- In the Cases Explorer, add an Opera Event case type and define the existing Rooms Request case type as a child case type of the new Opera Event case type.
- Select the new Opera Event case type.
-
In the Data Model tab, Addtwo field group named Rooms Request with data type as FSG-Data-Hotel-RoomsRequest and Hotel with data type as FSG-Data-Hotel.
- In the Settings tab, do the following:
- Select the Data propagation section.
- Expand Into RoomsRequest and add the properties you want to propagate as shown in the following table.
Propagate property value To property value pyWorkParty pyWorkParty RoomsRequest RoomsRequest - Click OK to save your updates.
- Select the General section and select the Skip 'Create' view when users create a new case check box. This step prevents issues that may occur when advancing past the first screen during testing.
- Update the pyCaseManagementDefault work parties record - for Owner Enable the VOE? check box as below.
8 Create the Opera Event case life cycle
- On the Workflow tab, click Add life cycle to create an Opera Event case life cycle.
- In the Life cycle tab, add a Create Hotels stage.
- Add a Create Case step to the Create Hotels process.
- In the create case Step description panel, select Create child cases(s) and configure the step as follows:
Field Setting Create the following case Rooms Request Starting process Rooms Request Create multiple cases using a list List field Data transform Source page parameter name The completed Step description looks like the following image:
- In the life cycle, add a Wait Utilities step after the Create Case step. Configure the Wait step as shown in the following image.
Field Setting Wait type Case Dependency Wait for (Case type) All Rooms Request To be resolved Select this option Scope Current case Users can choose to continue process Select this option The completed Step description looks like the following image.
- Add a Resolve stage after the Create Hotels stage.
The completed life cycle looks like the following image.
9 Configure a stage for entering test data
- In the Data Explorer, ensure that at least one hotel instance exists.
- Copy (FSG-Hotel-Work-RoomsRequest) pySetFieldsDefaults to FSG-OPRA-Work-OperaEvent and apply the data transform from the (FSG-OPRA-Work-OperaEvent) pyDefault data transform as shown in the following image.
- To FSG-OPRA-Work-OperaEvent, copy the FSG-Hotel-Work-Hotel EnterTestData_Flow flow , and related rules present in flow InitRoomsRequest flow action, DT and section, PreSaveHotel DT , AddHotelInfo flow action and Section , SearchHotel flowaction and section.
- Add EnterTestData_Flow as relevant records for Class FSG-OPRA-Work-OperaEvent.
- On the Opera Event life cycle, add Enter Test Data as the first stage. Create Hotels is now the second stage as shown in the following image.
10 Verify the results
- Launch a Case Manager Portal.
- Create an Opera Event case.
- Advance the case to the Review form at the Wait step.
- From the Actions menu, select Continue Process.
The form looks like the following image. Note that RoomRequest case is created.