Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

WorkLink URL is formed incorrectly

SA-73233

Summary



WorkLink URL is formed incorrectly.


Error Messages


  Not Applicable


Steps to Reproduce

  1. Log in to the below URL to launch the User portal.

    http://xx.xx.xx.xx:xxxx/prweb/PRServlet

     
  2. Select a radio button and click Submit.
  3. From the top navigation menu, create an Agreement or Event and navigate till the Summary tab by providing all mandatory fields.
  4. Click Submit.
  5. Navigate to the Attachments list on the work flow and check the email notifications attached to the case.
  6. 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:
  1. Pass a parameter to the StringUtils.crossScriptingFilter() method.
  2. 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()))));
Suggest Edit

Published August 15, 2019 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us