Back Forward Understanding work object attachments

Concepts and terms

A work object attachment identifies a named file, screen shot image, URL or text note that a user or an activity has associated with a work object. On the standard harness rule Perform and Review forms, a paper clip button provides access to review or add attachments.

Classes for attachments

The system stores attachments in instances of these concrete classes, subclasses of the Data-Work Attach- class:

Your application can include additional custom attachment types.

By default, work object attachments are stored as rows of the pc_data_workattach table. Note that attachments are not stored in the same database table as the work objects themselves.

File attachments

When a user designates a file as an attachment, the system uploads a copy of the file and links it to the history of the work object. The system saves attachments for correspondence in HTML format (HTM file type) even if a user edited the correspondence with Microsoft Word. If the correspondence includes embedded images or other embedded objects, the attachment is saved as a ZIP archive (ZIP file type) containing the objects and the HTM file. The system converts the ZIP file internally into characters using Base64 encoding.

The description text (Subject field) of a file attachment is limited to 60 characters. B-22661

By default, file attachments are restricted to 25 megabytes in size. You can set a larger or smaller limit with the prconfig.xml file setting

<env name="Initialization/MaximumFileUploadSizeMB" value="nn" />

where nn is the size in megabytes.

If a user accesses the Process Commander server with the HTTPS protocol (rather than HTTP), this may block certain download operations from the server to the workstation. For details and suggestions, see Pega Developer Network article PDNPRKB-17997 Troubleshooting: "Internet Explorer cannot download " messages (Tomcat with SSL).

URL and URI attachments

URL and URI attachments can provide flexibility and power while requiring little storage. A URL can point to a document or file on an intranet or the World Wide Web. A URL can also cause Process Commander to execute an activity in your application; the activity can search or retrieve a document or file, call an external system, and so on. See Pega Developer Network article PDNPRKB-16586 Linking to external documents versus importing them as work object attachments.

Screen shot (screen capture) attachments

A user can capture a screen image of any open window as a JPG file, known as a screen shot attachment. The JPG file is stored internally as characters using Base64 encoding. Use the Advanced View of the standard History and Attachments display to enter screen shot attachments

Scanned document attachments

A user with a scanner attached to her workstation can use the Image Viewer tool to scan documents and attach them as TIFF image files to work objects. The standard Work-.AttachFromScanner local flow action starts this operation. The system converts the TIFF file into characters using Base64 encoding.

Use the Advanced View of the standard History and Attachments display to enter screen shot attachments.

Virus checking

Files received from any source might contain computer viruses. You can connect your application's processing of work object attachments to an external virus-checking module. Virus checking occurs before the system saves the attachment to the database. Override the standard extension point activity Data-WorkAttach-File.CallVirusCheck to call the checker and modify processing by the flow rule to handle files reported to contain viruses. C-2417 ECKSM The virus check module can be a Java routine or (when Process Commander is hosted on Microsoft Windows) in a Windows DLL file.

Limits

While the number of attachments you can add to a work object is unlimited, the standard list view rule  Link-Attachment.AttachmentList.ALL displays only up to 100 attachments. You can override this rule if necessary. CLINIC 7/19/2005

Attachments and search results

If the "Index Attachments" checkbox is checked in the Search gadget of the System landing page (Pega> System > Settings > Search ), a search of work objects in a composite User portal can include searching the contents of text-file attachments for a specified word or text string. See Understanding full-text search.wetma 4-1-10

Conversion of DOC to PDF format

Process Commander provides two approaches to convert Word DOC files to Portable Document (PDF) formats. For each approach, the original DOC file and the converted PDF file become two file attachments, typically of separate categories:

To convert in the background: C-2438

  1. Install PegaDISTRIBUTION Manager 3.3.5 on an appropriate Windows server.
  2. Add the Utility activity Work-.ConvertAttachmentToPDF to the flow rule, supplying as parameters both the name of the existing DOC attachment category and the target attachment category for the PDF file.
  3. In later flow processing, ensure that outgoing correspondence that needs to include the PDF file is not sent until PegaDISTRIBUTION Manager returns the PDF attachment. Conversion can take several minutes.

To convert in the foreground, include the standard flow action .Work-.ConvertAttachmenttoPDF as a local flow action in appropriate assignments in the flow rule. Users must select this flow action, complete the form, and wait for workstation conversion.

Attachment category rules

You can support attachments with attachment category rules to control the user's ability to add, view, edit, or delete attachments. For more information, see Attachment category.

Definitions assignment, attachment category, attachment type, base64 encoding, correspondence, note attachment, PegaDISTRIBUTION Manager, perform, screen shot attachment, work object
Related topics How to define and use attachment categories and versions
About Attachment Category rules
User portal basics — About work object history and attachments
How to call a Windows DLL library
Troubleshooting work object attachments
About the Scan Station
Using the Image Viewer

UpConcepts