Table of Contents


How to extend the Developer portal menus


You can add menu items to the Tools menu of the Developer portal. The options visible to each user of these portals depend on their RuleSet list and the result of any <pega:when > tags or other conditional processing.

When selected, an add-on menu item can display a list view report, run an activity, or perform other processing.

Suggested Approach


In this example, four add-on-menu items appear in the Tools > Add-Ons menu.


These menu options have the following results:

  • When a user selects the Google Me add-on, a query is sent to that external Web site.
  • The Operators by Group add-on executes a list view rule, presenting results in a new window.
  • The Activity add-on calls an activity, presenting results in a new window.
  • The Work add-on opens a (fixed) work object in the portal workspace.


This development task requires familiarity with XML, Process Commander JavaServer Page tags and JavaScript.

  1. Determine which RuleSet is to contain the XML rule or rules that define add-on menu items. Choose a RuleSet that is or will be available to the appropriate developer community. 
  2. Identify or build and test the activities, reports, HTML rules that are to execute when a developer selects each option. 
  3. Review the DesktopWrapperAPI, a collection of supported JavaScript functions, to identify those functions that may be useful. To learn about the functions in this standard text file rule, select Help > APIs > Desktop > DesktopWrapperAPI. These functions are often useful:

    • OpenurlInWindow()
    • ShowListInWindow()
    • ShowSummaryInWindow()

    You can also review the code in the standard XML rules named @baseclass.zzzz.MenuItem, which work similarly to menu add-ons.
  4. Create an XML rule in the desired RuleSet and Version (Application > New > Rule > Technical > XML ). Set the Applies To key part to @baseclass, the second key part to an identifier of your choosing, and the final key part to the special name MenuAddon
  5. Complete the XML tab. Carefully enter one or more entries in the following format:
    <Item Value="aaaa", Caption="bbbb", onClick="ccccc" /> 
    where Caption is the menu text and the onClick target identifies the JavaScript to execute when a user selects the menu item. You can use <pega:when...>, <pega:reference...> and other JavaServer Page tags in the XML code. 
  6. Optionally, include a <separator /> element to group items at runtime with a horizontal rule.
  7. Save the XML rule form. Confirm that your own RuleSet list contains the RuleSet version containing the XML rule (View > My Profile). Log out, as your changes take effect only the next time you log in. 
  8. Log in. Test.

Example source

XML ruleThis rule contains the following code:

  Caption="Google Me"
  onClick="openUrlInWindow('<pega:reference    name="pxRequestor.pxUserName"/>'
   ,'Hello World',
  Caption="Operators by Group"
   Value="Call Activity"
    location=no', true);"
    Value="Show Work Object"
<Separator />


Published October 24, 2007 — Updated October 7, 2014

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.