getFileAttachments Step

Last published at: May 2nd, 2023

Description:

Gets all the file attachments for a form instance ID

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.          

  • Create a new 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 on the below graphic 

  • Click on the “RouteForm” step to configure its properties
  • Configure the following values for the properties as shown on the below graphic
  • Click on the “getFileAttachments” step to configure its properties
  • Configure the following values for the properties as shown on the below graphic
  • Configure form field to get file attachments by their <formRowId>. When no mappings are configured; the step fetches all file attachments. 
  • Save the process definition, create a process instance and execute. 
  • Complete the form task inputs and submit (an example shown below)  
  • GetFileAttachment step shall fetch the file attachment list and file names and stores them in their respective variables/globals.
  • Render the process instance which is completed to view
  • Click on Get Attachment step to view the properties. The file attachment list and file names are shown on the below graphic