Support Article
Connect-REST fails when query string parameter is blank
SA-51095
Summary
In Pega 7.3.1, Connect-REST calls fail when query string parameters have a blank value.
The application generated HTTP request URL includes query string parameters along with the blank values.
However, in Pega 7.1.8, the system skipped or omitted the query string parameter from the generated HTTP request URL if the value was a blank.
Error Messages
Not Applicable
Steps to Reproduce
- Create a Connect-REST Integration in Pega 7.3.1 with some query parameters.
- In the calling activity, do not set any value from some query string parameters and set values for some of query string parameters.
- In the generated HTTP URL, include both types of query string parameters (that is, query string parameters without any value are included with null value and query string parameters with values assigned are included with their actual value).
Root Cause
A backwards compatibility defect in Pegasystems’ code or rules.
In later versions of the application, a pySkipBlankQueryParts parameter is introduced in the pxDereferenceEndpoint activity rule which handles or controls the behavior of the query string that is formed when there are blank request parameter values.
The activity rule which invokes the Connect-REST should set the above mentioned activity parameter’s (pySkipBlankQueryParts) value to True to skip query string parameters with empty or blank values from the resulting query string. If this parameter is set to false (default value is false), then the resulting query string includes query string parameters with blank values.
Resolution
Perform either of below local-changes:
- Set the value of the pySkipBlankQueryParts input parameter to True in the calling activity rule just before the step invoking the Connect-REST method.
- Use the below sample code in a Java step to set pySkipBlankQueryParts' parameter value to True in the Parameter page before calling the Connect-REST rule.
ParameterPage pp = tools.getParameterPage();
pp.putString("pySkipBlankQueryParts", "true");
Published September 22, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.