Validating data in Dev Studio
2 Tasks
10 mins
Scenario
GoGoRoad customers with Standard coverage provide credit card information during the Submission Stage of an Assistance Request Case to pay for services performed by the company. To reduce the chance of an error when processing the credit card information, stakeholders want to validate the credit card information provided by customers.
A senior developer created an edit Validate Rule named IsDigit to verify that a credit card number contains only numbers. Configure a Validate Rule for the Enter Payment Information Step to validate entries in the Card number field by applying the IsDigit edit Validate Rule and entries in the Expiration date field by applying the EnterPaymentInformation Validate Rule.
The following table provides the credentials you need to complete the challenge.
Role | User name | Password |
---|---|---|
Application Developer | author@gogoroad | pega123! |
Note: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.
Challenge Walkthrough
Detailed Tasks
1 Configure the Validate Rule
- In the Pega instance for the challenge, enter the following credentials:
- In the User name field, enter author@gogoroad.
- In the Password field, enter pega123!.
- From the navigation pane in Dev Studio, click App to open the App Explorer.
- In the App Explorer, right-click AssistanceRequest and click Create > Process > Validate to create a Validate Rule.
- In the Label field, enter Validate card information.
- Click Create and open to accept the remaining default settings and display the Validate Rule form.
- In the Property field, enter or select .PaymentInformation.CardNumber to apply the Validation Condition to the credit card number entered by the user.
- Under Conditions, click Add to display the Validation Conditions window.
- In the Select a function field, select Validation of [Property Name] using [Edit Validate Name] fails. The window updates to display two fields below the Select a Function field.
- In the Validation of field, enter or select .PaymentInformation.CardNumber as the property to test.
- In the using field, enter or select IsDigit as the edit Validate Rule to test.
- In the Message field, enter Credit card number contains an invalid character.
- Click Submit to complete the configuration of the Validation Condition.
- To the right of Additional Validation, enter or select EnterPaymentInformation to ensure the entered expiration date is before today.
- Click Save to complete the configuration of the Validate Rule.
2 Apply the Validate Rule to the Enter Payment Information Flow Action
- In the App Explorer, expand AssistanceRequest > Process > Flow Action and click EnterPaymentInformation to open the Enter payment information Flow Action.
- On the Flow Action Rule form, click the Validation tab to apply a Validate Rule when processing the Flow Action.
- In the Validate field, enter or select ValidateCardInformation to apply the Validate Rule you configured.
- Click Save to complete the configuration of the Flow Action.
Confirm your work
- In the header of Dev Studio, click Create > New > Assistance Request to create a new Case.
- In the Enter customer information Step, select [email protected] as the Account ID.
- Advance the Case to the Enter payment information Step, entering information as required.
- In the Card number field, enter 1234567890ABCDEF.
- In the Expiration date field, enter a date that is in the past.
- Click Submit, and then confirm that validation of the fields fails and error messages are displayed on the Card number and Expiration date fields.
- In the Card number field, enter 1111222233334444.
- In the Expiration date field, enter a date that is in the future.
- Click Submit, and then confirm that the Case advances to the next Stage.
This Challenge is to practice what you learned in the following Module:
Available in the following missions:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?