Setting Document Title for BPM File Uploader Control

Let's say we need to have a document uploaded where the document title needs to be changed based on user input. How would we go about doing that? This KB article will walk you through the steps to set it up.

Note:  I will just be showing the Document Title as it is a much more common requirement, but these same principles can be used to set up any document properties that you want to have associated to the document. I will leave that up to you expand the example.

First, create a Coach with the BPM File Uploader, BPM File List controls, and add a Text control for the input of our Document Title. Make note of the Control Ids for both the BPM File List and Text controls, as you will use them in the Events of the File Uploader.

The files uploaded through the File Uploader will be stored in the BPM Content Store IBM Knowledge Center, and we must specify in both the BPM File Uploader and BPM File List controls that we want the files Associated with our Process Instance. (Both selections are under 'Content Management' in Configuration)

Process Instance Association for BPM File List


To avoid using the 'startUpload()' method, the BPM File Uploader provides an option to Auto Upload files. (under Behavior)

Auto Upload Files

Now that we have the configuration settings for uploading and viewing files related to the same Process Instance, we can focus on the Events of the File Uploader in order to allow our Document Title to be set.

The Control Ids we use are the following:

Our Text control for the Document Title: 'DocumentTitle'

Our BPM File List control: 'BPM_File_List1' 

In the 'On File Selected' we get the name from our Text control by using:

me.setDocumentTitle(file, ${DocumentTitle}.getText()); //Set the document title to the value of the DocumentTitle text control

In the 'On Upload Complete' we force the File List to refresh itself after we upload our file:

${BPM_File_List1}.refresh(); //Here to make sure that when the document is uploaded we can see it in the File List below

File Uploader Configuration

There are many other configuration settings and combinations when using these Spark controls, such as restricting the file types, deleting files, and so on. Feel free to read through our articles on the BPM File Uploader and BPM File List for more information.


  • Authors: Rackley Boren, Alex Borodaev
  • Date Created: June 3, 2016
  • Date Modified: June 3, 2016
Was this article helpful?
0 out of 0 found this helpful