LinkedIn
Copied!

Table of Contents

About lightweight lists

A lightweight list is an internal structure used by the page list property. It is called "lightweight" because its efficient structure requires less CPU memory and processing than traditional page lists. Lightweight lists are used in:

  • The Obj-browse activity method

  • The Lookuplist activity

  • List views

  • Summary views

Processing

Lightweight lists require less processing than standard page lists. 

Standard page list processing

Standard page lists maintain a normal clipboard page list, for example, the results of a database query. The clipboard provides the developer some options in working with homogenous data, such as the ability to merge the page list data from the clipboard with data from another page list, or perhaps update it with a subsequent query.

Typical processing of page list data like copying can be resource intensive because of the metadata carried by page lists. PRPC 7.1 includes features to identify inefficient copying.

Lightweight page list processing

Lightweight lists, by contrast, do not duplicate the metadata defined for each element, therefore consuming far less memory and processing.

Lightweight lists in PRPC 7.1

By default, PRPC rules use lightweight lists. You can optionally enable the default use of lightweight lists in the features listed above in your application's rules as well, using the lightweight list dynamic system setting.

Enhancements

Lightweight lists have been enhanced in Version 7.1 to support the following:

  • Write operations

    • for all scalar properties

    • in embedded pages

    • at any level within a page

  • Persistence to the database

  • Clipboard API support

    • Support for most clipboard API features - see Limitations

  • Programmatic creation of lightweight lists in memory

Limitations

Lightweight lists should not be used if the rule using the list performs operations unsupported by lightweight lists. These features are not supported in PRPC 7.1:

  • Forward chaining - declarative rules will not fire automatically as the result of changes to properties on a lightweight list.

  • Reference properties (a property that can link to a source property) - references cannot be established from or to properties on a lightweight list.

  • Java objects - lightweight lists cannot contain Java pages (a clipboard page with a class derived from the Embed-Java- base class) or Java properties.

  • Messaging - a lightweight list cannot handle a message, a text clipboard value generated by the system and associated with a page. A message can convey error conditions, progress, or exceptions to a user.

  • Value vetting - for example, lightweight lists cannot apply the rule-edit-validate rule, which validates type conversion, precision, and encryption.

  • Page properties as part of Obj-Browse selects - for example, during an Obj-Browse over Data-Admin-Operator-ID, you can select .pyPreferences.pyGeneralPrefs.pyWorkPortal but not .pyPreferences.pyGeneralPrefs, because pyGeneralPrefs is a page property reference.

  • Single frame issues - if you are using the getPage or get Property function in a Java step while trying to use that reference across iterations, the step may point to an incorrect entry in the list.

Dynamic System Settings

Two dynamic system settings control the use of lightweight lists by List view and Summary view rules and Obj-Browse and Lookuplist activities. There is a setting each for PRPC and application rules:

  • clipboard/lightWeightList/enableForCorePRPCRules - this governs PRPC rules and is set to true by default. This setting overrides the setting in the Use Lightweight List checkbox for core PRPC rules.

  • clipboard/lightWeightList/enableForCustomerRules - this governs your application rules and is set to false by default. This setting overrides the setting in the Use Lightweight List checkbox for your rules.

When true, these dynamic system settings override any rule-specific settings set on a rule form or activity definition. For example, if the system setting is set to true, clearing the Use Lightweight List checkbox for an individual rule will have no effect; lightweight list processing will be performed for that and all other rules using the lightweight list option.

When either dynamic system setting is set to false, the system honors the setting for each rule and either uses or does not use lightweight list processing according to the setting on the rule form.

Improving page list processing with lightweight lists
This section applies only to systems that have been upgraded to PRPC 7.1 from a prior version.

PRPC 7.1 includes two ways to locate opportunities where lightweight lists can improve performance: a lightweight list utility and a new alert:

Lightweight list utility

Version 7.1 includes a system report that can identify rules using page lists where lightweight lists could be used instead. The report runs a utility that finds and displays links to such rules. You can click a link in the report to access a rule, then select the Use Lightweight Lists option. Access the report from the Designer Studio menu: Designer Studio > System > Tools > System Reports > Rules Not Using Lightweight List. Refer to the help topic for the landing page for information.

PEGA0050 Alert

PRPC 7.1 includes a new alert, PEGA0050, which flags processing where a rule or activity copies a clipboard page list to another list unnecessarily. The unnecessary processing can be eliminated by substituting lightweight lists and eliminating inefficient Java steps. For more information, see the Next Steps description in Understanding the PEGA0050 alert - Lightweight list has been copied n times.

Lightweight lists implementation in PRPC 7.1

Lightweight lists were introduced in PRPC 6.2 SP2 and specified by selecting the Read-only checkbox on a page list property's rule form. This option provided memory-usage benefits, but lightweight lists did not support some operations, like writing to the database, or processing embedded pages.

In PRPC 7.1, the Read-only checkbox has been removed. The rule forms for the Obj-browse activity method, Summary View and List view include a Use Lightweight List checkbox. The Lookuplist activity form has a textbox to enter "true" for the useLightweightList parameter.

Disabling lightweight lists at a rule level

Starting in PRPC 7.1.2, you can now disable lightweight lists at a rule level. To do so, open the D_pyVLExemptions data page and and “specialize” it on the application rule set containing the rule on which you want to disable lightweight lists. See below.

lwl-D_pyVLExemptions2.png

Set the access group for this data page to the access group based on the application:

lwl-D_pyVLExemptions.png

Next, open the data transform pyLightWeightExemptions and add the rule instance on which to disable lightweight lists in the following format:

Set .pzLWExempt("Ruletype_pyClassName_Rulekey1_Rulekey2") = true

 

For example, to disable lightweight lists on a list view named "FindAccessGroups" with owner "ALL" in class "Data-Admin-Operator-AccessGroup" set .pzLWExempt(“Rule_Obj_ListView_Data_Admin_Operator_AccessGroup_FindAccessGroups_ALL”) to true.

Convert all hyphens ("-") to underscores ("_").

See below for an example.

lwl-pyLightWeightExemptions.png

Finally, specialize the pyLightWeightExemptions data transform by saving it in an application ruleset.

Additional information

Understanding the PEGA0050 alert - Lightweight list has been copied n times

Suggest Edit

100% found this useful

Have a question? Get answers now.

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