Workflow attachments
Overview
The default workflows in Atoti Limits contain user tasks that let users save files at every point in the workflow. This includes when users:
- approve limits
- reject limits
- review breaches
- comment on warnings
Default Behavior
By default, when a user saves an attachment, the files are saved in the system where
Atoti Limits is deployed, relative to the location of the executable starter jar. This is based on
the value of the activeviam.apps.workflow-service.settings.file-storage-path property, which defaults to ./limits/workflow/attachments.
warning
This path is used when both saving and retrieving files. Should you ever update the property value after you have saved files, you will need to move the files from the old location to the new one.
Then, if a user saves a file in a workflow action, Atoti Limits will:
- Check if the folder specified by
activeviam.apps.workflow-service.settings.file-storage-pathexists. - If not, Atoti Limits will create the folder.
- Atoti Limits will save the file under a timestamped folder, to prevent unintended overwrites.
- The path of the file will be saved as a workflow variable for future retrieval.
Then, when a user attempts to access the attachment via the audit trail of the workflow, they will be able to load the file via the path variable.
Changing the folder location
If you want to change the folder location, modify the value of the activeviam.apps.workflow-service.settings.file-storage-path
property. This value can be absolute or relative.
Customizing the save mechanism
If you want to customize the save mechanism, add your own implementation
of IWorkflowFileStorageService and expose it as a Spring Bean.
Saving files remotely
To save files to a remote drive location rather than a machine-specific location, for example, a Google Drive or Microsoft Sharepoint, we recommend you use the Attachment Link feature rather than the Attachment feature. This will give you more control over your files.
To do so, you should:
- Save the file to your remote drive.
- Save the attachment link in your workflow.
FAQ
What should I do if Atoti Limits says my file is too large?
Large files can cause performance degradations on your server. To help prevent this, we impose that:
- Your file must not be larger than the value of the
spring.servlet.multipart.max-file-sizeproperty, which defaults to1MB. - Your request must not be larger than the value of the
spring.servlet.multipart.max-request-sizeproperty, which defaults to10MB.
These are Spring properties
that you can set in your application.yml.
Why do I not have access to the attachment?
You may not have access to the folder where the attachments are saved. If so, please contact your system administrator.