Attaching content to a case
|Description||Setup and use of attachments in a case|
|Version as of||7.4|
|Capability/Industry Area||Case Management|
Case attachments are files that are associated to a case and provide additional details for the case worker. Case attachments can be provided by the customer who instantiated the case or associated to the case later by the case workers. An instance of Data-WorkAttach-File is created for each attachment and associated to the appropriate case instance with a Link-Attachment record.
Categorization of attachments
Create attachment categories in your case type to provide additional context and control over the attachments. Use attachment categories to:
- Enforce specific security configurations across a group of related files. Pega supports both privilege-based and when rule-based configurations on each category to define security criteria as to who can create, view, or delete attachments, and when.
- Ensure specific conditions for attachments are met during the case life cycle, such as preventing access to a stage unless the case has attachments of a certain category.
- Provide additional context to attachments. For example, using an ID Proof category in a job application case clarifies the meaning of these attachments and the role that they play in the case.
- Group related attachments for external communications (for example, sending an email with specific case attachments).
Associating and retrieving attachments
The case interface provides two ways of associating and displaying attachments: Attachment field and Attachment gadget. Attachment field is defined by the developer as part of the case data model and supports the ability to add the attachment field UI in the case views. Attachment gadget is included by default in all cases to display all the attachments associated to the case and provide an ad-hoc option to add, delete, or download attachments throughout the case life cycle.
Use Attachment field when:
- A user needs to be guided to add an attachment in a form, for example, when a user is expected to attach a file at a specific step.
- You need to associate a file as part of a case creation.
Use Attachment gadget (pyCaseAttachments) if:
- You intend to provide a unified view of all the associated attachments, along with the ability to attach new file.
For any outbound communication that is needed from the case (like SendEmail or SendNotifications), all the related attachments can be clubbed and sent out by referring the category through which they are associated.
Pega offers several models of file storage integration: repository, web storage, database, and Content Management Interoperability Services (CMIS). Repository, web storage, and CMIS can be used both for storing attachments and for sourcing attachment files – browsing files in storage and attaching them to your case.
Choose the repository model of integrations whenever possible. Repositories offer greater flexibility for file interactions by offering out-of-the-box data pages for common file operations and are integrated into various capabilities such as Deployment Manager, File listener, and Archive & Purge. The repository offers performance and scalability benefits by streaming the attachment files instead of loading them into memory, reducing risk for overusing the system resources (such as memory) with large files or multiple concurrent file operations.
Repositories offer a standard set of data pages and APIs that provide a simple and unified to accomplish common file operations, such as create a new file or read a file, on a variety of different cloud storage providers. Out of the box, Pega Platform™ supports Pega Cloud® File Storage (Pega Cloud only), AWS S3, Azure Blob storage, JFrog Artifactory, and a local file system. You can create your own pluggable repository storage types by implementing the set of data pages for your storage – the new custom repository type will be available to use just like the out-of-the-box types, and can be used with the Pega Platform features that leverage repositories. For example, a Google Drive custom repository is available on Pega Marketplace. After they are downloaded and installed, Google Drive repositories can be used to store and source case attachments.
Pega Cloud File Storage
Pega Cloud File Storage (PCFS) is a default repository available only for applications deployed on Pega Cloud. PCFS is preconfigured, ready to use, and is set as the default attachments storage for all applications that are deployed on Pega Cloud.
PCFS is highly reliable, private, and secure. Only your applications can access your storage space, and data is encrypted both in transit and at rest.
Web storage offers a limited set of standard data pages that support file interactions with web storage providers. The web storage model has been replaced by the more powerful repository model. While web storages are fully supported, they are no longer being actively developed.
Choose web storage for the following situations:
- If you are using Pega Platform 7.2 through 7.3.1.
- If your organization is currently relying on one of the existing web storage options like Box or SharePoint Online.
Content Management Interoperability Services (CMIS) is an open standard that allows content and document management systems to communicate with each other over the web. The CMIS standard has not been widely adopted and is in rapid decline in the industry. While Pega supports the existing case attachment options with CMIS 1.0, it is no longer being actively developed and is not recommended for use. Choose instead to create a custom repository type by leveraging the REST APIs offered by your storage provider.
This is the default configuration available for attachment storage for any Pega deployment outside of Pega Cloud. Storing your attachments in the database is not recommended as a long-term solution for your apps because file attachments can add large volumes of data to your database, making it harder to maintain over time. Choose instead to use a repository that is optimized and intended for file storage.
File size configurations
When files are not streamed (for example, when the application is configured to use a database for attachment storage), file sizes are limited to protect the application resources. The maximum file size allowed is determined by the lowest value set in the prconfig/Initialization/MaximumFileUploadSizeMB/ dynamic system setting (DSS) and the value in the pyMaxDragDropAttachSizeMB property for your app.