Support Article
Application Profile document showing old case type descriptions
SA-29591
Summary
When creating a new application profile document, the old case type descriptions are shown instead of new updated ones.
Error Messages
Not Applicable
Steps to Reproduce
- Create a case with a description - then create an application profile document.
- Alter the case description then regenerate the application profile.
- The application profile document will still contain the old
Root Cause
A defect in Pegasystems’ code or rules. Case Type is a new rule type added in Pega 7.x. In 6.x for documentation, we use class description.
Resolution
Add the below code to get the case type description in below Available rule and do a Save-As to your application RuleSet:
Rule: Section- Embed-Accel-DocWorkType.Document
if ( pgWTClass != null )
{
strDescription = pgWTClass.getString( "pyDescription" );
//Check if casetype rule is present and get description from Casetype rule
StringMap CTkeys = new HashStringMap();
CTkeys.put( "pxObjClass", "RULE-OBJ-CASETYPE" );
CTkeys.put( "pyClassName", strClassName );
CTkeys.put( "pyPurpose", "pyDefault" );
try{
ClipboardPage CTPage = tools.getDatabase().open( CTkeys, false );
if(CTPage!=null)
strDescription=CTPage.getString("pyDescription");
//Replacing the new line character with <br> tag as carriage returns are ignored during word conversion.
boolean hasNewline = strDescription.contains("\n");
if(hasNewline)
strDescription=strDescription.replace("\n","<br>");
}catch(Exception e){
oLog.error("Exception while fetching case type rule-"+e.getMessage());
}
Published October 27, 2016 - 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.