Designer > Attachments > Custom Functions for Manipulating Attachments
  

Custom Functions for Manipulating Attachments

In the Expression, Query, and other Builders you can select the following functions to work with attachments. These functions are under the BPEL > Process Developer > Attachments category.
Note: Using a SOAP message to send nested attachments is not supported. if the you are sending SOAP messages with multiple attachments that we do not support nested attachments. While testing, you may want to set the SoapUI Disable multiparts property false.
To view usage of the functions, see Attachment Custom Function Examples.
abx:base64EncodeAttachment(variableName, attachmentNumber)
Returns the Base64 encoded attachment of the named variable. Base64 refers to a MIME content transfer encoding.
Parameters:
abx:getAttachmentCount(variableName)
Returns an integer that is the number of attachment items associated with a named variable.
abx:copyAttachment(fromVariableName, fromItemNumber, toVariableName)
Copies one of the attachments from the source variable to the target variable. The return type is xs:boolean. If the copy fails, an attachment fault is thrown.
Parameters
abx:replaceAttachment(fromVariableName, fromItemNumber, toVariableName, toItemNumber)
Replaces one of the attachments of the target variable with an attachment from the source variable. The return type is xs:boolean. If the replacement fails, or an item number is out of range, an attachment fault is thrown.
Parameters:
abx:removeAttachment(variableName, itemNumber)
Deletes the attachment of the named variable identified by the toItemNumber. The return type is xs:boolean. If the removal fails, or an item number is out of range, an attachment fault is thrown.
Parameters:
abx:createAttachment(variableName, contentType, encodedContent [, contentId])
Adds the attachment to the named variable specifying the content type and content. The return type is xs:boolean. If the creation fails, an attachment fault is thrown.
Parameters:
abx:copyAllAttachments(fromVariableNames, toVariableName)
Copies all attachments from the list of variables identified by the fromVariableNames(xsd:string list) to the variable identified by the toVariableName. The return type is xs:integer. If the copy fails, an attachment fault is thrown.
Parameters:
abx:removeAllAttachments(variableNames)
Deletes all attachments from the list of variables. The return type is xs:integer.
Parameter:
abx:getAttachmentType(variableName, itemNumber)
Returns the MIME type of the attachment associated with the named variable.
Parameters:
abx:getAttachmentProperty(variableName, itemNumber, propertyName)
Returns the value associated with the attachment property.
Parameters:
Attachment properties include those specified by the W3C SOAP Messages with Attachments Specification (http://www.w3.org/TR/SOAP-attachments), Multipart/Related MIME media type (RFC 2387), and Informatica.
SOAP with Attachments properties include Content-Type, Content-Transfer-Encoding, Content-ID, and Content-Location.
Informatica-specified attachment properties include Attached-By (the authenticated user who sent the attachment), X-Size (size of attachment in bytes), and Attachment-Created-At (a server-generated time-value (in milliseconds) of when the attachment was received by the Process Server).
abx:getAttachmentSize(variableName, itemNumber)
Returns the content size for the variable attachment item of the named variable.
Parameters:
abx:setAttachmentProperty(variableName, itemNumber, propertyName, propertyValue)
Sets and returns the named property of the attachment associated with the named variable.
Parameters:
This function is particularly useful for giving a BIRT report a meaningful name when the report is a PDF attached to an email.
abx:xmlAttachmentToElement(variableName, attachmentNumber)
Returns an attachment and converts the attachment to an element style variable. The attachment must be an XML document.
Parameter: