Class: ECMFileUploader

ECMFileUploader

The ECM File Uploader control allows the user to select and upload a file from their computer. The file can be given specific properties and can be targeted to a particular ECM folder. An ECMFileUploader control provides the following configuration properties in Process Designer:

Formula

Doc Title Formula: Formula/expression to be auto-calculated (to set the section title) string

Appearance

Color Style: Color-based styling for this control (default, primary, success, warning, danger)
{Default | Primary | Info | Success | Warning | Danger}
string
Shape Style: Rounded, flat or default square control shape
{Default | Rounded | Flat}
string
Size Style: Size-based styling for this control (default, large, small, extra-small)
{Default | Large | Small | Extra-Small}
string
Outline: Outline-only means the control only shows its color-based style when hovered over boolean
Icon: Icon name, for example: calendar, clock-o, camera, cloud-upload, bell, info, file-text, etc... Check http://fontawesome.io/icons for a comprehensive list. (Note that the "fa-" prefix is optional) string
Hide Browse Button: When true, the Browse Button is not displayed, when false it is displayed boolean
Hide File Name: When true, the File Name is not displayed, when false it is displayed boolean

Content Management

Upload Properties: Specifies the matching properties to be uploaded with this document 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. Default is "cmis:document". string

Behavior

Max File Size (MB): Maximum allowed file size for uploads decimal
Auto Upload: Upload selected files automatically. If not selected, use the startUpload() method instead boolean
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[]

new ECMFileUploader()

This constructor is never used explicitly.

Extends

  • com.ibm.bpm.coach.CoachView

Methods

getColorStyle(){string}

Gets color style of button
Returns:
Type Description
string {"D"=Default | "P"=Primary | "I"=Info | "S"=Success | "W"=Warning | "G"=Danger}

getDocumentTypeId(){string}

Get Document Type to be used
Returns:
Type Description
string

getFileName(){string}

Get name of file currently in process designer
Returns:
Type Description
string

getFolderPath(){string}

Get folder path to be used
Returns:
Type Description
string

getSelectedFile(){File}

Returns currently selected file
Returns:
Type Description
File

getServerName(){string}

Get ECM Server to be used
Returns:
Type Description
string

getShapeStyle()

Gets shape style of button

getSizeStyle(){string}

Gets size style of button
Returns:
Type Description
string {"D"=Default | "L"=Large | "S"=Small}

getText(){string}

Get text of button
Returns:
Type Description
string

getType(){string}

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

getType(){string}

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

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

setColorStyle(style)

Sets color style of button
Name Type Description
style string "D"=Default | "P"=Primary | "I"=Info | "S"=Success | "W"=Warning | "G"=Danger

setDocumentId(documentId)

updates the specified document
Name Type Description
documentId string Document id of the document to be updated

setDocumentTitle(title)

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

setDocumentTypeId(text)

Set Document Type to be used
Name Type Description
text string The Document Type used

setFolderPath(text)

Set folder path to be used
Name Type Description
text string The folder path to be used

setIcon(icon)

Sets icon to display on the button
Name Type Description
icon string visit http://fontawesome.io/icons/ for icon options

setLabel(label)

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

setOutline(outline)

Sets outline style of button
Name Type Description
outline boolean {true | false}

setServerConfig(name, folder)

sets exernal configured server and folder path for uploader
Name Type Description
name string of exernal configured server
folder string path on external server to upload file

setShapeStyle(style)

Sets shape style of button
Name Type Description
style string "D"=Default | "R"=Rounded | "F"=Flat

setSizeStyle(style)

Sets size style of button
Name Type Description
style string "D","DEFAULT"=Default | "S","SMALL"=Small | "L","LARGE"=Large | "X","EXTRA-SMALL"=X-small

setText(text)

Set text of button
Name Type Description
text string Text to be set on the button

setUploadProperties(propNames, propVals)

Set upload property names and values. Length of parameter lists must be equal
Name Type Description
propNames Array.<string> Property names
propVals Array.<ANY> Values for each property name

uploadFile(file)

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