getFileAttachments Step

Use this step to fetch the file attachments for a Form Instance ID

Last published at: October 7th, 2024

Description:

This step fetches all the file attachments for a Form Instance ID specified. 

 

Inputs

  • formInstanceID – Variable that holds the form instance ID
  • filefieldMappings -Variable to hold mapping of file Control ID
  • formID -Variable to hold form ID 
  • fileAttachmentsPath - Variable to store the file attachments path
  • fileAttachmentsFileName - Variable to store the file names attached
  • fileAttachmentsFormat - File list format (XML / JSON)
 

 

Returns

  • True – True condition
  • False – False condition
 

 

Usage:

 

 

Example:

Let’s build and execute the “getFileAttachmentsDef” example. This example requires a workflow and a form definition.           

  • Create a new form definition called “getFileAttachmentsDef”
  • Select the definition and click the “design” button
  • Drag a “bootstrap grid, label, text area, file list, and submit” controls from the toolbox and arrange them as below. 

 

  • Create a new process definition called “getFileAttachmentsDef”
  • Select the definition and click the “design” button
  • Drag a “RouteForm,” and “getFileAttachments” step from the toolbox
  • Connect the dots between the steps as shown in the graphic 

 

  • Click the “RouteForm” step to configure the “Settings” properties. Select the above Form Definition from the drop-down list. Provide a variable/global reference to store the form instance ID. Route this Form to a user in the Advanced tab. Save the step configuration.  

 

  • Click the “getFileAttachments” step to configure the “Settings” properties. Provide the variable/global reference that holds the Form Instance ID. Provide the variable/global reference to store the file attachments path and their file names. Save the step configuration. 

 

  • Click the “getFileAttachments” step to configure the “Advanced” properties. Select the above Form Definition from the drop-down list. Click the button to configure the file control ID. Select the file list formats (blank, XML, JSON) from the drop-down list. The “blank” choice provides the list of files 

 

  • Save the process definition, create a new process instance, and execute. The workflow assigns the user the Form Task. Click on the task to open the Form. 

 

  • Submit the Form with some file attachments as below. 

 

  • The workflow is completed. Render the process instance and click the “getFileAttachment” process step to view the properties. The step should get the file path and names as configured. 

 

 

Definition Sample:

You may download the sample definition(s) from the link here and later import it (drag-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

NOTE: Please verify and complete the process steps for any missing configurations, such as file path references and database connections after import. Then, save the definition to confirm the changes.

Click here to download the Form Definition sample file.

Click here to download the Process Definition sample file.