Class: ECMFileDropzone

ECMFileDropzone

An ECMFileDropzone control provides the following configuration properties in Process Designer:

Appearance

Show Border: Show border around file upload area. boolean
Square Border Corners: Make the border corners square, instead of rounded boolean
Show Thumbnails: Show tumbnails of files in dropzone boolean

Content Management

Associate with Process Instance: True when the documents to be uploaded will be associated with the current process instance, False otherwise. boolean
Upload Properties: Specifies the matching properties to be uploaded with this document. These properties MUST exist for the Document Object Type Id you are using NameValuePair[]

Content Management Advanced

ECM Server Configuration Name: ECM Server to be used. Default is the Embedded ECM Server. string
Upload Folder Path: Default is the root folder string
Custom Document Object Type Id: Specify the documentObjectType for the documents. This MUST be defined in your ECM Server. string
Custom User Id Property: Note that this property MUST be defined in your ECM Server. This property is used to identify the "requesting" user. Specify the name of the property here. string
Custom Process Instance Id Property: Specifies the Instance ID (PIID). Note that this property MUST be defined in your ECM Server. Specify the name of the property here. string

Behavior

Auto Upload: Automatically upload dropped files boolean
Auto-Remove Uploaded Files: Remove uploaded files from dropzone boolean
Max File Size (MB): Maximum allowed file size for uploads decimal
File Types Allowed: Pick a valid file type from the dropdown, or specify custom to specify your own file type. When empty all file types are valid. FileType[]

Events

On Load:
Description: Triggers whenever the view is loaded.
Example:
me.setAssociatedWithProcessInstance(true)
On File Added:
Description: Triggers when a file is added to the control
Example:
${DocInfoDlg}.show()
Context Variables file {object}
Properties status
name
lastModifiedDate
size
type
On File Selected:
Description: Triggers when selecting a file in the control.
Example:
${DocInfoDlg}.show()
Context Variables file {object}
Properties status
name
lastModifiedDate
size
accepted
On File Removed:
Description: Triggers when a file is removed from the control.
Example:
return confirm("Are you sure you want to remove this?")
Context Variables file {object}
Properties status
name
lastModifiedDate
accepted
xhr
On Upload Complete:
Description: Triggers when files have been uploaded successfully.
Example:
${BPMFileList1}.refresh()
Context Variables file {object} message {string}
Properties status
name
lastModifiedDate
accepted
xhr
On Upload Error:
Description: Triggers when there is an error uploading the files
Example:
console.error("Error occurred: " + error)
Context Variables file {object} message {string} xhr {object}
Properties status
name
lastModifiedDate
accepted
xhr

new ECMFileDropzone()

This constructor is never used explicitly.

Extends

  • com.ibm.bpm.coach.CoachView

Methods

getSelectedFile(){File}

Returns currently selected file
Returns:
Type Description
File

getType(){string}

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

isAssociatedWithProcessInstance(){boolean}

Indicates whether the BPM Attachments are associated with a process instance or not
Returns:
Type Description
boolean

openFileSelectionDialog()

Programmatically opens the file selection dialog. For security reasons, this only works as a result of a user interaction such as a mouse click on another button on the Coach UI

processQueue()

Start uploading the document currently selected

setAssociatedWithProcessInstance(flag)

Sets whether the BPM attachments uploaded are associated with a process instance or not
Name Type Description
flag boolean | String (true/false) or a specific process instance id to use one that is different from the current process instance associated with the Coach UI

setDocumentTitle(title)

Sets the title associated with the currently-selected file (this will becomes the BPM attachment title)
Name Type Description
title String

setLabel(label)

Sets the label for the Browse button
Name Type Description
label String

uploadFile(file)

Start uploading a file
Name Type Description
file File File object to upload