Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The default workflows in Atoti Sign-Off contain user tasks that let users save files at every point in the workflow. This includes when users:
  • publish or archive definitions
  • request approval for tasks
  • approve or reject tasks

Default behavior

By default, when a user saves an attachment, the files are saved in the system where Atoti Sign-Off is deployed, relative to the location of the executable starter jar. This is based on the value of the sign-off.workflow.file-storage-path property, which defaults to sign-off/workflow/attachments.
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 Sign-Off will:
  1. Check if the folder specified by sign-off.workflow.file-storage-path exists.
  2. If not, Atoti Sign-Off will create the folder.
  3. Atoti Sign-Off will save the file under a timestamped folder, to prevent unintended overwrites.
  4. 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.

Change the folder location

If you want to change the folder location, modify the value of the sign-off.workflow.file-storage-path property. This value can be absolute or relative.

Customize the save mechanism

If you want to customize the save mechanism, add your own implementation of IWorkflowFileStorageService and expose it as a Spring Bean.
/**
 * <b>IWorkflowFileStorageService</b>
 *
 * <p>Handles file storage when saving attachments in the workflow.
 *
 * @author ActiveViam
 */
public interface IWorkflowFileStorageService {
    /**
     * Saves a file to the storage.
     *
     * @param file the file to upload
     * @return the file name and parent folder, which is a random UUID
     */
    String saveFile(MultipartFile file);

    /**
     * Gets a file from the storage.
     *
     * @param fileNameAndParentFolder the file name and parent folder, which is a random UUID
     * @return the downloaded file
     */
    Resource getFile(String fileNameAndParentFolder);

    /**
     * Deletes a file from the storage.
     *
     * @param fileNameAndParentFolder the file name and parent folder, which is a random UUID
     */
    void deleteFile(String fileNameAndParentFolder);
}

FAQ

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-size property, which defaults to 1MB.
  • Your request must not be larger than the value of the spring.servlet.multipart.max-request-size property, which defaults to 10MB.
These are Spring properties that you can set in your application.yml.
You may not have access to the folder where the attachments are saved. If so, please contact your system administrator.