My requirement is to connect to third party system URL through proxy using REST-Connector. This is only needed for few REST-Connectors in our application not all. Is there any way to enable proxy other than doing the changes at JVM level where Pega is running because we don't want all the REST-Connectors to pass through this proxy.
For SOAP-Connector we can follow the steps mentioned in the below link but what about REST-Connector?
1. You can add resource parameters for the proxyHost and proxyPort on the specific Connect-REST rules
2. Override the pyInvokeRESTConnector activity rule into your application ruleset.
3. In the Java step where we check read the proxyHost and port from JVM System property, add a check just before the logic to look for proxyHost and proxyPort resource parameters from the pyResourceParameters Map (as below) and if not null set the values accordingly.
final java.util.Map resourceParamValsMap = (java.util.Map) pp.getObject("pyResourceParameters");
But we are currently using 7.1.4 version. And I can see this in the JAVA step of pyInvokeRESTConnector
// Check for any dynamic resource parameters
java.util.HashMap resourceParamValsMap = new java.util.HashMap();
if (pp.getObject("pyResourceParameters") != null)
resourceParamValsMap = (java.util.HashMap) pp.getObject("pyResourceParameters");
Is any change required here?
Posted: 6 years ago
Posted: 15 Mar 2017 19:05 EDT
Ankur Das (@nkur.das_GCS)
Principal Software Solutions Engineer
You need to check the Java step where we read the proxyHost and port from JVM System property, add a check just before the logic to look for proxyHost and proxyPort resource parameters from the pyResourceParameters Map and if values are not null set the values accordingly.
Theoretically, that would ensure that the proxy host and port will only be set if you have specified them as parameters for specific Connect-REST rules.