Fuego.Lib : AttachmentVersion

An instance of the AttachmentVersion component represents a specific version of a file attachment on a process instance.

To get information about all the versions of a particular file attachment, use the versions attribute of the Attachment component. The versions attribute is an array of AttachmentVersion objects.

You do not create instances of AttachmentVersion directly. Use the method Attachment.create() to create a new attachment or a new version of an existing attachment.

Example

The following code iterates over all versions of all attachments in the process instance, logging information about each version:

for each a in ProcessInstance.attachments
do  // a is of type Attachment
  for each v in a.versions // v is of type AttachmentVersion
  do
    attvcontent = String(v.contents, encoding : "UTF8")
 
    logMessage "Attachment: " + a.fileName + " Version: " + v.version + "\n" +
      "\nContents: " + attvcontent +
      "\nContent size: " + v.contentSize +
      "\nRemarks: " + v.remarks +
      "\nCreation Time: " + v.creationTime +
      "\nCreator Name: " + v.creatorName
  end
end
Related reference
Fuego.Lib : Attachment
Fuego.Lib : ProcessInstance