Discussion

Pegasystems Inc.
IN
Last activity: 3 Dec 2018 13:54 EST
How to extend Settings tab of case designer
Case designer Settings tab allows a user to configure useful metadata related to a case like Case Archival policy, Attachment categories for a case, Locking information etc.
Case designer Settings tab is powered by a data page and can be extended to add custom options. This document describes how to customize the Case Designer Settings tab to add custom option.
Use case: Add custom settings option called Layout to select widgets to be shown in a case contents when a case is run.
Show custom settings options in the list:
- Create a concrete class for your settings option extending from Data-Case-Settings. You can refer Pega-Case-Settings-General class which is used for the General option in the settings tab.Example:
- For non-pega customization
- If your work pool is JA-JobApp-Work, you can name your class as JA-JobApp-Data-Layout
- For customization done in Pega- RS
- You can name your class like Pega-Case-Settings-[setting name] like Pega-Case-Settings-Layout
- For non-pega customization
- Create below rules
- Override the two field values for pyCaption with fixed name CaseSettingLabel and CaseSettingDescription to set the label and description for custom settings option
- Save as data transform pyDefault from Pega-Case-Settings-General class to your custom class JA-JobApp-Work-Layout
- No need to change the values for pyLabel and pyDescription if you created fields values for the label and description above.
- Set the help content ids for pyHelpContentID & pyMoreInformationContentID to your custom help content id
- Set pyRank to an integer value to decide where you want to show your custom option. Options with same rank are sorted alphabetically. For OOTB settings General is always shown first with a rank of 1. All other OOTB options are set to rank 10.
- So if you want Layout to show your option before General set a value to 0.
- If you want to show it after General but before other options set it to anything between 2 and 9.
- If you want to show it after all the OOTB options set it to higher than 10.
- Set pyShowInExpress to true if you want to see this option in Express portal
- Override the when rule pyShowCaseSetting in your custom class to decide if you want to show/hide the option. This is used to display the settings options on the left panel.
- If you want to show/hide visual indication if the settings options have been configured, like the green tick shown on General option override pyCaseSettingInfo section in your custom class.
- If you just wish to show green tick as shown in General no need to override this. The section at Data-Case-Settings will be picked which has green tick displayed always
- Override pyInitializeCaseSetting in your custom class if you want to populate any data to show in the settings options. Example this is overridden in Pega-Case-Settings-UserActions class to get the list of the count to show the count of user actions configured for this case. This is shown in section pyCaseSettingInfo section
After the above settings,, your custom option should start showing in the list of settings options in case designer. Now let’s configure the UI when this settings option is clicked in the grid.
- Override flow action pyCaseSettingAction in your custom class to show configuration details when your setting option is selected.
- Configure the section, pre-processing, post-processing or validation as required by your custom option.
- Override activity pySaveCaseSetting in your custom class if you want to save any other rule apart from case type. This is called based on rule resolution when the case type is saved. Example this activity is overridden in Pega-Case-Settings-Parties class to save Party rule that was edited from settings tab of case designer.