File Type Overview
  • 14 Aug 2024
  • 2 Minutes to read
  • Dark
    Light

File Type Overview

  • Dark
    Light

Article summary

Overview 

This article demonstrates how users can handle and manage File types within the platform.

  • File Data
  • File Reference
  • File Reference Entity

File Data

File Data is a Data Type used for file handling and is stored as a Byte Array within a Flow. This data is handled as Flow data and increases the overall size of the Flow. By using a Create Data step or by defining Input/Output Data as File Data, users are able to utilize files within their Workflows. The File Data Data Type stores the following information on the File to provide assistance when processing/referring to the File within a Flow:

File informationDescription
IdId for which the file is stored under
FileNameString value for the imported file's name
LengthNumerical value denoting the length of the file's byte array
FileTypeType of File Extension (.pdf, .docx, .csv, etc.)

File Reference

File References provide a way to access a file through a Flow or process without loading the File data within the Flow memory. Instead, the file will be stored and accessed within the FileStorage, increasing efficiency by reducing the amount of data accessed by a Flow. This is advantageous over FileData for large files, as the file does not need to exist in memory to be utilized.

To utilize File References in a Flow, steps such as the Load From Path or Load From File Data allow users the ability to create a File Reference that can be used within a Flow.

Note: Decisions will not store any of the File Reference data in the platform. Thus if the file is not present in the file storage, it might cause the Flow to break. 


File Reference Entity 

File Reference Entities are an extension of the File Reference and have a similar behavior as File References. Rather than storing the file data within the file storage, File Reference Entity stores the file data within the Decisions Instance via a Folder or Designer Project that can be referenced within the Flows.

To utilize File Reference Entity in a Flow, users need to create the File Reference Entity data within the platform. Steps such as Add Reference to Folder.

Example:

This example demonstrates how to create a File Reference Entity using the 'Add Reference to Folder' Step.

  1. Create a Flow. From the toolbox, add the 'Load From File Data' Step and connect it to the input step. 
  2. From the Step Properties Panel > Inputs, configure the File input property to constant. This will allow the users to upload a file as input to the Flow. Upload a Test File.
  3. From the toolbox, add the 'Add FileReferences To Folder' Step and connect it to Load From File Data and output, as shown in the following image.
  4. From the Step Properties Panel > Inputs, configure the File References input property to Build Array. This will allow to pass a single File Reference. Map Item 0 to the output of the 'Load From File Data' Step. 
  5. Configure the Folder ID property to constant and give a Folder ID. Folder ID can be found at Right-click a Folder > Manage > Get Folder/Designer Folder ID.
  6. Debug the Flow. Navigate to the folder associated with the provided Folder ID to confirm that the new FileReferenceEntity is created. Files under the file reference entity can be created

For further information on Flows, visit the Decisions Forum.

Was this article helpful?