If .request.body_POST is a page, then try setting a dummy property with the value "inputRequests=" and check the generated JSON and if its a pagelist then try adding a dummy first page with dummy property with the value "inputRequests=" and check the generated JSON.
If the generated JSON contains the dummy property name then try using the dummy property name as "inputRequests" with the property value as "="
I am not sure if this works or not but I think its worth to give a try.
Posted: 5 years ago
Posted: 15 Feb 2016 13:28 EST
Phani Sahukaru (sahup1)
Architect - Financial Services
I'm afraid the only option you have is to write custom Java. You cannot use Map from as JSON for your requirement. You need to source your request from a single-value Clipboard property. Look at my response on this mesh post. https://mesh.pega.com/thread/54852?start=15&tstart=0
You need to invoke the underlying Java API to get your page content in JSON format and dump that JSON into a property and then add the prefix inputRequests=. Use this property as the Map from key with Map from as Clipboard on the request tab of your Connect REST rule.
Are you able to map from Clipboard property (New property on Request Class, e.g. FormattedJSONPOSTBody)
As part of your pre mapping, set FormattedJSONPOSTBody = "inputRequests=" + <JSON Encoded body_POST>
There was a recent discussion on Product Support that outlined a specific method to use to Encode to JSON incorporating the Property Qualifiers, however I'm unable to find at present; as a quick test using ClipboardPage.getJSON() should work.