In this section: |
This section describes how to configure attachment agents that are used to inspect the contents existing attachments.
This agent finds an attachment and makes it the body of the document. The attachment can be selected by index or by Content-ID. If the Attachment Number is specified, it takes precedence over the Content- ID. The attachment index is base 0. If present, the Content-ID must NOT contain the surrounding angle brackets.
For example, the value cid for the Content-ID parameter will match an attachment with a Content-ID header equal to <cid>. The Header Namespace is the special register namespace where MIME headers for the selected attachment will be stored. The attachment will be stored as bytes if the "Keep Document Flat" parameter is enabled. Otherwise, the attachment will be parsed as XML. If the attachment is itself a Multipart, then the document will contain the parse of the Main Body Part and the other parts will appear as document attachments.
The MIME headers of the Main Body Part will be saved as registers in the Main Body Part Header Namespace. This is needed to keep them distinct from the Multipart headers. The "Delete Attachment" parameter determines what to do with the selected attachment when it is not a Multipart: the attachment can be preserved or deleted. This agent follows OnSuccess upon successful execution, otherwise it follows fail_notfound if the attachment cannot be found, or it follows fail_operation if there is another error.
To configure the XDAttachmentToDocAgent:
The Services pane opens.
The table provided lists all the previously configured services (agents) and a brief description each.
The Select service type pane opens.
The Configuration parameters for the Internal Listener pane opens.
Note: The parameters prefixed with a (*) in the listener configuration pane are required.
For more information, see XDAttachmentToDocAgent Configuration Parameters.
You are returned to the Select listener type pane.
You are returned to the Services pane and the XDAttachmentToDocAgent is now added to the table listing all configured services (agents), as shown in the following image.
The following table lists and describes parameters for the XDAttachmentToDocAgent.
Parameter |
Description |
---|---|
Attachment Number |
The number of the attachment to be retrieved. If specified, it takes precedence over the Content-ID. |
Content-ID |
The Content-ID of the attachment to be retrieved. This value is ignored if the attachment number is specified. |
Header Namespace |
Special register namespace where MIME headers for the selected attachment will be stored. |
Main Body Part Header Namespace |
If the current attachment is itself a Multipart, this is the special register namespace where the MIME headers for the main body part will be stored. |
Keep Document Flat |
Determines whether to keep the body of the document as an array of bytes. This parameter is set to false by default. |
Delete Attachment |
Determines whether to delete the attachment after it becomes the body of the document. This parameter is set to false by default. |
XDIterAttachments handles each attachment of the input document iteratively. At each iteration, an attachment is assigned to the body of the output document. The Handling Option determines how to treat the original attachment: "delete" removes each attachment from current document after processing; "replace" replaces the original attachment with the modified document; "leave alone" leaves the original attachments unchanged.
The index of the first attachment to be processed is given by the Start Index parameter, base 0. If omitted, the default Start Index is 0, therefore all attachments will be processed. The Header Namespace is the special register namespace where MIME headers for the current attachment will be stored. The attachment will be stored as bytes if the "Keep Document Flat" parameter is enabled. Otherwise, the attachment will be parsed as XML. If the attachment is itself a Multipart, then the document will contain the parse of the Main Body Part and the other parts will appear as document attachments.
The MIME headers of the Main Body Part will be saved as registers in the Main Body Part Header Namespace. This is needed to keep them distinct from the Multipart headers. With the "Replace" handling options, the special registers in the Header Namespace (and possibly the Main Body Part Header Namespace) are used to create headers for the new attachment. At each iteration, the header special registers from the previous iteration are erased before the new set is assigned. This iterator follows the OnSuccess edge upon successful execution, otherwise it follows fail_operation.
To configure the XDIterAttachments:
The Services pane opens.
The table provided lists all the previously configured services (agents) and a brief description each.
The Select service type pane opens.
The Configuration parameters for the Internal Listener pane opens.
Note: The parameters prefixed with a (*) in the listener configuration pane are required.
For more information, see XDIterAttachments Configuration Parameters.
You are returned to the Select listener type pane.
You are returned to the Services pane and the XDIterAttachments is now added to the table listing all configured services (agents), as shown in the following image.
The following table lists and describes parameters for the XDIterAttachments.
Parameter |
Description |
---|---|
Handling Option |
Select one of the following values from the drop-down list:
|
Start Index |
Index of the first attachment to process in the mail object. The first attachment to the main document has an index of 0. |
Header Namespace |
Special register namespace where MIME headers for the current attachment will be stored. If Replace attachment is selected as the handling option, registers in this namespace will be added to the replaced attachment. |
Main Body Part Header Namespace |
If the current attachment is itself a Multipart, this is the special register namespace where the MIME headers for the main body part will be stored. |
Keep Document Flat |
Determines whether to keep the body of the document as an array of bytes. This parameter is set to false by default. |
iWay Software |