Skip to main content

Configuring error handling for Data Pages

1 Task

15 mins

Visible to: All users Applies to: Pega Platform '26
Intermediate
Data Integration
Data Management
English

Scenario

You are a Solution Builder working on TGB's HRApps application. As part of each Candidate Case, TGB performs a background check on the applicant. During the background check, a SOAP connector retrieves a credit report from a credit check provider. If the connector fails, TGB wants to log an error message in the PegaRULES log file and display the message Credit Check unavailable: contact your system administrator to the user.

You will configure the D_CreditReport Data Page to use the live connector, create a reusable error-handling Data Transform, wire it into the response pipeline, and surface the error message as a read-only field in the Background Check View.

Note: This challenge has been configured with Single sign-on (SSO) using your Pega Academy credentials. If you are not automatically signed-in to the challenge environment after initializing the instance, you may use the credentials provided.

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

Role User name Password
Solution Builder SSA@TGB pega123!

After completing this challenge, you should be able to: 

  • Configure a Data Page to use a live connector with simulation disabled.
  • Create a custom error-handling Data Transform by copying a system template.
  • Configure a response Data Transform to invoke error handling.
  • Display a conditional error message field in a Case View.

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 Configuring error handling for Data Pages

Solution Builder Advanced Configuring error handling for Data pages Doc Journey

Use the technical documentation linked in the Journey map above to complete the assigned tasks. The technical documentation might have more information than you need to complete the tasks.

Acceptance criteria

Task 1: Source the D_CreditReport Data Page

  • The D_CreditReport Data Page data source is set to use the CreditCheck connector with Use simulation disabled.
  • Pass current parameter page is enabled for the Request Data Transform to ensure the TIN is passed to the request.
  • Pass current parameter page is enabled for the Response Data Transform to ensure the Case ID is passed to the response.

Task 2: Create the ErrorHandlingMaster Data Transform

  • A copy of the pxErrorHandlingTemplate Data Transform is saved to the TGB class in the current application Ruleset, named ErrorHandlingMaster.
  • pyCaseID is added as a required parameter for the Case ID.
  • The following steps are enabled on the Definition tab:
    Step Function Purpose
    2 pxGetPageMessages Gets messages from the Data Page
    4 pxClearMessages Clears messages on the Data Page before adding a custom error message
    6 pxAddMessageToPage Adds the ErrorMessage input parameter as a message
    8 pxLogMessage Writes messages to the PegaRULES log file
  • Step 8 Source is set to: @(Pega-RULES:Default).pxLogMessage(param.getMessage + " for Case number " + param.pyCaseID)

Task 3: Configure the CreditCheckResponse Data Transform

  • A copy of the CreditCheckResponse Data Transform is saved to the current application Ruleset.
  • Step 2 is enabled to invoke the pxDataPageHasErrors When Rule to check for errors.
  • Within Step 2, pxErrorHandlingTemplate is replaced with ErrorHandlingMaster, with pyCaseID mapped to param.CaseID.
  • Step 2.3 is configured as follows:
    Field Value
    Target .CreditCheckError
    Source "Credit Check unavailable: contact your system administrator"

Task 4: Add the CreditCheckError field to the Background Check View

  • In the Candidate Case Type, the CreditCheckError field is added to the Credit report View within the Background Check View as Read-only.
  • The CreditCheckError field visibility is set to If not blank.

Directions

  1. Open the D_CreditReport Data Page, disable data simulation, and enable Pass current parameter page for both the Request and Response Data Transforms as detailed in the Acceptance criteria.
  2. Save your changes.
  3. Open the pxErrorHandlingTemplate Data Transform and save a copy named ErrorHandlingMaster to the TGB class in the current application Ruleset.
  4. Add the required pyCaseID parameter, enable steps 2, 4, 6, and 8, and set the Step 8 Source as detailed in the Acceptance criteria.
    Error handling data transform definition list
  5. From the D_CreditReport Data Page, open the CreditCheckResponse Data Transform and save a copy to the current application Ruleset.
  6. Enable Step 2, replace pxErrorHandlingTemplate with ErrorHandlingMaster, map pyCaseID to param.CaseID, and configure Step 2.3 as detailed in the Acceptance criteria.
  7. Open the Candidate Case Type, navigate to Other Views > Background Check, and open the Credit report View.
  8. Add the CreditCheckError field as Read-only with visibility set to If not blank as detailed in the Acceptance criteria.
  9. Save your changes.


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