Multiple Attachments

You can send attachments to the trading partner by using the Services Plug-in. The current private process schema accommodates attachments so that the attachment field represents a sequence which allows any number of attachments to be specified.

The following fields are available for configuring an attachment:

  • name: This represents the name of the attachment. If none is specified, it is named AttachmentsequenceNumber.second part of the content type.

    Example, if you are sending an .xml file, the content type is text/xml and the attachment name is Attachment0.xml. (1 is the sequence number for the first element of the attachment sequence).

  • content: Content of the attachment.
  • fileName: A file reference can be sent as an attachment. The content of this file is read and set to the content of the attachment.
    • If both the content and fileName fields are specified, then content is set as the attachment data.

    • If neither the content nor the fileName fields are specified, then this attachment element is not processed.

Specifying these fields is not enforced by the private process.

  • deleteFile: This is a Boolean field. If set to true, the file reference specified in the filename field is deleted after the completion (successful or otherwise) of the transaction.

  • contentID: Represents the content Id for the attachment. It must be specified and enforcement is performed at the BusinessWorks palette level. If this field is not specified, it is populated as transactionID-sequence number.

  • contentType: Represents the type of the message content. If not specified, it is inferred by the protocol. If this field is set to text/foo, the content field must hold a java.lang.String object. If this field is not set and the content field holds a java.lang.String object, the contentType field defaults to text/plain. If contentType is not set and the content field does not hold a java.lang.String object, the contentType defaults to application/octet-stream.

Note: If a contentType field is not specified, such as when neither content nor the fileName fields are specified, the attachment is not processed.