Saving a Document to a Process Folder
  • Updated on 10 Apr 2019
  • 2 minutes to read
  • Print
  • Dark

Saving a Document to a Process Folder

  • Print
  • Dark

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.

We 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: [AP-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 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.), we will 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 theName "inputfile," and the typeFileData, then click OK .


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 by right-clickingAdd File and selecting the menu item Edit Input Mappings .
Inside the Mapping Editor, map theFileName 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, in the debugger setup screen, Select Choose File on the right hand side.


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 button. The debugger successfully runs our flow and returns no errors.
In the portal, under the entities Insurance Requests , find the latest addition to our list of process entities.


When we click to open the entity, the Process View page appears. Notice the document shown in the process history on the right.


You are presented with options to Download or Update the Document.

Was this article helpful?