A file attachment is a work item attachment containing an uploaded file.
By default, the attachment is saved as an instance of the Data-WorkAttach-File class, which maps to the pc_data_workattach
database table. The uploaded file may be in any format (for example, a Microsoft Word file, Microsoft PowerPoint file, simple text file, or EXE file). Pega 7 saves the file contents as text by applying Base64 encoding.
Optionally, application users can associate a category with each file attachment. The category typically describes the purpose or contents of the attachment in business terms, not the file format.
By default, file attachments are limited to 1GB in size. You can set a higher or lower limit through an entry in the prconfig.xml file or a Dynamic System Setting.
File attachments are normally a permanent read-only part of the history of a work item. However, in some applications, it may be desirable to let application users edit and update the attached file (using Windows workstation software), creating a higher-numbered version of the file attachment. The application retains all versions, in sequence. Users can edit the description of a new version to add a number or other distinguishing information.
For example, a photograph stored as a JPG file might be difficult to interpret or might contain extraneous material. When rules have the appropriate configuration, users can open and manipulate the JPG file (using Windows imaging software) to crop, filter, or annotate the image. Pega 7 retains the original unaltered file as the first edition and the updated file as the second edition.
Similarly, users can edit a project plan file with Microsoft Project, or revise a Word document, and so on.
The standard flow action Work-.EditAttachment supports opening and editing file attachments.
You can connect your application to an external content management system (such as Alfresco) with a Connect CMIS rule and cause file attachments to be saved in that system rather than in the PegaRULES database.