Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

PRPC Rest Webserivces returns invalid JSON Response

SA-19640

Summary




User had created two REST Services (Loadresponses,GetLoadResponsesStatus) that invokes decision data flows.
The output of these services is captured as a JSON object. When there are values for all the properties, then the generated JSON object is a valid object.
However,there are certain properties like pyNRecordsOut,pyNRecordsOut for the data flows which are returning '--' in some scenarios.

Following is an example

"pyStageMetrics": [
 {
 "pyNRecordsOut":——,
 "pyAvgTime":"——",
 "pyDataFlowName":"LoadResponsesAdhoc",
 "pyDataFlowClass":"BG-NGD-Data-ChannelResponses",
 "pyAvgTimePct":"——",
 "pyDataFlowStageName":"NGDChannelResponses",
 "pyNRecordsIn":——,
 "pyNRecordsFailed":——,

 "pyDataFlowStageId":"Source",
 "pyType":"Source",
 "pyWorkObjectID":"DF-2"
 },
 


Error Messages



Not Applicable.


Steps to Reproduce



1. Create a Service REST rule.
 2. In the GET Method, define an activity that in-turn executes ootb pxLoadProgress activity to get hold of Progress page.
 3. In the GET Response section, for Message Data, use "Map from" as JSON and "Map from key" to a page property that holds the above Progress page.
 4. Use SoapUI to fire requests to this service and inspect the returned JSON response.

If the request is fired when the Data Flow execution is initializing then the pyStageMetrics page is created with default values where some of them are numeric properties but the default is set as non numeric character.


Root Cause



The DataFlowProgress page is currently used only for showing the progress in the UI. User is building a custom monitoring system using curl to track the progress of Data Flow execution. Issue occurs at initial data flow execution preparation stage when the metrics are not yet built and set to defaults.

Resolution



Delay the invocation of REST requests after the Data Flow is started to run, so that the data flow progress page metrics are built up with some values.

 

Published February 15, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us