Class: BPMFileDropzone

BPMFileDropzone

The BPM File Dropzone control allows the user to drag and drop a file from their computer or select a file manually, and will store it in the IBM BPM document store. A BPMFileDropzone 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: Set to true when the documents to be uploaded should be associated with the current process instance, false otherwise. boolean
Hide in portal: Prevent the BPM document from displaying in portal boolean
Upload Properties: Specifies the matching properties to be uploaded with this document NameValuePair[]

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: Select a valid pre-configured file type, 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
Article(s)

new BPMFileDropzone()

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 aresult 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 differentfrom the current process instance associated with the Coach UI

setDocumentTitle(file, title)

Sets the title associated with the currently-selected file (this will becomes the BPM attachment title)
Name Type Description
file File object
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