Hi Team, Can you please help me on how to save rest(connect and service) request and response details into internal pega db. please help me on this
Connect rest req and res into pega db
Hello nvbreddy005
Get your Service Rest (or) Connect Rest request and response value as parameter. Then save the parameter into some dedicated table which you want (Initialize the parameter value to needed column in table)
In Pega we will be having function which will convert Request (or) Response page structure to JSON, by using function get your request or response value as parameter.
Thanks for the update, Usually for soap service we can add the step in invokeaxis2 activity like adding Param.Request parameter to save the xmlrequest. But for rest connector where we need to set exactly this Param.Request step to save the req and res values.
- Edited
nvbreddy005
Invokeaxis2 should never be touched for our application need.
Please see if you can have a reusable activity (irrespective of the service) to persist the request and response into table and use the below function to get the JSON of your service page to structure the request & response JSON.
@(Pega-RULES: Page).pxConvertPageToString(tools, myServicePage, "json") .
Call the re-usable activity from your service activity or wherever required.