IBM FileNet P8, Version 5.1.+            

Customize Workplace XT actions

For the objects accessible from pop-up menus or from the browse and search modes of IBM® FileNet® Workplace XT, the application presents a set of operations or actions that an end user can perform on a particular object type. For example, the actions available for a document object include checkout, download, change to compound, and move; for a folder object, they include add objects, move, and delete.

As an administrator, you can customize the actions that can be performed on objects that appear in the Workplace XT user interface. You can also perform cosmetic changes, like removing an action completely from the user interface. Using filtering criteria, you can also define the conditions under which an action appears. For example, you can define the download action to appear only when users click on documents of a certain class description, version status, and content type.

This topic points out the places in the Workplace XT interface where actions are presented to users, and describes the menu actions descriptor XML file that you use to configure those actions.

Note: If you previously customized actions in the Workplace application by modifying its Actions.xml file, and you want to use those same customized actions in Workplace XT, you must manually add the Workplace-related customizations to the Workplace XT Actions.xml file.

Actions in the Workplace XT UI

Actions are available to the user in pop-up menus, in the Actions menu, the Tools menu, and on Properties information pages. (The actions on the Properties information pages and the My Workplace pop-up menus are defined by the Actions.xml file; the MenuActions.xml file defines all other actions.) The pop-up menu appears when a user right-clicks on an object in a list view, or on an item in the path view. The list of available actions depends on the type of object selected. The same actions appear in the Properties information page for the object. When a user selects one or more items in the list view, then clicks the "Actions" button, the Action menu opens. If multiple items are selected, only the actions that are valid for all of the selected items are shown in the menu.

In Workplace XT, you can also expose a new action by using the context menu. You must add custom JavaScript to the ActionsMenu.js file to enable an action in the Actions menu.

In the showActionsMenu function in ActionsMenu.js, add the following code:
if ($("ACTIONS_MENU__actionid"))
validActions.push("actionid");

Where "actionid" is the ID of your action as specified in the MenuActions.xml file.

Menu actions descriptor XML File

MenuActions.xml contains the definitions of actions displayed in the pop-up menu and multi-select menu for browse and search mode. The file is located in the <XT_deploy_path>\FileNet\Config\WebClient folder, where <XT_deploy_path> is the path where Workplace XT is deployed. MenuActions.xml follows the Workplace Preferences XML Schema, Preferences.xsd, located in <XT_deploy_path>\FileNet\WebClient\WorkplaceXT\WEB-INF\xml.

Notes:  
  • Back up MenuActions.xml before modifying it.
  • If you modify the MenuActions.xml file to include any extended characters, save the file as UTF-8.
  • After modifying MenuActions.xml, reload it from Workplace XT to avoid restarting the web server on which the application is deployed.
File structure
As shown in the listing below, MenuActions.xml consists of five sections: multiSelectActions, toolbarActions, folderToobarActions, topLevelActions, and actionDefinitions.
In the topLevelActions array and in the multiSelectActions array, you define the order of the actions as they appear in the user interface. That is, in the topLevelActions array, the order of the value elements is reflected in the pop-up menu and on the information pages. In the multiSelectActions array, the order of the value elements is reflected in the multi-select menu. You can hide actions by commenting them out.
In the multiSelectActions array, you can specify actions to be multi-select only; that is, a multi-select action does not have to be listed in the topLevelActions array.
In the toolbarActions and folderToolbarActions sections, you define the toolbar buttons that appear next to the Actions button on the toolbar when browsing or searching for documents and folders. The toolbarActions section controls document-related actions; the folderToolbarActions section controls folder-related actions.
The actionDefinitions list consists of action objects, each of which contains a list of conditions which define whether the action is displayed for each individual object. Note that a top-level action can contain a submenu, and if it does, the top-level action definition must include a subActions setting. Also note that the definition for an action listed in the multiSelectActions array must include a multiSelectURL setting. See MenuAction Definition Settings for a description of all settings.
Sections in the menu actions descriptor XML File
<object key="actionsConfiguration" version="1.0">
...

 <array key="multiSelectActions">
 <value>download</value>
 <value>checkout</value>
 <value>cancelCheckout</value>
 <value>file</value>
 <value>delete</value>
 <value>assignSecurityPolicy</value>
 <value>sendMail</value>
 </array>

 <array key="toolbarActions">
 <value>download</value>
 <value>checkout</value>
 <value>quickCheckin</value>
 <value>cancelCheckout</value>
 <value>addToFavorites</value>
 <value>infoProperties</value>
 <value>sendMail</value>
 </array>

 <array key="folderToolbarActions">
 <value>addDocument</value>
 <value>addFolder</value>
 </array>

 <array key="topLevelActions">
 <value>view</value> <!-- for documents, publish templates -->
 <value>open</value> <!-- for folders, searches, object stores -->

 <value>download</value>
 <value>checkout</value>
 <value>quickCheckin</value>
 <value>cancelCheckout</value>
 <value>addToFavorites</value>
 <value>removeFavorite</value>
 <value>renameFavorite</value>
 <value>sendMail</value>
 <value>launch</value>
 <value>transfer</value>
 <value>addSubscription</value>
 <value>declareAsRecord</value>
 <value>declareVersionsAsRecord</value>

 <value>testFormTemplate</value>
 <value>modifyDocumentPolicy</value>
 <value>modifyWorkflowPolicy</value>
 <value>takeOffline</value>
 <value>modifyEntryTemplate</value>
 <value>modifyRecordEntryTemplate</value>

 <!-- RM changes start-->
 <value>requestchargeout</value>
 <value>viewDocumentInfo</value>
 <!-- RM changes end -->

 <value>infoProperties</value>
 <value>moreInformation</value>

 <value>documentActions</value>
 <value>folderActions</value>

 <!-- always in the end -->
 <value>addDocument</value>
 <value>addFolder</value>
 </array>

<list key="actionDefinitions">

...

 <object key="action">
 <setting key="id">download</setting>
 <setting key="title" localizationKey="server.MenuActions_xml.download">Download...</setting>
 <setting key="url">
 getContent?
 mode=download&amp;
 objectType={OBJECT_TYPE}&amp;
 id={OBJECT_ID}&amp;
 vsId={VERSION_SERIES_ID}&amp;
 objectStoreName={OBJECT_STORE_NAME}&amp;
 returnUrl={RETURN_URL}
 </setting>

 <setting key="multiSelectURL">
 operations/WcmMultiDownloadObject.jsp?
 returnUrl={RETURN_URL}
 </setting>
 <setting key="img">images/action/toolbar/Download23.gif</setting>
 <array key="objectTypes">
 <value>document</value>
 </array>
 <array key="excludedContentTypes">
 <!--RM Change start -->
 <value>application/x-filenet-rm-physicalrecord</value>
 <value>application/x-filenet-rm-electronicrecord</value>
 <value>application/x-filenet-rm-emailrecord</value>
 <!-- RM Change ends -->

 <!-- entry template mime types -->
 <value>application/x-filenet-entrytemplate</value>
 <value>application/x-filenet-documententrytemplate</value>
 <value>application/x-filenet-folderentrytemplate</value>
 <value>application/x-filenet-customobjectentrytemplate</value>
 <value>application/x-filenet-formdataentrytemplate</value>
 <value>application/x-filenet-declarerecordentrytemplate</value>
 <value>application/x-filenet-pageentrytemplate</value>
 <value>application/x-filenet-sectionentrytemplate</value>
 <value>application/x-filenet-cfwpageentrytemplate</value>
 <value>application/x-filenet-cfwsectionentrytemplate</value>
 <value>application/x-filenet-cfwtextentrytemplate</value>
 <value>application/x-filenet-localsectionentrytemplate</value>

 <!-- wcm mime types -->
 <value>application/x-filenet-sp-cr</value>
 <value>application/x-filenet-sp-target</value>
 <value>application/x-filenet-sp-page</value>
 <value>application/x-filenet-sp-section</value>
 <!-- Form policies -->
 <value>application/x-filenet-documentpolicy</value>
 <value>application/x-filenet-workflowpolicy</value>

 <!-- external documents (pointing to an URL) -->
 <value>application/x-filenet-external</value>
 </array>
 <setting key="isPopup">false</setting>
 <setting key="popupHeight">600</setting>
 <setting key="popupWidth">750</setting>
</object>

Menu action definition settings

The following table describes each action definition setting in MenuActions.xml. Each setting is identified by its key attribute. Unless otherwise specified, a setting is optional. If an optional setting is not present, its default value is used.
Table 1. This table describes each action definition setting in MenuActions.xml.
Key Setting Value
baseURLKey
<setting key="baseURLKey">
 rm
</setting>
If this setting is present, the base URL of the Records Manager application is used instead of the Workplace XT base URL (the default). The only valid value is "rm".
classes
<array key="classes">
 <value>{63F8AA94-E2B9-11D0
 -ADF6-00C04FB66DAD}</value>
 <value>{A73BEEB2-B0B7-11D2
 -8853-0000F80883E3}</value>
</array>
Defines the list of classes that are valid for this action. The values must be in GUID format. The action is available only for the classes listed.
Note: If this setting is present, do not set excludedClasses
.
contentTypes
<array key="contentTypes">
 <value>image/jpeg</value>
 <value>image/tiff</value>
 <value>text/*</value>
 <value>application/??-word</value>
</array>
Defines the list of mime types and container types valid for this action. The action is available only for objects of the specified content types. If not present, the action is available for all content types. The values in this setting support "*" and "?" wildcards. "*" means any number of characters (including 0 characters). "?" means one character.
Note: If this setting is present, do not set excludedContentTypes.
excludedClasses
<array key="excludedClasses">
 <value>{d24d4450-1f01-11d1
 -8e63-006097d2df48}</value>
 <value>{f81e9010-6ea4-11ce
 -a7ff-00aa003ca9f6}</value>
</array>
Defines the list of classes that are not valid for this action. The values must be in GUID format. The action is not available for the classes listed.
Note: If this setting is present, do not set classes.
excludedContentTypes
<array key="excludedContentTypes">
 <value>text/xml</value>
 <value>text/plain</value>
</array>
Defines the list of mime types and container types invalid for this action. The action is available for all objects that are not of any listed content types. The values in this setting also support "*" and "?" wildcards.
Note: If this setting is present, do not set contentTypes.
excludedObjectTypes
<array key="excludedObjectTypes">
 <value>storedsearch</value>
 <value>publishtemplate</value>
 <value>securitytemplate</value>
</array>
Defines the list of object types invalid for this action.
Note: If this setting is present, do not set objectTypes.
favoritesOnly
<setting key="favoritesOnly">
 true
</setting>
If the value is true, the action appears only on the Favorites page. Default value is false.
hideBasedOnVersionStatusConditions
<setting key="hideBasedOnVersionStatusConditions">
 true
</setting>
If the value is true (the default), the object's version status determines whether the action appears on the page. This key is applicable only to the promoteVersion and demoteVersion action definitions. Default value is false.
hideForFavorites
<setting key="hideForFavorites">
 true
</setting>
If the value is true, the action does not appear on the Favorites page. This key is applicable only to the addToFavorites action definitions. Default value is false.
hideForVersions
<setting key="hideForVersions">
 true
</setting>
If the value is true, this action is not shown for a version of an object in an information page. That is, if from an information page for an object you go to the "Versions" property page, then go to the information page for a particular object, the action is not available. Default value is true.
hideInSitePreferences
<setting key="hideInSitePreferences">
 true
</setting>
If the value is true, the action is not shown in the Site Preferences user interface. Default value is false.
hideWhenCheckedOut
<setting key="hideWhenCheckedOut"> true </setting>
If the value is true, the action is not shown when the document is checked out. Default value is false.
id
<setting key="id"> download </setting>
Defines a unique identifier for an action. A value is required.
img
<setting key="img">
 images/action/TestAction16.gif
</setting>
Defines the icon for the action. This setting is not required. The value must be a valid path to an image with a size of 16x16 pixels.
Note: Similar to url, you can use a relative path.
isPopup
<setting key="isPopup">
 true
</setting>
If the value is true, this action opens in a new window when one object is selected. Default value is false.
multiSelectPopupHeight
<setting key="multiSelectPopupHeight">
 250
</setting>
Defines the pixel height of the new window. This setting is ignored if isPopup is set to false, or if multiSelectURL is not used. Default value is 600.
multiSelectPopupWidth
<setting key="multiSelectPopupWidth">
 550
</setting>
Defines the pixel width of the new window. This setting is ignored if isPopup is set to false, or if multiSelectURL is not used. Default value is 800.
multiSelectURL
<setting key="multiSelectURL">
 operations/WcmMultiDownloadObject.jsp?
 returnUrl={RETURN_URL}
</setting>
Defines multi-select URL. This setting defines the URL of the page that implements the multi-select action. Any action that supports multi-select must have this setting. The action must also be included in the multiSelectActions section of MenuActions.xml.
objectTypes
<array key="objectTypes">
 <value>document</value>
 <value>folder</value>
</array>
Defines the list of object types valid for this action. If this setting is not present, all object types are valid. Valid values are:
  • objectstore
  • folder
  • document
  • storedsearch
  • searchtemplate
  • link
  • event
Note: If this setting is present, do not set excludedObjectTypes.
onclick
<setting key="onclick">
 return FNActions.open(event, this)
</setting>
Defines the event action to be called when the user clicks on the action in the user interface.
popupHeight
<setting key="popupHeight">
 250
</setting>
Defines the pixel height of the new window. This setting is ignored if isPopup is set to false. Default value is 600.
popupWidth
<setting key="popupWidth">
 600
</setting>
Defines the pixel width of the new window. This setting is ignored if isPopup is set to false. Default value is 800.
renderSeparatorAbove
<setting key="renderSeparatorAbove">
 true
</setting>
If the value is true, this action draws a separator line above the action list. Default value is false.
returnParameters
<setting key="returnParameters">
 eventName=StateChanged&op=checkin
</setting>
Defines URL parameters to include when the action has completed processing. Used in some cases to provide a mechanism to refresh the main page after an action has completed.
rmHideIfAlreadyDeclared
<setting key="rmHideIfAlreadyDeclared">
 true
</setting>
If the value is true, this action only appears when the document has not been declared as a record. Default value is false.
Note: This setting is only valid if Records Manager is selected in the Site Preferences.
rmOnly
<setting key="rmOnly">
 false
</setting>
If the value is true, this action appears only when Records Manager is selected in Site Preferences. Default value is false.
roles
<array key="roles"> <value>PSDesigner</value> <value>PWAdministrator</value> </array>
Defines the list of access roles that are valid for this action. Only users that are members of one or more of the listed roles see the action. Access roles are defined on the Content Engine. Default value is "Everyone".
Note: You can also set roles in Site Preferences, Actions Role Access page.
shortId
<array key="shortId">
 addDocument
</array>
Defines the action's short identifier.
Note: Only available from the toolbar and Actions button.
showInActionsMenuOnly
<setting key="showInActionsMenuOnly"> true </setting>
If the value is true, the Add Document, Advanced Add Document, and Add Folder actions appear only in the Actions menu, not in the pop-up menus of the selected item. Default value is false.
showOnlyWhenCheckedOut
<setting key="showOnlyWhenCheckedOut"> true </setting>
If the value is true, the action is shown only when the document is checked out. Default value is false.
subActions
<array key="subActions">
 <value>infoProperties</value>
 <value>infoSystemProperties</value>
 <value>infoSecurity</value>
 <value>infoFolders</value>
</array>
Defines the list of actions displayed in a submenu. Note that you must define an actionDefinition for each value in the subActions array.
Note: You can only have one level of submenus; no action listed in the subActions array can have submenus of its own.
title
<setting key="title">
 TEST ACTION 
</setting>
Defines the action's label, which appears in the user interface. This setting is required.
titleForSitePreferences
<setting key="titleForSitePreferences">
 Download Documents
</setting>
The title of the action as the action appears in Site Preferences, Actions Role Access page. If this setting is excluded, the value of title is used.
url
<setting key="url">
 operations/MyOperation.jsp?
 id={OBJECT_ID}&amp;
 classId={CLASS_ID}&amp;
 label={OBJECT_LABEL}&amp;
 objectStoreName={OBJECT_STORE_NAME}&amp;
 minorVersion={MINOR_VERSION}&amp;
 objectType={OBJECT_TYPE}&amp;
 vsId={VERSION_SERIES_ID
</setting>
Defines the URL of the page that implements the action and the parameters passed to that page on the URL. The format of this string is described in URL pattern macros.

This setting is required.

Note: Spaces and line breaks are allowed in the value for convenience. When MenuActions.xml is read, spaces and line breaks (which are not valid URL characters) are automatically removed from this string.
useToken
<setting key="useToken"> 
 true
</setting>
If the value is true, a user token is appended to the URL before redirecting. This happens only if token support is selected in the site preferences. Default value is false.
versionStatusConditions
<array key="versionStatusConditions">
 <value>released</value>
 <value>superseded</value>
</array>
Defines the values of the version status that are valid for the action. If this setting is not present, any value of the version status is valid. Valid values are:
  • released
  • reserved
  • superseded
  • inprocess
  • inprocessNoMajor

Use inprocess for a version series that has a major version. Use inprocessNoMajor for a version series that does not have a major version. For information on these values, see Versioning Properties.

URL pattern macros

The macros in the following table are used in the url setting of action definitions. They define the URL of the page that implements the action and the parameters passed to that page on the URL. The macros are replaced by the corresponding value in the actual URL. For example, if the pattern is operations/Test.jsp?id={OBJECT_ID}, and the object for which the operation is invoked has an ID of {A73BEEB2-B0B7-11D2-8853-0000F80883E3}, the operation URL will be operations/Test.jsp?id={A73BEEB2-B0B7-11D2-8853-0000F80883E3}.
Table 2. This table describes the macros used in the URL setting of action definitions.
Macro Value
{OBJECT_STORE_NAME} Object store name; for example, "TEST_OS".
{OBJECT_ID} Object ID in GUID or path format.
{OBJECT_LABEL} Object label as the label appears in the user interface.
{OBJECT_TYPE} Object type as a String; for example, "document" or "folder".
{VERSION_SERIES_ID} Version series ID in GUID format.
{CLASS_ID} Class ID in GUID format.
{CONTENT_TYPE} Content type as String, URL-encoded.
{MAJOR_VERSION} Major version; for example, "1".
{MINOR_VERSION} Minor version; for example, "2".
{VERSION_STATUS} Version status as a number; for example, "1".
{RETURN_URL} Return URL, URL-encoded; for example, "http://<server>:<port>/WorkplaceXT/Browse.jsf"
{TIME_ZONE} The time zone ID.


Feedback

Last updated: July 2011


© Copyright IBM Corporation 2011.
This information center is powered by Eclipse technology. (http://www.eclipse.org)