getFileAttachments Step
Description:
The GetFileAttachments workflow step retrieves the file attachments associated with a specified form instance ID. The retrieved attachment information can then be stored in workflow Variables or Global variables for use by subsequent workflow activities.
This step retrieves all the file attachments for a Form Instance ID. These files are accessed from the file system on the application server or the DMS file storage folder, whose configuration is defined in the “Start” process step.
Inputs
- formInstanceID – The Variable/Global/FormVariable that holds the form instance ID property specifies the form instance whose file attachments should be retrieved.
- filefieldMappings - The Mapping of file Control ID property specifies the mapping of file controls associated with the form.
- formID - The Select Form Definition property allows a Form Definition to be selected.
- fileAttachmentsPath - The Variable/Global to store the file attachments path property specifies the Variable or Global variable where the attachment path information should be stored.
- fileAttachmentsFileName - The Variable/Global to store the file attachments file name property specifies the Variable or Global variable where the attachment file-name information should be stored.
- fileAttachmentsFormat - File list format (XML / JSON) The File list format property specifies the format in which the file-list information is returned.
Returns
- True – The True return path can be connected to the next workflow activity when the GetFileAttachments operation completes successfully.
- False – The False return path can be used for an alternative workflow path or error-handling logic when the operation does not return a successful result.
Usage:
The GetFileAttachments step is typically placed after a workflow has obtained or created a Form Instance ID and needs to retrieve the files attached to that form instance.
A typical workflow pattern is:
Get Form Instance ID → GetFileAttachments → Process Attachments
The information returned by the step can then be used by later workflow activities to:
- Identify files attached to a form.
- Retrieve attachment path information.
- Work with attachment file names.
- Process selected form file controls.
- Pass attachment information to another workflow activity.
- Perform downstream document or file processing.
- Build an attachment-processing workflow.
- Determine whether the form contains attachments that require further processing.

Typical Workflow Suggestions:
Retrieve Attachments from a Form Submission
Use this step after a form has been submitted and the workflow has access to the corresponding Form Instance ID.
Example:
Form Submission → Get Form Instance ID → GetFileAttachments → Process Files
The workflow can retrieve attachment information and pass the results to subsequent activities.
Process Uploaded Documents
Use GetFileAttachments when a form allows users to upload documents that need to be processed after submission.
Example:
Form Submission → GetFileAttachments → Document Processing
You can use the returned attachment information as input for subsequent document-processing activities.
Process Multiple Form Attachments
Use the step when a form can contain multiple file attachments and the workflow needs to retrieve the associated file information.
Example:
Get Form Instance → GetFileAttachments → Process Attachment Information
You can configure the mapping of the file Control ID property when the workflow needs to work with file controls associated with the form.
Retrieve Files from a Specific Form Definition
Use the optional Select Form Definition property when the workflow needs to associate the attachment retrieval with a particular Form Definition.
Example:
Select Form Definition → Get Form Instance → GetFileAttachments → Continue Process
The Form Definition property is optional in the step configuration.
Store the Attachment Path
Use the step when downstream workflow activities require the location or path information associated with the retrieved attachments.
Example:
GetFileAttachments → File Processing Step
Configure the Variable/Global to store the file attachments path property with a meaningful workflow Variable or Global variable.
Store the Attachment File Name
Use the step when subsequent processing needs the file name associated with the retrieved attachment.
Example:
GetFileAttachments → Use File Name → Process File
Configure the Variable/Global to store the file attachments file name property to store the returned file-name information.
Retrieve Attachments Before Downstream Processing
GetFileAttachments can be used as an intermediate workflow activity before another activity processes the retrieved files.
Example:
Form Data → GetFileAttachments → File Validation → File Processing
This pattern separates attachment retrieval from subsequent validation and processing activities.
Route the Workflow Based on the Result
Use the True and False connections to create different workflow paths.
Example:
Start → GetFileAttachments
- True → Continue Attachment Processing
- False → Handle Retrieval Failure
The step provides exactly two return values: False and True.
Prepare Attachment Information for Another Workflow Step
Use GetFileAttachments as a preparation step before another activity needs information about files associated with a form.
Example:
Get Form Data → GetFileAttachments → Downstream File Activity
The attachment path and file-name values are explicitly configured to be stored in Variables or Global variables, making them available to later workflow activities.
Use File Control Mappings
When a form contains file controls, configure the Mapping of file Control ID property when the workflow needs the file-control mapping information.
Example:
Form Instance → GetFileAttachments → Process File Control Information
The XML identifies this property as optional getFormFileFieldMappings configuration.
Select the Required File List Format
When downstream processing expects a particular file-list representation, configure the optional File list format property.
Example:
GetFileAttachments → Format Attachment Information → Downstream Activity
The step exposes this as an optional ResultFormat property.
Example:
Let’s build and execute the “getFileAttachmentsDef” example. This example requires a Process and a Form Definition.
- Create a new Form Definition named “getFileAttachmentsDef” and open it in designer mode.
- Drag the “bootstrapGrid, Label, TextArea, FileList, and Submit” controls to the canvas and arrange them as shown below.

- Create a new process definition named “getFileAttachmentsDef” and open it in designer mode.
- Drag a “RouteForm, and getFileAttachments” step to the canvas.
- Connect the dots between the “Start” step and other steps, as shown below.

- Click the “RouteForm” step to configure the “Required” properties. Select the Form Definition from the drop-down list above. Provide a variable or global reference to store the Form Instance ID. Select the “Optional” tab, then route this Form to a user or an app role. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the “getFileAttachments” step to configure the “Settings” properties. Provide a variable or global reference that holds the Form Instance ID. Provide a variable or global reference to store the file attachment paths and file names. These file paths refer to the file system on the application server or the DMS file storage folder, whose configuration is defined in the “Start” process step. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the “getFileAttachments” step to configure the “Optional” properties. Select the Form Definition from the drop-down list. Click the button to configure the file control ID. A pop-up window appears for configuration. Click the Add Row (+) button to insert an empty row. Select FileControl from the drop-down list. Click the Save button. To store the result, select the file list format (blank, XML, or JSON) from the drop-down list. Note: Using the “blank” option returns the list of files.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Configure the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition, create a new process instance, and execute it. Render the process instance and select the Get Attachments step to view its properties. When the workflow reaches the GetFileAttachments step, FlowWright uses the configured form instance ID to retrieve the associated file attachment information. The resulting attachment path and file-name information are stored in the configured Variables or Global variables. The workflow can then continue through the True path or use the False path for an alternative workflow route. The workflow assigns the Form Task to the user. Click the task to render the Form.

- In this example, the Form is rendered on a new page. You must provide the required user input and submit the Form with the file attachments, as shown below.

- The process is complete. Render the process instance, then click the “getFileAttachment” process step to view its properties. The step should retrieve the file path and names as configured.

Tips:
- Always provide a valid Form Instance ID before executing the step.
- Use a meaningful Variable or Global variable for the stored attachment path.
- Use a meaningful Variable or Global variable for the stored attachment file name.
- Configure the Mapping of the file Control ID when processing specific form file controls.
- Use Select Form Definition when the workflow requires a particular Form Definition.
- Configure the file list format to meet downstream processing requirements.
- Verify that the Variables or Global variables configured as output destinations are available to the workflow.
- Test the workflow with a form instance that contains attachments.
- Also test the workflow with a form instance that has no attachments.
- Test forms containing multiple file attachments where applicable.
- Test attachments associated with different file controls.
- Verify that the returned path and file-name values are correctly stored before using them downstream.
- Use meaningful names for attachment-related Variables and Global variables.
- Connect the False return path to appropriate alternative or error-handling logic.
- Avoid assuming the exact file-list format or returned representation without confirming the selected File list format configuration.
- Test the workflow after changing the Form Definition or file-control mappings.
- Verify downstream activities against realistic attachment data.
- Consider security and access permissions when passing attachment paths to subsequent activities.
- Avoid exposing sensitive attachment information through workflow logs, notifications, or external integrations.
- If attachments are passed to external systems, verify that the receiving activity expects the format produced by the configured File list format.
- Confirm that environment-specific file-storage paths or permissions are appropriate before deploying the workflow.
Definition Sample:
You may download the sample definition(s) from the link provided and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page, following the same approach described in the reference documentation page.
Note: Verify and complete any missing configuration after importing the sample, including:
- Form Instance ID.
- Mapping of file Control ID.
- Form Definition.
- Variable or Global variable used to store the attachment path.
- Variable or Global variable used to store the attachment file name.
- File list format.
- Workflow Variable references.
- Environment-specific file-storage settings.
- Downstream True and False workflow paths.
- Any permissions required to access the retrieved attachments.
After verifying the configuration, save the Process Definition before execution.