Skip to main content

Challenge

Adding data references to your Constellation application

Adding data references to your Constellation application

5 Tasks

1 hr

Pega Platform '24.2
Visible to: All users Applies to: Pega Platform '24.2
Intermediate
User Experience
Constellation
English

Scenario

Reference existing data records from your Constellation application to easily configure a user interface. Adopt modules into your application stack. Build reusable features, and then assemble those features into your application.

An enterprise-grade Pega workflow uses records of data from either inside Pega or from external systems of record.

Loan Market has adopted modular reuse in accordance with its low-code enterprise development strategy. The company has already implemented modules that provide data structures and integrations to work with the following data objects:

Module Data object Purpose
Finance Network Lender The Lenders who Loan Market promote to their clients.
Finance Network Loan Product The Loan Products that each Lender promotes.
Vehicle Vehicle Variant Information about Vehicles for which Loan Market customers intend to obtain finance.
Customer Customer A Customer of Loan Market.

In this challenge, you will:

  • Add modules to your Loan Marketplace application to provide a modular Situational Layer Cake™.
  • Enrich the Data Model of the Customer Intake Case with data references to these data objects, which fulfills additional Loan Marketplace business outcomes.
  • Easily configure the Loan Marketplace Constellation user interface to provide a great user experience while referencing existing Data Records.

The following table provides the credentials you need to complete the challenge:

Role Username Password
Application Author AppCreator@LMKT pega123!

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Add modules to the application

In the Pega modern modular reuse strategy, modules are packaged as regular Pega applications. Your top-level implementation adds these modules as as built-on applications.

  1. In your challenge instance, click Launch Pega Infinity, and then enter the following credentials:
    1. In the User name field, enter AppCreator@LMKT.
    2. In the Password field, enter pega123!.
  2. In Dev Studio, add the following applications to your Loan Marketplace application so that they are higher on the application list than LMKTEnt:
    1. FinanceNetwork:01.01
    2. Vehicle:01.01
    3. Customer:01.01
      Loan Marketplace Application Definition includes modules with reusable functionality.
      Note: LMKTEnt is the application that contains the enterprise Rulesets for Loan Market.
  3. After saving the Application Definition, on the Profile feature of the Operator menu, confirm that Rulesets for each module are now displayed between your implementation Rulesets and your enterprise Rulesets.
    Rulesets from modules are shown between implementation layer Rulesets and enterprise layer Rulesets.
  4. In the navigation pane of App Studio, click Library.
    The data objects tab in the App Studio library.
  5. Add the following data objects to your application:
    1. Customer
    2. Lender
    3. Loan Product
    4. Vehicle Variant
      Using the App Studio Library to add a data object to the application.
      Tip: Prefer using the Library in App Studio to other paths for adding data classes to the application. When you use this path, the system automatically creates these Rule for DataObject instances that App Studio needs to show these data objects.
  6. In the navigation pane of App Studio, click Overview, and then in the Application Layers section, confirm that the Finance Network, Vehicle, and Customer modules are displayed between the enterprise and implementation layers.
    Click Load More to show the full list of all Application Layers.
    The application stack for the Loan Marketplace application.
  7. In the navigation pane of App Studio, click Data, and then confirm that the additional four data objects are now shown in your application.
  8. Enter the Preview mode of App Studio.
    Caution: In the user portal, is the Create menu not displayed?
    • If you cannot see any Cases to create, then proceed to Step 9.
    • If you continue to see an option to create a Customer Intake Case, then jump to the Tip and Note at the end of this task to proceed.
  9. Exit Preview mode.
  10. In the navigation pane of App Studio, click Channels, and then click Work Portal.
  11. In the Main navigation pane, in the Create menu section, add the Customer Intake Case Type.
  12. Click Save for the Channel Rule.
    Channel Rules do not auto-save.
  13. Return to Preview mode, and then confirm that:
    1. The Create menu is displayed
    2. The Customer Intake Case Type is available to start.
Caution: If the Create menu still does not display in the user portal, then log out, log in, and try again.
Tip: In a Constellation application, a user can only create Cases for the Case Types that developers configured in the Channel of the user. If different Personas must create Cases of a different combination of Case Types, then create a distinct Channel for each of these Personas.
Note: Channel is a modern term for Portal, and the Portal Rule records its configuration. For Constellation applications, the Channel must undergo configuration on the Channels landing page in App Studio.

Personas are very closely related to Access Groups. Personas represent groups of users who use an application in the same way. Continue to assign an Access Group to each of its Operators. Map the Channel that each Persona requires when configuring its Access Group. 

2 Configure the Choose Provider Product Step

Business outcome

Let the applicant choose the Loan Product from a recommended list that matches their needs.

Data Model

The Customer Intake Case Type requires a Selected Product field: a data reference to a single Loan Product record.

  1. In the Customer Intake Case Type, click the Data Model tab.
  2. Add the following new field:
    1. In the Field Name field, enter Selected Product.
    2. In the Type list, select Data reference.
    3. In the Data object list, select Loan Product.
    4. In the Options section, select Single record.
      Adding the Selected Product field to the Case Type Data Model.
    Tip: Before saving, expand the Advanced section of a data reference field. A data reference is always bound to a single-page Data Page that receives the primary key of its data object as a parameter. The data reference must be assured to supply your Case Type with a single record of the data object using its key, if one exists.
    The Advanced tab of a data reference field.

View configuration

  1. Ensure that you have performed steps 1-2 from the earlier Data Model procedure to create the Selected Product field.
  2. Click the Choose Provider Product Step, which is the third Step in the Provider Suggestion Stage, and then click Configure this View.
  3. Add the Selected Product field to the View.
    Remember that the business outcome for this Case Type Step is to capture Loan Product for this Case.
    Note: Further to what you learned in the Authoring a new Constellation application challenge when using Embedded Data fields, you can also click into data reference fields to capture the user interface configuration needed.
  4. In the Fields list, click Selected Product.
    Tip: Use the following figures to compare how the View configuration options differ between data references and Embedded Data fields configured in the Authoring a new Constellation application challenge. One important difference is that the user experience for selecting a referenced record must enable the user to choose one record from a list of appropriate records.

    Constellation and App Studio guide the author through a wizard to quickly configure the most appropriate user experience:
    • What list to give the user?
    • How to display the list?
    • What fields should the list include to help the user make their choice?
    Embedded Data (single record)
    View configuration
    Data reference (single record)
    View configuration
    Configuring the user experience for capturing Embedded Data.

     

    Configuring the user experience for capturing a data reference.
  5. In the Display as list, select Table.
  6. In the Data Page list, select List Loan Product by Loan Purpose.
    The Finance Network module supplies this Data Page to provide a list of applicable Loan Products.
    Your earlier configuration shows these Loan Products in a table.
  7. Wire the Loan Purpose that you captured on the first workflow Step into the LoanPurpose parameter of the Data Page.
  8. Add the following fields to the Columns of the table that users see:
    1. Loan Purpose
    2. Product Name
    3. Interest Rate
    4. Loan Term (Years)
    5. Repayment Schedule
  9. Save the workflow because you added a new View configuration to a workflow Step.

At any time while working on the Case, a Case worker must observe the Loan Product selected for the Case.

  1. On the Full Page View for Customer Intake, add a tab named Selected Product.
  2. Add the Details View that is available on the Loan Product data object to show the full details about both the Selected Product and the Lender that provides it.
    Configuring the Selected Product tab for the Customer Intake Full Page View.

3 Configure the Capture Asset Details Step

Business outcome

Let the applicant select the house or vehicle that they intend to purchase using the funds advanced from any successful loan.

Data Model

Fulfill the business outcome using a field named Intended Vehicle: a data reference to a single Vehicle Variant record.

Vehicle Variant is a data object supplied from the Vehicle module that you added to the Loan Marketplace application.

View configuration

  1. In the Provider Suggestion Stage of the Customer Intake Case Type, click the Capture Asset Details Step, and then click Configure view.
  2. Add a field group to the View:
    1. In the Heading field, enter Intended Vehicle.
    2. In the Instructions list, select Show instructions.
    3. In the Instruction Text field, enter Search and Select the vehicle that you intend to buy if this loan is successful, then make Search and Select bold.
    4. Click Submit.
  3. In the new Intended Vehicle field group, click Add to embed a new field into the field group.
    Note: The Data Model required to fulfill this business outcome does not yet exist.
  4. In the Fields section of the field group, click Create new field
  5. Configure the new field:
    1. In the Name field, enter Intended Vehicle.
    2. In the Type list, select Data reference.
    3. In the Data Object list, select Vehicle Variant.
    4. In the Options section, select Single record.
    5. In the Advanced section, in the Data Page list, select Vehicle Variant.
    6. In the Parameters section, in the pyGUID list, select Field in target.
    7. In the second list, select Globally unique ID.
    Tip: You have just added a field to the Case Type Data Model on demand. As a best practice, consider the Data Model as a prerequisite, and then commence View configuration. Following the best practice:
    • Avoids creating many fields in the Data Model of a Case Type.
      For example, Customer Name, Customer Email, and Customer Phone.
    • Promotes encapsulation fields in an embedded or referenced data object.
      For example, Name, Email, and Phone fields on a Customer data object, which a Case Type can then reference.
  1. In the field group of the View, click the Intended Vehicle data reference field.
    A similar data reference (single record) configuration pane is displayed as in Task 1 of this challenge.
    Caution: It looks like there is a problem here.

    There are no Vehicle Variant Data Pages listed to supply the user with a list of Vehicles to choose from. This problem did not happen with Loan Product, but the Vehicle module developer assures you that list-style Data Pages exist, which "should be showing up."

    In the Self-discovering and troubleshooting Constellation behavior challenge, you learn the Constellation troubleshooting techniques that can help you identify the root cause of this issue, and then fix it.
     
    Intended Vehicle View configuration which shows no Data Pages available for selection.
  2. Click Back to return to the View configuration of the Case Step.
  3. Click Add to add a distinct field group to the View.
    1. Name the new field group Intended House.
    2. Add your choice of instructions to the field group.
    3. Add the existing Intended House field to the field group.
    4. In the row for the the Intended House field, click the Gear icon, and then select the Show Map checkbox.
    Note: The Show Map option is specific to Location field types.
  4. Submit the View configuration.
  5. Click Save.
Caution: When you save the View with Show Map activated on the Location field, the authoring preview might suggest that there is an error loading the map. This error occurs only during authoring; the map feature behaves as expected for users.
The Capture Asset Details Step showing a field group for each of the Intended House and Intended Vehicle of the Case.

4 Build the blocks, then assemble the blocks

Build the blocks in Dev Studio, and then assemble the blocks in App Studio

As the loan is only intended for exactly one house or vehicle, the value of the Loan Purpose field must drive the conditional visibility of each field group.

  1. In Dev Studio, author two When Rules on the Customer Intake work class by using the configuration shown in the following table:
    Label Identifier Condition
    Is a House Loan IsAHouseLoan Loan Purpose = "House"
    Is a Vehicle Loan IsAVehicleLoan Loan Purpose = "Vehicle"
  1. On the Actions menu of both When Rules, select Mark as Relevant Record.
    Tip: Rules created in Dev Studio that need to be available for App Studio authors to use need to be marked as relevant records.

    This presents a sensible number of Rules to low-code authors while also empowering developers to implement sophisticated, reusable functionality. This functionality can be packaged as Flows, Data Transforms, and When Rules.
  2. In App Studio, open the Capture Asset Details View, and then configure conditional visibility on each of the field groups using the corresponding When Rule.
    The Intended Vehicle field group is conditionally visible when the Case is for a Vehicle loan.
    The Intended House field group is conditionally visible when the Case is for a House loan.
Tip: It is important to use meaningful, business-friendly labels on Rules created in Dev Studio to make them easy for App Studio authors to use.

In App Studio, the label of the Rule distinguishes it from other candidates, not its identifier.

5 Search and select multiple guarantors

Business outcome

Let the applicant choose multiple existing Loan Market customers to become the guarantors of their loan.

Data Model

The Customer Intake Case Type requires a Guarantors field: a data reference to a list of Customer records.

  1. Using what you have learned earlier in this challenge, add a new Guarantors field to the Data Model of the Customer Intake Case Type, and then configure it to reference a list of records.

View configuration

  1. On the UX tab of the Customer Intake Case Type, open the Capture Applicant Details form View.
  2. Add the Guarantors field that you created in the earlier Data Model instructions to the field list, and then modify the configuration:
    1. In the Mode list, select Multi-select.
      Multi-select is needed because the business outcome must allow multiple customers to become guarantors.
    2. In the Display as list, select  Table.
    3. In the Data Page list, select List Customer.
  3. In the Columns list, select the following fields:
    1. First name
    2. Last name
    3. Date of birth
    4. Email address
  4. In the Sort by list, select the following fields:
    1. First name
    2. Last name
  5. Click Preview, and then create a Customer Intake Case.
  6. Proceed to the second Step, and then experiment with the Guarantors table.
  7. Confirm the following details:
    1. The primary and secondary sorting criteria.
    2. The indicators in the table header to clarify sorting order and precedence.
    3. The user-friendly display of the date.
    4. The actionable email address.
    5. The checkbox column that enables the capture of multiple selections.
  8. Experiment with the filtering options available on each column.
    Note: The filtering options for a date field differ from those for text-based fields.
     
    The filtering options available for date fields.
    The filtering options avaliable for text-based fields.
    Caution: The customer result set has 97 entries.

    If there were 97 million customers, would gathering all customer candidates be a good user experience?
  9. Exit the Preview, return to the Capture Applicant Details View, and then reconfigure the Guarantors inner View:
    1. In the Display as list, select Advanced Search.
    2. Add a "Search for" category named Guarantor Search.
  10. Click on the Guarantor Search item to configure its behavior:
    1. In the Data Page list, select List Customer.
    2. Add a new Search Group, and then label it Customer Name.
  11. Use the Add icon to add the following fields to the Customer Name search group:
    1. First Name
    2. Last Name
  12. In the Guarantor search configuration, add the following fields to the Columns section:
    1. First Name
    2. Last Name
    3. Date of Birth
    4. Email Address
  13. In the Guarantor search configuration, add the following fields to the Sort by section:
    1. Last Name, and then select a sort order of Ascending.
    2. First Name, and then select a sort order of Ascending.
      Configuring the Guarantors View to include a Guarantor search category
      The View configuration of the Guarantor search category.
      Note:
      Did you just see some buttons display in the preview?
       
      Advanced search view configuration includes buttons on the preview.
  14. Add a Guarantors tab to the Full Page View that shows the guarantors selected for the Case in a table.
    You select which columns to show.
  15. Optional: Investigate what is involved to show the number of guarantors selected on the Case as a badge on the Guarantors tab, and then decide what Studios are best to complete the task.
    The Guarantors tab on the Full Page View showing the number of guarantors in a badge.


If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

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