Question
Coforge
IN
Last activity: 30 Nov 2022 4:01 EST
Unable to retrieve query parameters from pega URL in Authentication activity
I'm using pyMobileSnapStart activity to open assignments directly from an email. Now we have some requirements to retrieve certain values from the queryString after SSO login is successful.
The problem is whenever I'm hitting the assignment url from the browser, the URL kind of gets replaced by Pega token, and all the parameters which I pass at the beginning get lost.
Initial URL entered in the browser - https://bpm.connect.com/prweb/PRAuth/ABC?pyActivity=pyMobileSnapStart&Action=openAssignment&InsClass=Assign-Worklist&pyShowFullPortal=true&InsHandle=ASSIGN-WORKLIST+TE-XYZ-WORK-CHANGEREQUEST+C-5000!INITIATE
Once hit the replaced URL by Pega - https://bpm.connect.com/prweb/PRAuth/app/ABC_/INgZckXpalAoapgW5mY1Y1WImKd3B6At*/!STANDARD?pzuiactionzzz=CXt0cn17U1RBTkRBUkR9YjNhMjgyZGZkZDgwYzQ0ZDc5NmZhYjBmMDg1MTBlNGQ3ZDU2NWM2MzJmZjNlMDhjNTc1ZjE4MGY1ZTlhYTcxZWFmNjM0NjJmZDVhOTNkZmMwMzUzYjZkNDAxYTI5OGQz*
Due to this even though when I use the following java code to retrieve the URL query parameters using the below code I simply get, as that's what Pega has replaced - pzuiactionzzz=CXt0cn17U1RBTkRBUkR9YjNhMjgyZGZkZDgwYzQ0ZDc5NmZhYjBmMDg1MTBlNGQ3ZDU2NWM2MzJmZjNlMDhjNTc1ZjE4MGY1ZTlhYTcxZWFmNjM0NjJmZDVhOTNkZmMwMzUzYjZkNDAxYTI5OGQz*
Java Code to retrieve URL parameters:
I'm using pyMobileSnapStart activity to open assignments directly from an email. Now we have some requirements to retrieve certain values from the queryString after SSO login is successful.
The problem is whenever I'm hitting the assignment url from the browser, the URL kind of gets replaced by Pega token, and all the parameters which I pass at the beginning get lost.
Initial URL entered in the browser - https://bpm.connect.com/prweb/PRAuth/ABC?pyActivity=pyMobileSnapStart&Action=openAssignment&InsClass=Assign-Worklist&pyShowFullPortal=true&InsHandle=ASSIGN-WORKLIST+TE-XYZ-WORK-CHANGEREQUEST+C-5000!INITIATE
Once hit the replaced URL by Pega - https://bpm.connect.com/prweb/PRAuth/app/ABC_/INgZckXpalAoapgW5mY1Y1WImKd3B6At*/!STANDARD?pzuiactionzzz=CXt0cn17U1RBTkRBUkR9YjNhMjgyZGZkZDgwYzQ0ZDc5NmZhYjBmMDg1MTBlNGQ3ZDU2NWM2MzJmZjNlMDhjNTc1ZjE4MGY1ZTlhYTcxZWFmNjM0NjJmZDVhOTNkZmMwMzUzYjZkNDAxYTI5OGQz*
Due to this even though when I use the following java code to retrieve the URL query parameters using the below code I simply get, as that's what Pega has replaced - pzuiactionzzz=CXt0cn17U1RBTkRBUkR9YjNhMjgyZGZkZDgwYzQ0ZDc5NmZhYjBmMDg1MTBlNGQ3ZDU2NWM2MzJmZjNlMDhjNTc1ZjE4MGY1ZTlhYTcxZWFmNjM0NjJmZDVhOTNkZmMwMzUzYjZkNDAxYTI5OGQz*
Java Code to retrieve URL parameters:
String qString = ((javax.servlet.http.HttpServletRequest) tools.getRequestor().getRequestorPage().getObject("pxHTTPServletRequest")).getQueryString();
if (qString != null) { String[] qsAry = qString.split("&"); for (int i = 0; i < qsAry.length; i++){ if (qsAry[i].indexOf("appName") >= 0) { myStepPage.putString(".Application", qsAry[i].substring(qsAry[i].indexOf("=") + 1)); } if (qsAry[i].indexOf("sysName") >= 0) { myStepPage.putString(".System", qsAry[i].substring(qsAry[i].indexOf("=") + 1)); } } }
Is there any way to get the parameters to prevent pega to replace the URL parameters after hitting the URL?