Posted: 20 May 2016 9:39 EDT Last activity: 16 Aug 2016 14:21 EDT
Outgoing JSON payload adds Pega Class name qualifiers (pxObjClass)
Outgoing connect calls from Pega using JSON format for its payload injects pxObjClass in the payload. For non-Pega downstream systems this information adds no value, increases pay load size and processing time (CPU time). There is not easy way to exclude this from payload other than doing another string manipulation before sending the payload down the wire. We are looking at requesting an enhancement in PRPC integration layer to make the appearance of pxObjClass in the outgoing payload that will allows payload better Pega endpoints to take advantage of class qualified data and tunr it off while sending the same payload to other non-pega downstream systems.
Great topic!! Thanks for the post. We are running into the similar issue. From our application, we are using REST connector to post a request with around 1500 properties and we can atleast 250+ occurrences of pxObjClass on the JSON payload. This definitely will have an impact on the processing time and the data that gets transmitted over the network especially for the applications that deal with processing higher number of transactions in a given day.
Since pxObjClass is of no significance to the non-PRPC applications. I suggest the product to provide an option to turn-off the pxObjClass from appearing in the generated JSON payload.
Are either of you using the getJSON API for the request being formulated? Provide screenshots of Connect-REST request (showing header, query string parameters and message data). It is possible you will find what you want using "Map From JSON" functionality.
My assumption is that the connector is sending a JSON string value that has been generated from a clipboard page using one of the getJSON methods of the ClipboardPage API. If the mapping were being done in the connector rule itself (using the JSON drop-down option in the Map From field), the pxObjClass tag/value pairs would be extracted when the JSON string is converted.
We were using the pxConvertPageToString function with the "json" argument to return a parameter to the Connect-REST. This function seems to remove all properties that are not initialized (requirement) but includes the pxObjClass property. When I change the Connect-REST to "Map From JSON" I need to supply a "Map from key". When I specify the clipboard page as this key, I see that it has removed the pxObjClass property but now produces all of the un-initialized properties that I don't want.
Is there a different way to specify the "Map from" so that I do not get the pxObjClass property OR the properties that are blank?
To do this yourself you could write a recursive utility function that stripped the pxObjClass value from the page and the pages embedded within it before converting it to JSON. However, I'm concerned about your assertion that the REST JSON mapping adds content for uninitialized properties. Seems like something you should raise as a support request with Customer Support.