-
Enhancement
-
Resolution: Done
-
Minor
-
7.36.0.Final
-
None
-
NEW
-
NEW
-
2020 Week 22-24 (from May 25)
It seems that the default rest handler:
https://github.com/kiegroup/jbpm/blob/master/jbpm-workitems/jbpm-workitems-rest/src/main/java/org/jbpm/process/workitem/rest/RESTWorkItemHandler.java
does not support proxy.
Traditionally, JVM usually respects following proxy properties:
https://stackoverflow.com/questions/120797/how-do-i-set-the-proxy-to-be-used-by-the-jvm
For example:
http.proxyHost http.proxyPort
Our handler does ignores these.
The reason is because we are using Apache HttpClient - it has the ability to support these system properties as well, but this ability is DISABLED by default.
Please see for more detail:
I am suggesting to add a new RESTWorkItemHandler constructor which accepts boolean flag which would allow to enable these system properties.
If this boolean flag would be true, then HTTPClient would be built with useSystemProperties(); call
We have actually tested useSystemProperties() in a real proxy environment, and we have verified that it works as per our expectations, see:
https://github.com/agiertli/ProxyEnabledRESTWIH/tree/master/src/main/java/org/redhat/services/rest
We believe that this almost trivial enhancement can bring a lot of value and power which Apache HTTPClient gives you.
I was also contemplating submitting a PR into community, but didn't figure out how to design a unit test, so I' rather leave it to the core maintaners.