Class: DocumentExplorer

DocumentExplorer

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.   A DocumentExplorer control provides the following configuration properties in Process Designer:

Behavior

Show Footer: Show the table footer boolean
Show Table Stats: Show table statistics (e.g. "Showing 1 to 5 of 59 entries") boolean
Show Pager: Visibility of the pager boolean
Initial Page Size: Initial maximum number of entries to be shown per page integer
Confirm On Deletion: Enable to bring up a confirmation dialog before deleting files 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: Enables the contents of the control to be refreshed. Bind this property to the private variable that is used by the Refresh Controller control, the Refresh Button controls, or both controls.
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
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: Indicates whether the Document Explorer control is hidden, for example, for a BPD. boolean

Content Management

Last Updated Doc Id: Document ID of document on which create or update operation was performed ECMID
Hide in portal: Prevent the BPM document from displaying in portal boolean
Add BPM Properties: By default, properties are not added to new BPM documents. Enabling this configuration option adds the properties defined in the Upload 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: Lists the properties to add to a BPM document when it is being created when Add properties is enabled NameValuePair[]
Default ECM document Properties: Specifies the matching properties to be uploaded with this document ECMDefaultProperty[]

Content Management Advanced

Instance Id: Displays the list of documents and folders for the instance ID. If the Folder ID property is configured, the Instance ID configuration is ignored.
If neither the Folder ID nor the Instance ID properties are configured, 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, tw.system.currentProcessInstance.id and tw.system.currentProcessInstance.caseFolderId properties are used for the context.
string
Folder Id: Displays the list of documents and folders for the folder ID. 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 configuration.
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, tw.system.currentProcessInstance.id and tw.system.currentProcessInstance.caseFolderId properties are used for the context.
string
Server Name: If a Folder ID is configured, 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

Appearance

Table Style: Style of the table
{Default | Elegant | Bordered | Striped | Hover Row | Condensed}
string
Color Style: Color style for table display
{None | Light | Primary | Info | Success | Warning | Danger}
string
Width: Width in px, %, em For example: 500px, 20%, 40em. If no unit is specified, px is assumed string
Height: Height in px, %, em For example: 500px, 20%, 40em. If no unit is specified, px is assumed string

Columns: Columns to display in list ExplorerColumn[]
Label string
Field
{Doc Name (Clickable) | Last Modified By | Last Modified Date | MIME Type}
string
Sortable boolean
Width string
Options string
Css string

Events

On Load:
Description: This event is triggered when the control is loaded.
Example:
me.getRecordCount();
On Document Clicked:
Description: This event is triggered when a file is clicked.
Example:
console.log(doc.fileName)
Context Variables doc {object}
Properties id
fileName
mimeType
versionLabel
url
On Folder Clicked:
Description: This event is triggered when a folder is clicked.
Example:
console.log("Folder clicked: "+folder.name)
Context Variables folder {object}
Properties id
name
isReference
parentFolderId
parentFolderServer
server
On Delete:
Description: This event is triggered when a document or folder is deleted.
Example:
console.log("Objcet is deleted: "+record.name)
Context Variables record {object}
Properties id
name
isReference
isFolder
isLocal
server
On Refreshed:
Description: This event is triggered when the control is refreshed.
Example:
console.log("Explorer refreshed")
On Error:
Description: This event is triggered when there is an error while executing operations in control.
Example:
console.log("There has been an error with the operation : "+error.action)
Context Variables error {object}
On Folder Rename:
Description: This event is triggered when folder is renamed.
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 triggered when ECM folder or document reference is removed from BPM folder.
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 document is uploaded.
Example:
console.log("Uploaded document ID : "+documentId)
Context Variables documentId {string}
On Reference Created:
Description: This event is triggered when reference of external folder or document is created.
Example:
console.log("Reference created : "+reference.referenceName)
Context Variables reference {object}
Properties id
parentFolderId
referenceName
referenceServerName
type

new DocumentExplorer()

This constructor is never used explicitly.

Extends

  • com.ibm.bpm.coach.CoachView

Methods

createFolder(Object, Name, Name)

creates folder on specified folder path and server
Name Type Description
Object string ID of Parent folder inside given server
Name string of folder to be created
Name string of server

getFolderId()

returns folder id of document explorer
Type Description
string

getInstanceId()

returns instance id of document explorer
Type Description
string

getRecordCount(){integer}

Get the number of records that is in the explorer list
Returns:
Type Description
integer

getRefresh(){boolean}

returns refresh status of document explorer list
Returns:
Type Description
boolean

getServerName(){string}

Returns the name of content server
Returns:
Type Description
string

getServerName()

returns server name of document explorer
Type Description
string

getType(){string}

Get descriptive string representing the type of control
Returns:
Type Description
string

refresh(false-Reloads)

Refreshes the explorer list.
Name Type Description
false-Reloads boolean current folder. true-reloads control from root

setFolderId()

sets folder id for document explorer
Type Description
string

setInstanceId()

sets instance id for document explorer
Type Description
string

setRefresh(Refresh)

refreshes document explorer list
Name Type Description
Refresh boolean required

setServerConfig(Instance, Folder, Name)

sets server details
Name Type Description
Instance string ID
Folder string ID
Name string of server

setServerName()

sets server name for document explorer
Type Description
string
sets title of document explorer
Type Description
string

setTitle(){string}

returns title of document explorer
Returns:
Type Description
string