Add Attachment Service (com.ibi.agents.XDAddAttachmentAgent)

Syntax:

com.ibi.agents.XDAddAttachmentAgent

iIT Service Object:

attachments: Add Attachment

Description:

This service adds a new attachment with the contents determined by the value of a string expression. The Java Character Set parameter specifies how the Java characters in the string are converted to bytes in the body of the attachment. The attachment headers are specified by the special registers of type HDR in the MIME Header Namespace.

There are also four parameters available to specify the most common MIME headers. When used, these parameters override special registers of the same name. Notice the value of the Content-ID header is taken as is, so the value must contain the surrounding angle brackets. For example, a valid value for Content-ID might be <cid>. This service follows the OnSuccess edge upon successful execution, otherwise it follows OnError.

The use of the specific name of the attachment and Content Disposition operates the same as it does for the Add Attachment From File Service (com.ibi.agents.XDAddAttachmentFromFileAgent). However the content of the attachment is taken from the environment of the service. Often this is through the iWay Functional Language (iFL).

Parameters:

Parameter

Description

Input Data *

An expression that returns the contents of the attachment.

Java Character Set

The character set used to convert from Java characters to an array of bytes. If no value is specified, the default character set will be used.

Content-Type *

Value of the Content-Type MIME header.

Content-Transfer-Encoding

Value of the Content-Transfer-Encoding MIME header.

Content Description

Value of the Content-Description MIME header.

Content-Disposition

Value of the Content-Disposition MIME header.

Content-ID

Value of the Content-ID MIME header.

MIME Header Namespace

Special register namespace from which additional MIME headers for the attachment are taken. If no value is specified, no MIME headers are added beyond those generated by the header-specific agent parameters.

Specific Name of Attachment

The name to be added into a Content_Disposition header if not overridden by the Content Disposition operand. For attachments, this is often a file name.

Edges:

The following table lists the available line edges for the Add Attachment Service (com.ibi.agents.XDAddAttachmentAgent).

Line Edge

Description

OnError

Error

OnSuccess

Success

OnFailure

Failure

OnCustom

  • OnError
  • OnSuccess
  • OnFailure
  • fail_parse