Saving a Document to a Process Folder

Last Updated: 08/11/2016 Introduced in Verision: 2.0

Process folders allow process states, files and other flow data to be stored in a way that is easy to manage through the portal. Process folders can also contain files input by users, forms, outside systems, or any other entity capable of outputting them.

The Add File component stores an inputted file inside of a process folder. It can be found in the Flow Designer, in the Toolbox panel, under the category Flow Management > Data.


Our example will prompt us to input a file (ClaimHistory.txt) which will then be stored persistently inside of a new process folder.



Our example will start with our system in a state similar to the one at the end of Setting Up a Process Folder to Save Flow Data. We have a root-level folder called Insurance Requests, inside of which are several process folders following the naming convention: [IR-000002] Insurance Request Submitted by [initiating user email].




We already have a flow that creates a new and unique process folder following the naming convention introduced above. It also contains an Add Comment 1 step, that inserts a reminder comment into the process folder.

Rather than show all of the ways our flow might receive a file as input (forms, user interactions, external systems, etc.), add a required input definition to the flow itself. Do this by selecting the Start step in the workspace and clicking the Add button in the Properties panel, under the section Flow Data > Flow Input Data.

In the resulting Edit Object pop-up, define our input as having the Name “inputfile,” and the type FileData, then click Save.



Next, from the Components panel, under the category Flow Management > Data, drag and drop the Add File component into the workspace. This is the step that adds our inputted file to our process folder. Connect it to the other steps of our flow.



Next, map the inputs for Add File 1 by right-clicking Add File 1 and selecting the menu item Show Mapping Editor.

Inside the Mapping Editor, map the FileName property of inputfile to name, and the Contents property to data.



Our flow is now complete and ready to save.

When we run our flow in the debugger, it prompts us to provide the required file. Click the Inputfile selector



and select, from our local file system, ClaimHistory.txt.

We are now ready to continue our debugging session, and we will do so by clicking the Run Without Save button. The debugger successfully runs our flow and returns no errors.

In the portal, under the folder Insurance Requests, find the latest addition to our list of process folders.

When we click to open the folder, the Process View page appears. Notice the document shown in the process history on the right.
Click the Process Data View link below the address bar at the top of the screen. Notice the document listed in the folder.
When the document is clicked, the user is presented with a download option.

Additional Resources