Document Explorer
The Document Explorer control 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 control gives users the ability to search, create, delete and rename folders, when authorized.  The control also allows users to upload, view, checkout and remove documents when authorized.

Content management advanced
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 - IBM BPM managed store, IBM BPM content store, or IBM BPM document store - constants are available for them; for example, ECMServerNames.IBM_BPM_MANAGED_STORE. String
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
Folder 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

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[]

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
Use document viewer: Opens documents in an in-line document viewer when the View menu item is selected. If this option is not enabled, documents open in a new window. 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

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:
Description: The logic that is called when the control is loaded. This event is only fired one time for each page load.
Example:
me.getRecordCount();
On document clicked:
Description: This event is fired when a file is clicked. Additional parameters: doc
Example:
console.log(doc.fileName)
Context Variables doc {object}
Properties id
fileName
mimeType
versionLabel
url
On folder clicked:
Description: This event is fired when a folder is clicked. Additional parameters: folder
Example:
console.log("Folder clicked: "+folder.name)
Context Variables folder {object}
Properties id
name
isReference
parentFolderId
parentFolderServer
server
On delete:
Description: This event is fired after a file or folder is deleted. Additional parameters: record
Example:
console.log("Objcet is deleted: "+record.name)
Context Variables record {object}
Properties id
name
isReference
isFolder
isLocal
server
On refresh:
Description: This event is fired when the document explorer table has been built.
Example:
console.log("Explorer refreshed")
On error:
Description: This event is fired when an error occurs during the execution of operations in the document explorer. Additional parameters: message
Example:
console.log("There has been an error with the operation : "+error.action)
Context Variables error {object}
On folder rename:
Description: This event is fired when a folder is renamed. Additional parameters: folder
Example:
console.log("Folder Renamed: "+folder.name);
Context Variables folder {object}
Properties id
name
oldName
isReference
server
On remove from folder:
Description: This event is fired when an ECM folder or document reference is removed from a BPM folder. Additional parameters: record
Example:
console.log("Object removed from BPM : "+record.name)
Context Variables record {object}
Properties id
name
isReference
isFolder
isLocal
server
parentFolderServer
On document upload complete:
Description: This event is triggered when a document is uploaded. Additional parameters: documentId
Example:
console.log("Uploaded document ID : "+documentId)
Context Variables documentId {string}
On reference created:
Description: This event is fired when a reference for an external folder or document is created. Additional parameter: reference
Example:
console.log("Reference created : "+reference.referenceName)
Context Variables reference {object}
Properties id
parentFolderId
referenceName
referenceServerName
type
Extends:
com.ibm.bpm.coach.CoachView
Methods:

Inherited addClass(name, [replaced])
Add/replace CSS class(es) for this control
NameTypeDefaultDescription
name{string}CSS class name(s) to add to the control. Separate class names by a space if more than one class.
replaced{string}CSS class name(s) to be replaced by the first argument. Separate class names by a space if more than one class.
Example
Button.addClass("green");

createFolder(parentFolderId, newFolderName, serverName)
Creates a new folder in the specified folder path and server.
NameTypeDefaultDescription
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.

Inherited getData() Returns: {Object}
Retrieve bound data associated this view/control. Only works for views/controls 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.

Inherited hide(collapseFlag)
Hide this view/control
NameTypeDefaultDescription
collapseFlag{boolean}Set to true to collapse the view (equivalent to a view setting of "NONE")
Example
MyView.hide();

Inherited isBound() Returns: {boolean}
Indicates bound status of control.

Inherited isEnabled() Returns: {boolean}
Checks if the view is enabled or not
Example
var enabled = MyView.isEnabled();

Inherited isLabelVisible() Returns: {boolean}
Checks if control label is visible
Example
var labelVisible = MyView.isLabelVisible();

Inherited isValid() Returns: {boolean}
Returns the valid status as last set by the setValid() method.
Example
var valid = MyView.isValid();

Inherited isVisible() Returns: {boolean}
Checks whether or not view is visible
Example
var visible = MyView.isVisible();

Inherited propagateUpValueChange(event) Returns: {boolean}
Propagates value change of control up through parent views
NameTypeDefaultDescription
event{Event}Value change event (usually an onchange event)
Example
MyView.propagateUp(event);

Inherited recalculate()
Only for formula-enabled views!
Explicitly triggers the re-evaluation of the formula
for this view (if a formula has been 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.
NameTypeDefaultDescription
isNewRoot{boolean}Reloads content from the root folder (when 'true'). If 'false', content is reloaded from the current folder.

Inherited setData(value)
Set/update bound data associated this view/control. Only works for views/controls with bound data.

Note: Should only be used with simple type bindings, or complex type bindings with simple type properties.
Should not be used with bindings that have properties that are lists or compext types. For complex types, set bindings using
the binding.set pattern detailed in the Knowlege Center section Binding Data and Configuration Options
NameTypeDefaultDescription
value{Object}Value of bound data. The type of this parameter must match the type of the bound data.
Example
MyView.setData("TEST"); //Updates bound data to the string 'TEST'

Inherited setEnabled(enabled, required)
Enable/disable this view/control
NameTypeDefaultDescription
enabled{boolean}Enabled/read-only flag (true to enable view, false to disable/make read-only)
required{boolean}Enable/disable required field flag for control
Example
MyView.setEnabled(false); //Make MyView read-only

setFolderId(folderId, startRefresh)
Sets the root folder ID for Document Explorer.
NameTypeDefaultDescription
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.
NameTypeDefaultDescription
instanceId{string}The process instance ID.
startRefresh{boolean}Enables a refresh to start (when 'true').

Inherited setLabelVisible(visible)
Show/hide the label of this view/control
NameTypeDefaultDescription
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'.
NameTypeDefaultDescription
refresh{boolean}Refreshes the content of Document Explorer (when 'true').

setServerName(serverName, startRefresh)
Sets the server name for Document Explorer.
NameTypeDefaultDescription
serverName{string}The server name.
startRefresh{boolean}Enables a refresh to start (when 'true').

setTitle(title)
Sets the title of Document Explorer.
NameTypeDefaultDescription
title{string}The new title.

Inherited setValid(valid, errorText)
Flag this view/control as valid or invalid
NameTypeDefaultDescription
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, "Please fix your data entry"); //Make MyView invalid

Inherited setVisible(visible, collapse)
Show/hide this view/control
NameTypeDefaultDescription
visible{boolean}Visibility flag (true to show view, false to hide)
collapse{boolean}Set to true to collapse the control space when 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/control
Example
MyView.show();

Inherited triggerFormulaUpdates([phase])
Broadcasts the expression trigger for the specified view
NameTypeDefaultDescription
phase{int}bpmext.ui.PHASE_NORMALThe phase we are currently in
Example
MyView.triggerFormulaUpdates();