Table of Contents

Adding custom tools to Access Manager

You can add custom tools that are created by your developers to Access Manager. This article describes an example of adding a hypothetical custom tool, Worklist Counter, to Access Manager. The tool queries a database to determine the number of items in a worklist, and the counter's results can be displayed in a manager's dashboard.

In this example, the customizable data transform rule pyPopulateTools is edited to add Worklist Counter so that security administrators can set user authorizations to it in Access Manager.

The standard Tools tab contains a system-defined data transform rule that applies pyPopulateTools to display the tools specified there just below the standard tools.

All Pega Platform™ tools require a privilege. This example assumes that the Worklist Counter tool requires the CanUseWorklistCounter privilege that is provided by Pega Platform.

Adding a Worklist Counter tool to Access Manager

This example shows how to add a custom tool by modifying the data transform rule pyPopulateTools to do the following tasks:

  • Create an expandable section for all custom tools.
  • Create a section for a subcategory "Worklist tools."
  • Create an entry for the tool that specifies its class, privilege, and display features.

Data transform hierarchy

Sections and tools in the Access Manager UI reflect page lists that are nested in the data transform. The hierarchy for your custom tools follows that of the system-defined data transform that generates the standard Tools display, as shown in the following figure:

Tools display

Tools display

When working with a data transform, use the right-click menu for commands such as Add Sibling or Add Child. You can also drag a row's handle (the blue dot in the Action column) to nest items or move them up or down.

The sections in the data transform shown above render the following section in Access Manager:

Administrative & development section of Access Manager

Administrative & development section of Access Manager

Insert comments to more easily identify sections.

Creating an expandable section for custom tools

In pyPopulateTools, follow the hierarchy displayed in the previous section, starting with the top-level section.

  1. Open the pyPopulateTools data transform.
  2. Add a Comment step: in the Action column, select Comment, and then enter your text, for example, @******** Custom Tools *********@.
  3. Add a top-level expandable page:
    • In the Action column, select Append and Map to.
    • In the Target column, enter .pyRulesAndToolsList.
    • In the Relation column, select a new page. Press Enter to create a row.
  4. Complete two Set rows for the top-level expandable section. In the Action column, select Set for each row and enter the following details for the section. Enclose entries in the Source column in quotation marks:
    • Enter .pyLabel in the Target column and the section name to be displayed in Access Manager in the Source column. For example, "Custom Tools".
    • Enter .pyExpanded in the Target column and "true" in the Source column.

An example of an expandable top-level section for custom tools might look like the following figure:

Example of expandable top-level section

Expandable top-level section

Adding a subsection for similar tools

You can group similar tools (for example, Worklist tools) in an expandable section. To add a nested page and label, do the following steps:

  1. Under the Set row that specifies pyExpanded equals "true", enter a Comment step for your subsection, for example, @--------- Worklist tools ----------@.
  2. Add a new page row:
    • In the Action column, select Append and Map to.
    • In the Target column, enter .pyRulesAndToolsList.
    • In the Relation column, select a new page.
  3. Complete the Set label row:
    • In the Action column, select Set.
    • In the Target column, enter .pyLabel.
    • In the Source column, enter the subcategory name, for example, "Worklist tools".

Adding a custom tool

  1. Right-click the handle (blue dot) of the Comment row for the section that you want to add tools to and click Add Sibling Below.
  2. Complete a new page row:
    • In the Action column, select Append and Map to.
    • In the Target column, enter .pyRulesAndToolsList.
    • In the Relation column, select a new page.
  3. Complete the four Set rows for this entry. In the Action column for this tool, select Set for each row and enter the following details for the tool. Enclose entries in the Source column in double quotation marks:
    • In the Target column, enter .pyNote,and in the Source column enter the tooltip text to be displayed in Access Manager (short description of the tool function) , for example, "Retrieve number of items in worklist."
    • In the Target column, enter .pyPrivilege,and in the Source column enter the privilege name , for example, "CanUseWorklistCounter".
    • In the Target column, enter .pyClassName,and in the Source column enter the privilege class name, for example, "@baseclass".
    • In the Target column, enter .pyLabel, and in the Source column enter the tool function name to be displayed on Access Manager , for example, "Worklist items counter."
  4. Save the data transform.

The preceding example creates a custom tools section with a subsection for Worklist tools, as shown in the following figure:

Custom tools section with Worklist tools subsection

Custom tools section with Worklist tools subsection

This data transform renders a section in Access Manager as shown in the following figure (refresh the display to see changes):

Access Manager section with Worklist tools subsection

Access Manager section with Worklist tools subsection

In Access Manager, secure the tool. For more information, see Editing tools authorization for a single access group.

Suggest Edit

Related Content

Have a question? Get answers now.

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