Support Article
AddHistory function truncates pyTaskName field to 32 symbols
SA-66568
Summary
A call is made to the AddHistory function, in the PegaProComUtilities library, to add a History entry. For one of these arguments, the pyTaskName is populated with a value. However, despite the History table having an out-of-the-box size of 128 characters, the function truncates the pyTaskName value to 32 characters.
Error Messages
Not Applicable
Steps to Reproduce
- Build an activity to perform an Obj-Open-By-Handle on an available work object
- Add a Java step which calls the below code.
String strMemo="This is the message that appears in the audit info";
String myExtraLongTaskName="This string will breach the default length of the pyTaskName column, which is 128 chars in Pega 7.3.1. It would be interesting to verify if this is truncated or errors.";
ClipboardPage workPageToEmbed=null;
pega_procom_pegaprocomutilities.AddHistory(tools, myStepPage, pega.findPageWithException("pxRequestor", "Code-Pega-Requestor").getString("pyUserIdentifier"), "", "", "", myExtraLongTaskName, strMemo, "", workPageToEmbed);
- Perform an Obj-Save and Commit.
- Run the activity. Examine the record in the appropriate History table. The pyTaskName value is truncated to 32 characters.
Root Cause
The truncation value is hardcoded to 32 characters in the AddHistory function.
Resolution
Apply HFix-47840.
Published December 13, 2018 - 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.