Support Article
WorkLink URL is formed incorrectly
SA-73233
Summary
WorkLink URL is formed incorrectly.
Error Messages
Not Applicable
Steps to Reproduce
- Log in to the below URL to launch the User portal.
http://xx.xx.xx.xx:xxxx/prweb/PRServlet
- Select a radio button and click Submit.
- From the top navigation menu, create an Agreement or Event and navigate till the Summary tab by providing all mandatory fields.
- Click Submit.
- Navigate to the Attachments list on the work flow and check the email notifications attached to the case.
- Open any email attachment and verify the work flow link. The link is similar to the below link without space in handle before work flow ID.
https://www.yourweb.com/prweb/aggspend?pyActivity=Work-.Open&Action=Review&HarnessPurpose=Review&InsHandle=GE-FW-AGGREGATESPENDFW-WORKE-346971
Root Cause
An out-of-the-box worklink fragment was used in the email.
According to the JSP code, the appendStream() removed the '+' symbol. Hence, the URL is deformed.
The below code caused the issue.
appendString(pega_rules_utilities.encodeURLParameter(tools.getDatabase().getHandle(tools.getStepPage())));
encodeURLParameter returned the correct result which contained the '+' symbol. Hwoever, the appendStream() removed the '+' symbol.
Resolution
Perform the following local-change:
- Pass a parameter to the StringUtils.crossScriptingFilter() method.
- Pass the output of this method as the input to the appendString().
Use the below code,
appendString(StringUtils.crossScriptingFilter(pega_rules_utilities.encodeURLParameter(tools.getDatabase().getHandle(tools.getStepPage()))));
Published August 15, 2019 - 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.