PRPC Rest Webserivces returns invalid JSON Response
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
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.
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.
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.
0% found this useful