Links may not function; however, this content may be relevant to outdated versions of the product.
Customizing the display of instances in the Application and Records Explorers
Instance lists in the Application Explorer and Records Explorer are now generated by Report Definitions instead of List Views if all of the class keys are exposed. Instance lists display the RuleSet:Version column for rule-based classes and Updated on and Updated by columns for all classes if those properties are exposed. Exposed properties that are class keys are displayed and marked with an asterisk. You can display additional columns in the instance list for classes that are generated using Report Definitions. You can also display additional non-key properties if they are exposed.
You cannot expose properties for classes in the Pega-RULES ruleset, therefore:
- If an instance list is generated using List Views, the class keys are not exposed. You cannot generate these classes using Report Definitions.
- If you cannot display a non-key property, the property is not exposed and cannot be displayed in the instance list.
For custom classes, you can display non-key properties in the instance list by exposing any class keys and non-key properties and providing the code to display them.
Exposed class keys and exposed RuleSet, Version, Updated on, and Updated by properties
The following sections explain how to:
- Expose class keys for custom classes - if you do not do this, the instance list is generated using List Views and cannot be customized.
- Expose properties for non-class keys to display them for custom classes - properties that are not exposed are not displayed in the instance list.
- Display non-key properties in the instance list for both custom and Pega-RULES rulesets.
Exposing class keys in custom classes
If custom classes are generated by List Views, you must expose all of the class keys so that they are generated by Report Definitions so that you can customize the instance list.
For example, in the Rule-ReleaseAdministration-Obj custom class in the following figure, a class key is not exposed, and so the instance list is generated by List Views.
Instance list generated by List Views
- Open the class record.
- Click the General tab.
- In the Keys section, click the Open rule icon
to open the property that you want to expose.
- Click .
- Use the Property Optimization tool to optimize the property. See Exposing properties and populating database columns using the Property Optimization tool.
- Click
When you reopen the instance list, the list is generated by Report Definitions. in the rule form.
Exposing properties for non-class keys in custom classes
You can display properties for non-class keys in custom classes if those properties are exposed.
- Expand the custom class in the Application Explorer.
- Click to expand the class properties.
- Right-click the property that you want to optimize and select Optimize for reporting.
- Use the Property Optimization tool to expose the property. See Exposing properties and populating database columns using the Property Optimization tool.
- Click in the rule form.
Displaying non-key properties
You can display columns for non-key properties if the properties are exposed by creating an activity that contains the Java code to display the non-key properties.
- If you are displaying non-class key properties in custom classes, ensure that those properties are exposed. See Exposing properties for non-class keys in custom classes.
- Open one of the following activities:
- To modify the display of a custom class in the Application Explorer, open the pyPopulateInstanceListColumns activity by searching for it in Designer Studio and selecting the activity that is in the Rule- class. For example, use this rule if you want to modify the display the custom Rule-ReleaseAdministration-Obj class, as displayed in the following figure.
- To modify the display of a top-level class that is in a Pega-RULES ruleset in the Application Explorer (for example, Rule-Obj-Flow), open the pyPopulateInstanceListColumns activity by searching for it in Designer Studio and selecting the activity that is in the Rule- class. For example, use this rule to change the display of the Flow instance list in the top-level Rule-Obj-Flow class, as displayed in the following figure.
- To modify the display of an instance list within a top-level class in the Pega-RULES ruleset in the Application Explorer, open the pyPopulateLookupListColumns activity by searching for it in Designer Studio and selecting the activity that is in the Rule- class. For example, use this rule if you want to modify the display of the Flow instance list when it appears in the Process folder under the Rule- class in the Application Explorer, as displayed in the following figure.
- To modify the display of a class that is in a Pega-RULES ruleset in the Records Explorer (for example, Flow), open the pyPopulateInstanceListColumns activity by searching for it in Designer Studio and selecting the activity that is in the Rule- class. For example, use this rule to change the display of the Flow instance list, as displayed in the following figure.
- Save the activity in your ruleset by completing the following steps:
- Click Save As and select Save As.
- In the Apply to field in the Context section, enter the class of the record type. For example, if you are modifying the instance list display for a Flow, enter
Rule-Obj-Flow
. - From the Add to rulesetlist, select your application ruleset.
- Click Create and Open.
- Provide the Java code that displays a non-class key by completing the following steps:
- In the Activity form, click the Steps tab.
- Enter Java in the Method field.
- Click the arrow next to the Method field to expand the method and display the Java source text box.
- Enter the code that displays the non-key class. For example, to display the Category column for a Flow, enter the following code:
ClipboardProperty cbpFields = myStepPage.getProperty(".pyUI.pyBody.pyUIFields");
ClipboardPage pgField = tools.createPage("Embed-ReportUIFields","");
pgField.putString(".pyFieldName",".pyCategory");
pgField.putString(".pyDataType","Text");
pgField.putString(".pyFieldLabel","Category");
cbpFields.add(1,pgField);
pgField.removeFromClipboard();
- Click
When you open the instance list again, the Category column is displayed: in the rule form.