Skip to main content

Extending applications to new business areas 

Archived

10 Tasks

5 mins

Visible to: All users
Advanced
Pega Platform 8.3.1
English
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded. Click here to continue your progress in the latest version.

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.
  • Opera's static content branding rules can be placed in the Opera division ruleset.
  • There is dependency on the Event Booking Application’s release cycle.
  • Many rules within the ruleset stack are never accessed.
Build on the Hotel application. Opera is not a division.
  • There is independence from the Event Booking application’s release cycle.
  • The ruleset stack only includes rules that are accessed.
  • This is simpler to maintain and it promotes Opera’s unique business model.
  • A special ruleset is needed to support Opera's static-content branding rules.

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

  1. In your exercise system, log in as [email protected].
  2. From the Records Explorer, open the Hotel application record.
  3. In the Application wizard tab, if Show this application in the New Application wizard is not selected ,do the following:
    1. Select the Show this application in the New Application wizard check box,
    2. In theShort description field, enter Hotel Rooms Request.
    3. In the Application description field, enter Hotel Rooms Request component Application.The completed Application wizard tab looks like the following image.
      Hotel Rooms Request component Application
  4. Save the Hotel application record.
  5. Run the New Application wizard.
  6. Build the new application on Hotel, Use this application type, Include all case types, and Include all data types.
  7. Select primary device Responsive and select a color scheme.
  8. Name your application Opera.
  9. 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).
    Advanced configuration dialog
  10. Click Save to save your settings and exit the Advanced configuration dialog.
  11. 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

  1. From the Records Explorer, create an operator ID.
  2. In the new rule form, in the Short description field, enter Admin@Opera. In the Operator ID field, enter Admin@Opera.
  3. Click Create and open to create the new operator.
  4. 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
  5. Select the default access group to Opera:Solution3.
  6. In the Work tab, in the Organizational unit field, select FSG / Div / Unit.
  7. In the Security tab, update the password to rules, and select the Allow rule check out check box.
  8. Save the Admin@Opera operator.
  9. Log off. You are now ready to configure the Opera application.
  10. Log on using Operator ID and Remove the FSG and FSGInt Ruleset from Opera Application.
    Application Opera
  11. Log off.

7 Configure the case types

  1. Log on using the operator ID Admin@Opera.
  2. 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.
  3. Select the new Opera Event case type.
  4. 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.

    Configure Case
  5. In the Settings tab, do the following:
    1. Select the Data propagation section.
    2. 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
      Data Propagation
    3. Click OK to save your updates.
    4. 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.
    5. Update the pyCaseManagementDefault work parties record - for Owner Enable the VOE? check box  as below. 
      Work Parties
                           

8 Create the Opera Event case life cycle

  1. On the Workflow tab, click Add life cycle to create an Opera Event case life cycle.
  2. In the Life cycle tab, add a Create Hotels stage.
  3. Add a Create Case step to the Create Hotels process.
    Case Life cycle

     

  4. 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:

    Create child case

     

  5. 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.

    Case Dependency

     

  6. Add a Resolve stage after the Create Hotels stage.

    The completed life cycle looks like the following image.

    Complete Case life cycle

     

9 Configure a stage for entering test data

  1. In the Data Explorer, ensure that at least one hotel instance exists.
  2. 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.
    Set Fields Defaults
  3. 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.
  4. Add EnterTestData_Flow as relevant records for Class FSG-OPRA-Work-OperaEvent.
    Enter Test Data
  5. 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.
    Opera Event

10 Verify the results

  1. Launch a Case Manager Portal.
  2. Create an Opera Event case.
  3. Advance the case to the Review form at the Wait step.
  4. From the Actions menu, select Continue Process.

    The form looks like the following image. Note that RoomRequest case is  created.

    Room Request case


Available in the following mission:

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice