Table of Contents

Search

  1. Preface
  2. Part 1: Using Process Developer
  3. Part 2: Creating and Modifying Processes
  4. Part 3: Functions, Events, Errors, and Correlation
  5. Part 4: Testing and Deployment
  6. Part 5: Process Central and Process Server (On-Premises)

Process Developer

Process Developer

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.
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:
  • variableName: Name of the variable containing the attachment
  • attachmentNumber: The source variable attachment item number starting at one
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
  • fromVariableName: Name of the source variable
  • fromItemNumber: Source variable attachment item number, starting at one
  • toVariableName: Name of the target variable
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:
  • fromVariableName: Name of the source variable
  • fromItemNumber: Source variable attachment item number, starting at one
  • toVariableName: Name of the target variable
  • toItemNumber: Target variable attachment item, starting at one
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:
  • variableName: Name of the variable containing the attachment
  • itemNumber: Item number of attachment starting at one
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:
  • variableName: Name of the variable to add the attachment
  • contentType:MIME type of the attachment, such as
    text/xml
    or
    image/jpg
  • encodedContent: String that contains Base64 encoded attachment data content
  • contentId: (Optional). A sting that refers to the content of the attachment. This parameter can be helpful in accessing a particular attachment when a message has multiple attachments.
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:
  • fromVariableNames: Names of the variables to copy from. You can enter a single name or multiple name separated with a space. Use * to indicate all in-scope variables.
  • toVariableName: Name of the variable to copy to
abx:removeAllAttachments(variableNames)
Deletes all attachments from the list of variables. The return type is
xs:integer
.
Parameter:
  • fromVariableNames: Names of the variables to copy from. You can enter a single name or multiple name separated with a space. Use * to indicate all in-scope variables.
abx:getAttachmentType(variableName, itemNumber)
Returns the MIME type of the attachment associated with the named variable.
Parameters:
  • variableName: Name of the variable containing the attachment
  • itemNumber: Item number of attachment starting at one
abx:getAttachmentProperty(variableName, itemNumber, propertyName)
Returns the value associated with the attachment property.
Parameters:
  • variableName: Name of the variable containing the attachment
  • itemNumber: Item number of attachment starting at one
  • propertyName: Name of the attachment's property
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:
  • variableName: Name of the variable containing the attachment
  • itemNumber: Item number of attachment starting at one
abx:setAttachmentProperty(variableName, itemNumber, propertyName, propertyValue)
Sets and returns the named property of the attachment associated with the named variable.
Parameters:
  • variableName: Name of the variable containing the attachment
  • itemNumber: Item number of attachment starting at one
  • propertyName: Name of the attachment's property
  • propertyValue: Value of the attachment's property
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:
  • variableName: Name of the variable containing the attachment
  • attachmentNumber: The source variable attachment item number starting at one

0 COMMENTS

We’d like to hear from you!