Question
Toyota Financial Services
AU
Last activity: 7 Aug 2024 20:27 EDT
DXAPI V2 - Data resource - create a data record - Validation requirement
Hi,
Requirement: Insert the record into the PEGA data table via API.
Approach: Leverage the DXAPI V2 data resource with a savable data page data view to save the data.
{{baseUrl}}/data/:data_view - POST Method
Problem: This resource uses an Automation Activity that invokes the Engine API code. It mentioned it validates the incoming request.
My requirement is to have explicit mandatory and enum checks on the incoming request data.
Do we have any extension point to explicitly call the validation rule?
Approach #1: In the savable data page, tried with the Activity as the Save Plan.
- Invoke the validation rule
- Tried to set the Automation Errors using the JAVA step/ Call pzSetAutomationErrors activity
- In this savable data page activity, automation errors parameter page context is not available =
Result: Getting 500 internal server error. Expectation - 422 Validation error
Hi,
Requirement: Insert the record into the PEGA data table via API.
Approach: Leverage the DXAPI V2 data resource with a savable data page data view to save the data.
{{baseUrl}}/data/:data_view - POST Method
Problem: This resource uses an Automation Activity that invokes the Engine API code. It mentioned it validates the incoming request.
My requirement is to have explicit mandatory and enum checks on the incoming request data.
Do we have any extension point to explicitly call the validation rule?
Approach #1: In the savable data page, tried with the Activity as the Save Plan.
- Invoke the validation rule
- Tried to set the Automation Errors using the JAVA step/ Call pzSetAutomationErrors activity
- In this savable data page activity, automation errors parameter page context is not available =
Result: Getting 500 internal server error. Expectation - 422 Validation error
Approach #2: In the savable data page, tried with the Database Save as the Save Plan. Getting 500 internal server error. Expectation - 422 Validation error
- Pass the validation rule
Result: Getting 500 internal server error. Expectation - 422 Validation error
Appreciate, anyone recommends a different approach in leveraging this DX API V2 - data resource - To validate the incoming data.
Thanks
Sandeep P V