Gets all the file attachments for a form instance ID
Let’s build and execute the removeFormFileAttachmentsDef example.
- Create a new definition called “removeFormFileAttachmentsDef”
- Select the definition and click the “design” button
- Drag a removeFormFileAttachments step from the toolbox
- Connect the dots between the steps 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. Select an existing form definition which has File control and the form instance with some files submitted.
- Configure the mapping of form file to remove files as shown on the below graphic. In this example, the ErrorLog.xml file, attached through a form instance previoulsy, is configured for removal.
- Save the process definition, create a process instance and execute. Provide the form instance ID (previously created with some file attachments) to the variable as shown here.
- Render the process instance to view the step properties.
- Render the form instance to view the file attachments. The file mentioned has been remove from the form instance successfully.