You are on page 1of 9

Source the 

D_CreditReport data page with the CheckCredit connector


1. Open the D_CreditReport data page.
2. On the Credit report data page, click the Definition tab to view the data sources.

3. Under Data sources, disable data simulation.

4. Below the Request Data Transform field, click Parameters to verify that Pass current parameter page is selected to ensure that the
TIN (Tax identification number) is passed to the request data transform.

5. Below the Response Data Transform field, click Parameters to verify that Pass current parameter page is selected to ensure that the
Case ID is passed to the response data transform.

6. Save the D_CreditReport data page.


Create reusable error handling data transform
1. Open the standard pxErrorHandlingTemplate data transform.
2. Create a copy of the pxErrorHandlingTemplate data transform called ErrorHandlingMaster.
3. On the Parameters tab, define a parameter named pyCaseID for the case ID and mark the parameter as required.

4. On the Definition tab, right-click step number 2 and select Enable to get messages using the pxGetPageMessagesfunction.

5. On step number 4, right-click and select Enable to enable the step to use the pxClearMessages function to clear the messages on the
data page before adding your custom error message.
6. On step number 6, right-click and select Enable to use the pxAddMessageToPage function and add the ErrorMessage input parameter
as a message.

7. On step number 8, right-click and select Enable to use the pxLogMessage function to write messages in the log file.

8. In the Source field of step 8, Enter @(Pega-RULES:Default).pxLogMessage(param.getMessage + " for case number " + param.pyCaseID).

You always need to specify a target, even if the function does not return anything or if you are not interested in the response.

9. Save the ErrorHandlingMaster data transform.

Configure the CreditCheckResponse data transform with ErrorHandlingMaster


1. From D_CreditReport data page, open the CreditCheckResponse data transform.
2. Right-click step 2 and select Enable to ensure that the pxDataPageHasErrors when rule is invoked to check for errors.
3. Configure the CreditCheckResponse data transform to apply the ErrorHandlingMaster data transform if an error occurs.
4. Click the Gear icon to specify the input parameters for the ErrorHandlingMaster data transform.

5. In the pyCaseID input parameter field, enter param.CaseID.


6. Save the CreditCheckResponse data transform.

Configure an error message in UI


1. In Application Explorer, under Candidate case type expand the User Interface > Section and click BackgroundCheck_0 section to
open BackgroundCheck_0 section rule.
2. Click Section - Credit report to open the BackgroundCheck_0_CreditReport section rule.
3. From the Basic menu, select Label field and append it in the dynamic Layout.

4. Next to the new label field, click the Gear icon to configure the open the cell properties for the new label.

5. Use the following information to complete the General form.

Property Value

Value Credit Check unavailable: contact your system administrator


Visibility Condition (when rule)

Condition for visibilty hasMessages

6. Click the Presentation tab, and in the Label format field, select Error Message.

7. Save the BackgroundCheck_0_CreditReport section rule.

Verify your work


Simulation might be enabled if you completed the Configuring data access patterns exercise prior to this exercise. Disable simulation for
the CreditCheck connector before you proceed.

1. From the Case Manager portal, begin a Candidate case.

2. Complete the Submission stage (Collect Personal Details, Collect Professional Details, Collect Educational Details and Collect a Work
Sample views).

You can specify any values to complete the steps. They do not impact this exercise.

3. From Actions menu, select Conduct phone screen to open the conduct phone screen view.
4. In the Conduct screen view, click Submit to advance the case to Approval assignment.
5. From the Actions menu, select Approval.
6. In the Approval view, click Approve to advance the case to Background check assignment.
7. From Actions menu, select Background Check to start the Background Check.

8. The message Credit Check unavailable: contact your system administrator on you screen indicates the system executed the error
handling data transform.

9. In Dev Studio, from Configure menu, Navigate to System > Operations > Logs to open the logs of the system.

10. Click Log files to open the all logs window.

11. Click PegaRULES.log to open the PegaRules log.


12. Scroll the log file to the end to the see more details on error message.

To see the error, you can search the log file with Case ID.

You might also like