Challenge
Adding data references to your Constellation application
Adding data references to your Constellation application
5 Tasks
1 hr
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! |
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.
- In your challenge instance, click Launch Pega Infinity, and then enter the following credentials:
- In the User name field, enter AppCreator@LMKT.
- In the Password field, enter pega123!.
- In Dev Studio, add the following applications to your Loan Marketplace application so that they are higher on the application list than LMKTEnt:
- FinanceNetwork:01.01
- Vehicle:01.01
- Customer:01.01
Note: LMKTEnt is the application that contains the enterprise Rulesets for Loan Market.
- After saving the Application Definition, on the Profile feature of the menu, confirm that Rulesets for each module are now displayed between your implementation Rulesets and your enterprise Rulesets.
- In the navigation pane of App Studio, click Library.
- Add the following data objects to your application:
- Customer
- Lender
- Loan Product
- Vehicle Variant
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.
- 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. - In the navigation pane of App Studio, click Data, and then confirm that the additional four data objects are now shown in your application.
- 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.
- Exit Preview mode.
- In the navigation pane of App Studio, click Channels, and then click Work Portal.
- In the Main navigation pane, in the Create menu section, add the Customer Intake Case Type.
- Click Save for the Channel Rule.
Channel Rules do not auto-save. - Return to Preview mode, and then confirm that:
- The Create menu is displayed
- The Customer Intake Case Type is available to start.
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.
- In the Customer Intake Case Type, click the Data Model tab.
- Add the following new field:
- In the Field Name field, enter Selected Product.
- In the Type list, select Data reference.
- In the Data object list, select Loan Product.
- In the Options section, select Single record.
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.
View configuration
- Ensure that you have performed steps 1-2 from the earlier Data Model procedure to create the Selected Product field.
- Click the Choose Provider Product Step, which is the third Step in the Provider Suggestion Stage, and then click .
- 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. - 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 configurationData reference (single record)
View configuration - In the Display as list, select Table.
- 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. - Wire the Loan Purpose that you captured on the first workflow Step into the LoanPurpose parameter of the Data Page.
- Add the following fields to the Columns of the table that users see:
- Loan Purpose
- Product Name
- Interest Rate
- Loan Term (Years)
- Repayment Schedule
- 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.
- On the Full Page View for Customer Intake, add a tab named Selected Product.
- 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.
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
- In the Provider Suggestion Stage of the Customer Intake Case Type, click the Capture Asset Details Step, and then click .
- Add a field group to the View:
- In the Heading field, enter Intended Vehicle.
- In the Instructions list, select Show instructions.
- 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.
- Click Submit.
- 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.
- In the Fields section of the field group, click .
- Configure the new field:
- In the Name field, enter Intended Vehicle.
- In the Type list, select Data reference.
- In the Data Object list, select Vehicle Variant.
- In the Options section, select Single record.
- In the Advanced section, in the Data Page list, select Vehicle Variant.
- In the Parameters section, in the pyGUID list, select Field in target.
- 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.
- 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.
- Click Back to return to the View configuration of the Case Step.
- Click Add to add a distinct field group to the View.
- Name the new field group Intended House.
- Add your choice of instructions to the field group.
- Add the existing Intended House field to the field group.
- 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. - Submit the View configuration.
- Click Save.
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.
- 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"
- On the 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. - 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.
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.
- 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
- On the UX tab of the Customer Intake Case Type, open the Capture Applicant Details form View.
- Add the Guarantors field that you created in the earlier Data Model instructions to the field list, and then modify the configuration:
- In the Mode list, select Multi-select.
Multi-select is needed because the business outcome must allow multiple customers to become guarantors. - In the Display as list, select Table.
- In the Data Page list, select List Customer.
- In the Mode list, select Multi-select.
- In the Columns list, select the following fields:
- First name
- Last name
- Date of birth
- Email address
- In the Sort by list, select the following fields:
- First name
- Last name
- Click Preview, and then create a Customer Intake Case.
- Proceed to the second Step, and then experiment with the Guarantors table.
- Confirm the following details:
- The primary and secondary sorting criteria.
- The indicators in the table header to clarify sorting order and precedence.
- The user-friendly display of the date.
- The actionable email address.
- The checkbox column that enables the capture of multiple selections.
- Experiment with the filtering options available on each column.
Note: The filtering options for a date field differ from those 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? - Exit the Preview, return to the Capture Applicant Details View, and then reconfigure the Guarantors inner View:
- In the Display as list, select Advanced Search.
- Add a "Search for" category named Guarantor Search.
- Click on the Guarantor Search item to configure its behavior:
- In the Data Page list, select List Customer.
- Add a new Search Group, and then label it Customer Name.
- Use the icon to add the following fields to the Customer Name search group:
- First Name
- Last Name
- In the Guarantor search configuration, add the following fields to the Columns section:
- First Name
- Last Name
- Date of Birth
- Email Address
- In the Guarantor search configuration, add the following fields to the Sort by section:
- Last Name, and then select a sort order of Ascending.
- First Name, and then select a sort order of Ascending.
Note:
Did you just see some buttons display in the preview?
- 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. - 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.
Want to help us improve this content?