Document Explorer
The Document Explorer view displays and supports various actions in the folder structure of a process instance. Depending on the structure of the process folders, this can include showing documents in the BPM content store and any other referenced ECM folders and documents. The Document Explorer view gives users the ability to search, create, delete and rename folders, when authorized. The view also allows users to upload, view, checkout and remove documents when authorized.
Content management advanced
| Instance ID: | Specify the instance ID for which you want to display a list of associated documents and folders. If the "Folder ID" property is configured, the "Instance ID" property is ignored. If no folder ID or instance ID is specified, the folder ID is derived from the human service context. For client-side human services, the tw.system.processInstance.id and tw.system.processInstance.caseFolderId properties are used for the context. For heritage human services, the tw.system.currentProcessInstance.id and tw.system.currentProcessInstance.caseFolderId properties are used for the context. | String |
| Server name: | If a folder ID is configured, specify the name of the external ECM server. The server name can be typed into the field. You can also use a variable that represents the server name and add the variable to this field. For an external ECM server name, check the Process App Settings page for the external ECM systems available.If you are working with the internal ECM content repositories - BPM managed store, BPM content store, or BPM document store - constants are available for them; for example, ECMServerNames.IBM_BPM_MANAGED_STORE. | String |
| Repository name: | The name of the repository that represents the repository configured with the server set using the 'Server name' configuration. This is optional, and would be used in the context of a Case Configuration, when Case is configured with more than one Target Object store, and 'Server name' is set to a predefined constant of IBM_TargetObjectStore. The repository name would help in resolving IBM_TargetObjectStore to the proper Target Object store. From a Case perspective you can set this configuration to the tosName variable. | String |
| Folder path or ID: | Specify the folder ID for which you want to display a list of associated documents and folders. If this property is configured, the instance ID is ignored. If the "Folder ID" property is not configured, the folder ID is derived from the associated "Instance ID" property. If an instance ID is not specified, the folder ID is derived from the human service context. For client-side human services, the tw.system.processInstance.id and tw.system.processInstance.caseFolderId properties are used for the context. For heritage human services, the tw.system.currentProcessInstance.id and tw.system.currentProcessInstance.caseFolderId properties are used for the context. | String |
| Display parent case folder: | Display the contents of the parent case instance. This option is only valid for process instances in a case solution that are created through Case Builder. When this option is selected, the Server Name, Instance ID and Folder ID fields are ignored. | Boolean |
| Root folder name: | The display name of the root folder to replace the folder name from the ECM content repository. | String |
Appearance
| Table style: | The style of the table. | |
| Color style: | The color style for the table display. | |
| Width: | The width in pixels (px), percent (%), or em units (em). For example: 500px, 20%, 40em. If "px", "%", or "em" is not appended to the numeric value, the value defaults to "px". | String |
| Height: | The height in pixels (px), percent (%), or em units (em). For example: 500px, 20%, 40em. If "px", "%", or "em" is not appended to the numeric value, the value defaults to "px". | String |
| Columns: | The columns to display in the list. | ExplorerColumn[] |
| View Style: | The style of the view (Default, Modern). | |
| Show column headers: | Select this option to enable viewing the column headers for the 'Default' View style. In the 'Modern' View style, this option gets automatically enabled at runtime. | Boolean |
Behavior
| Show footer: | Show the table footer. | Boolean |
| Show table stats: | Show table statistics. For example, "Showing 1 to 5 of 59 entries". | Boolean |
| Show pager: | Display the pager. | Boolean |
| Initial page size: | The initial maximum number of entries shown for each page. | Integer |
| Confirm on deletion: | Show a confirmation dialog box before files are deleted. | Boolean |
| Collapsible: | Indicates whether the section can be collapsed. | Boolean |
| Initially collapsed: | Indicates whether the section is collapsed when the view opens. | Boolean |
| Refresh trigger: | Indicates whether the contents of the control can be refreshed. Bind this property to a private variable.When the value of the bound variable changes to "true", the view is refreshed. After the view is refreshed, the value of the variable returns to "false". | Boolean |
| ECM get related folders service: | Gets the folder info for the ECM servers listed in the Process Application Settings page. | String |
| Instance status: | Determines whether the Document Explorer is editable or read-only. ACTIVE instances are editable. Instances with different status values (COMPLETED, FAILED, TERMINATED, and SUSPENDED) are read-only. | String |
| Hide Document Explorer: | Hide the Document Explorer control, for example, for a business process definition (BPD). | Boolean |
| View clicked document: | Select this option to enable the default viewer for documents when you click their name. | Boolean |
| Enable on custom view event: | Enable the execution of a custom script in the 'on custom view' event when the View menu action is selected. | Boolean |
| Use document viewer: | Select this option to open documents in an in-line document viewer when the View menu action is selected. When this option is clear, documents open in a new window. | Boolean |
| ECM get default target repository name service: | Gets the default target repository name represented by the predefined ECM constant IBM_TargetObjectStore. | String |
| Disable drag and drop: | Select this option to disable the addition of documents by using drag and drop. | Boolean |
| Document classes: | A set of document classes that are displayed when adding new documents. When not set, document classes are retrieved from the server. The names entered here are displayed to the user, and the values correspond to the symbolic name of each document class. If the name is not provided, the original name for the class will be used. | LabelIdPair[] |
| Custom folder class: | The custom folder class to apply when adding subfolders. When used with a case folder, the folder class must be a subclass of CmAcmCaseSubfolder. | String |
| Custom actions: | Provide the ID, label, and icon for displaying the custom actions when the user clicks the overflow menu on a table row. Add the JavaScript code for the action to perform to the On custom action click event. | CustomMenus[] |
| Disable folder addition: | Select this option to disable the addition of folders. | Boolean |
Content management
| Last updated doc ID: | The ID of the document on which a create or update operation was performed. | ECMID |
| Default ECM document properties: | Specifies the matching properties to upload with this document. | ECMDefaultProperty[] |
| Add BPM properties: | By default, properties are not added to new BPM documents. Enabling this configuration option adds the properties defined in the "Upload BPM properties" configuration option. If you want to control when the properties are added to the document, bind this configuration option to a variable. | Boolean |
| Upload BPM properties: | Adds the properties specified in the "Upload BPM properties" table to a BPM document (when the "Add BPM properties" option is selected). | NameValuePair[] |
| Hide in portal: | Prevent the BPM document from being displayed in the portal. | Boolean |
| Events | ||||||||||||||||||||||||||||||
| On load: |
| |||||||||||||||||||||||||||||
| On document clicked: |
| |||||||||||||||||||||||||||||
| On folder clicked: |
| |||||||||||||||||||||||||||||
| On delete: |
| |||||||||||||||||||||||||||||
| On refresh: |
| |||||||||||||||||||||||||||||
| On error: |
| |||||||||||||||||||||||||||||
| On folder rename: |
| |||||||||||||||||||||||||||||
| On remove from folder: |
| |||||||||||||||||||||||||||||
| On document upload complete: |
| |||||||||||||||||||||||||||||
| On reference created: |
| |||||||||||||||||||||||||||||
| On custom view: |
| |||||||||||||||||||||||||||||
| On custom action click: |
| |||||||||||||||||||||||||||||
Extends:
Methods:
Inherited
addClass(name, [replaced])
Add or replace the CSS classes for this view.
| Name | Type | Default | Description |
| name | {string} | The CSS class names to add to the view. For multiple classes, use space to separate the class names. | |
| replaced | {string} | The CSS class names to be replaced by the first argument. For multiple classes, use space to separate the class names. |
Example
| Button.addClass("green"); |
createCustomMenus(data, view)
Creates and configures custom and standard action menu items for the selected document or folder.
This method evaluates the item's type and permissions, then dynamically builds a list of applicable menu options.
When an action is selected, a custom event is triggered for further handling.
This method evaluates the item's type and permissions, then dynamically builds a list of applicable menu options.
When an action is selected, a custom event is triggered for further handling.
| Name | Type | Default | Description |
| data | {Object} | The menu creation context.
data.cellObj The cell object representing the selected row. data.customActions List of available custom and standard actions. | |
| view | {Object} | The instance of the current Document Explorer view. |
createFolder(parentFolderId, newFolderName, serverName)
Creates a new folder in the specified folder path and server.
| Name | Type | Default | Description |
| parentFolderId | {string} | The ID of the parent folder. | |
| newFolderName | {string} | The name of the folder to be created. | |
| serverName | {string} | The name of the target server. |
getActionIcon(menuAction, cellData, [iconInfo])
Returns:
{string}
Determines the icon to be displayed for a given menu action.
If an icon is explicitly defined in the custom actions, it is used; otherwise, a default is selected based on the action type and whether the item is a reference.
If an icon is explicitly defined in the custom actions, it is used; otherwise, a default is selected based on the action type and whether the item is a reference.
| Name | Type | Default | Description |
| menuAction | {Object} | The custom or standard action definition. | |
| cellData | {Object} | The metadata for the selected item (e.g., folder or document). | |
| iconInfo | {string} | Optional default icon to use if no icon is defined in the action. |
getActionLabel(menuAction, labelInfo)
Returns:
{string}
Determines the display label for a given menu action.
If a label is explicitly defined in the menu action, it is used;
otherwise, a localized label is generated using the provided label key.
If a label is explicitly defined in the menu action, it is used;
otherwise, a localized label is generated using the provided label key.
| Name | Type | Default | Description |
| menuAction | {Object} | The custom or standard action definition. | |
| labelInfo | {string} | The localization key used to fetch a fallback label if one is not defined in the action. |
Inherited
getData()
Returns:
{Object}
Retrieve the bound data associated with the view. It applies only to views with bound data.
Example
| var dec1 = MyDecimal.getData(); |
getFolderId()
Returns:
{string}
Returns the value of the 'Folder ID' option that is currently configured in the view.
getInstanceId()
Returns:
{string}
Returns the process instance ID that is currently configured in the view.
getRecordCount()
Returns:
{integer}
Returns the number of records that are currently displayed in the list.
getRefresh()
Returns:
{boolean}
Returns the value of the 'Refresh trigger' option.
getServerName()
Returns:
{string}
Returns the server name that is currently configured in the view.
getTitle()
Returns:
{string}
Returns the title of Document Explorer.
getType()
Returns:
{string}
Returns the descriptive string that represents the control type.
handleStandardActions(data)
Executes predefined standard actions based on the selected menu option.
This method is invoked when a user selects a standard action from the custom actions menu.
It routes the action to the appropriate internal handler.
This method is invoked when a user selects a standard action from the custom actions menu.
It routes the action to the appropriate internal handler.
| Name | Type | Default | Description |
| data | {Object} | The action context data.
data.menuId The identifier for the selected standard action. data.rowData The data of the selected item. |
Inherited
hide(collapseFlag)
Hide the view.
| Name | Type | Default | Description |
| collapseFlag | {boolean} | Set to true to collapse the view (equivalent to a view setting of "NONE") |
Example
| MyView.hide(); |
Inherited
isBound()
Returns:
{boolean}
Indicate the bound status of the view.
Inherited
isEnabled()
Returns:
{boolean}
Check whether the view is enabled.
Example
| var enabled = MyView.isEnabled(); |
Inherited
isLabelVisible()
Returns:
{boolean}
Check whether the view label is visible.
Example
| var labelVisible = MyView.isLabelVisible(); |
Inherited
isValid()
Returns:
{boolean}
Return the valid status as last set by the setValid() method.
Example
| var valid = MyView.isValid(); |
Inherited
isVisible()
Returns:
{boolean}
Check whether the view is visible.
Example
| var visible = MyView.isVisible(); |
Inherited
propagateUpValueChange(event)
Returns:
{boolean}
Propagate the value change of the view up through the parent views.
| Name | Type | Default | Description |
| event | {Event} | Value change event (usually an onchange event) |
Example
| MyView.propagateUp(event); |
Inherited
recalculate()
Applicable only to formula-enabled views!
Triggers the re-evaluation of the formula
for the view, if a formula was specified. If the view is not formula-enabled,
Triggers the re-evaluation of the formula
for the view, if a formula was specified. If the view is not formula-enabled,
recalculate() does nothing.Example
| Text1.recalculate();
//If the formula for Text1 is: new Date().toString(), Text1 is updated to the current date/time |
refresh(isNewRoot)
Refreshes the Document Explorer list.
| Name | Type | Default | Description |
| isNewRoot | {boolean} | Reloads content from the root folder (when 'true'). If 'false', content is reloaded from the current folder. |
Inherited
setEnabled(enabled, required)
Enable or disable the view.
| Name | Type | Default | Description |
| enabled | {boolean} | Enabled/read-only flag (true to enable view, false to disable/make read-only) | |
| required | {boolean} | Enable or disable the required field flag for the view. |
Example
| MyView.setEnabled(false); //Make MyView read-only |
setFolderId(folderId, startRefresh)
Sets the root folder ID for Document Explorer.
| Name | Type | Default | Description |
| folderId | {string} | The folder ID. | |
| startRefresh | {boolean} | Enables a refresh to start (when 'true'). |
setInstanceId(instanceId, startRefresh)
Sets the process instance ID for Document Explorer.
| Name | Type | Default | Description |
| instanceId | {string} | The process instance ID. | |
| startRefresh | {boolean} | Enables a refresh to start (when 'true'). |
Inherited
setLabelVisible(visible)
Show or hide the view label.
| Name | Type | Default | Description |
| visible | {boolean} | Label visibility flag (true to show view label, false to hide) |
Example
| MyView.setLabelVisible(false); |
setRefresh(refresh)
Sets the value of the 'Refresh trigger' option. If the value is 'true', the Document Explorer content is refreshed and the trigger value is reset to 'false'.
| Name | Type | Default | Description |
| refresh | {boolean} | Refreshes the content of Document Explorer (when 'true'). |
setServerName(serverName, startRefresh)
Sets the server name for Document Explorer.
| Name | Type | Default | Description |
| serverName | {string} | The server name. | |
| startRefresh | {boolean} | Enables a refresh to start (when 'true'). |
setTitle(title)
Sets the title of Document Explorer.
| Name | Type | Default | Description |
| title | {string} | The new title. |
Inherited
setValid(valid, errorText)
Flag the view as valid or invalid.
| Name | Type | Default | Description |
| valid | {boolean} | Valid/invalid flag (true to set view valid, false to make it invalid - which typically shows the view with "invalid" styling and indicator) | |
| errorText | {string} | Validation error text to show on the invalid-styled view |
Example
| MyView.setValid(false, "Fix your data entry"); //Make MyView invalid |
Inherited
setViewData(data, createPseudoBinding)
Set or update the bound data associated with the view. It applies only to views with bound data.
Note: It should only be used with simple type bindings, or complex type bindings with simple type properties.
It should not be used with bindings that have properties that are lists or compext types. For complex types, set the bindings by using
the
Note: It should only be used with simple type bindings, or complex type bindings with simple type properties.
It should not be used with bindings that have properties that are lists or compext types. For complex types, set the bindings by using
the
binding.set pattern, as described in the Binding data and configuration options documentation section.| Name | Type | Default | Description |
| data | {Object} | The value of the bound data. The parameter type must match the type of the bound data. | |
| createPseudoBinding | {boolean} | If the value is set to true, the parameter creates a pseudo binding if there is no current binding. |
Example
| MyView.setViewData("TEST"); //Updates bound data to the string 'TEST' |
Inherited
setVisible(visible, collapse)
Show or hide the view.
| Name | Type | Default | Description |
| visible | {boolean} | Visibility flag (true to show the view, false to hide it) | |
| collapse | {boolean} | Set it to true to collapse the view space when the option visible is set to false. |
Examples
| MyView.setVisible(false, false); //Equivalent to MyView.hide() |
| MyView.setVisible(false, true); // Sets visibility to "None" |
Inherited
show()
Show this view.
Example
| MyView.show(); |
Inherited
triggerFormulaUpdates([phase])
Broadcast the expression trigger for the specified view.
| Name | Type | Default | Description |
| phase | {int} | bpmext.ui.PHASE_NORMAL | The phase we are currently in |
Example
| MyView.triggerFormulaUpdates(); |