Business Processes and Rules: Siebel eBusiness Application Integration Volume IV > Data Mapping Using Scripts > MIME Message Objects and Methods >

CSSEAIMimeMsgIn


This object represents an input MIME Message, open for reading. The MIME message is in the property set format generated by the EAI MIME Doc Converter. The object consists of a series of MIME parts forming the different pieces of the message.

This object provides GetArgument, GetPartCount, GetPart, GetPartByCID, GetAttachmentByCID, and GetXMLRootPart methods.

GetArgument() Method

This method gets the value of a business service argument. For example, this could get the name of a map function in the business service. Table 36 presents the parameters for this method.

Syntax

GetArgument(name [, defaultIfNull [, defaultIfEmpty]])

Table 36. Parameters for GetArgument() Method
Parameter
Description

name

The name of a business service argument.

defaultIfNull

Returned if a service argument of the specified name does not exist.

defaultIfEmpty

Returned if the service argument is set to an empty string.

Returns

String or null

Usage

Use this method to get the value of an argument passed to the business service. For example, if the MapName argument passed to the business service is MapExtOrderToOrder, the call:

intMsgIn.GetArgument("MapName");

returns the name of the map, MapExtOrderToOrder, passed to the business service.

If the named argument does not exist, null is returned. If the named argument exists but the value is the empty string, the empty string is returned. You can use the defaultIfNull and defaultIfEmpty optional arguments to change this behavior.

The arguments defaultIfNull and defaultIfEmpty are optional; however, if you specify defaultIfEmpty, you must also specify the defaultIfNull argument.

GetPartCount() Method

This method returns the number of parts in the MIME message. Table 37 presents the parameter for this method.

Syntax

GetPartCount()

Returns

This method returns the number of parts in the MIME message.

GetPart() Method

Syntax

GetPart(index)

Table 37. Parameters for GetPart() Method
Parameter
Description

index

Index of the MIME part to return.

Returns

Property set. Returns the part, a property set, specified by the index. The index is zero based. Returns null if the index is out of bounds.

GetPartByCID() Method

Retrieve a MIME part based on the MIME Content Identifier (CID). Table 38 presents the parameter for this method.

Syntax

GetPartByCID(cid)

Table 38. Parameters for GetPartByCID() Method
Parameter
Description

cid

MIME Content Identifier to retrieve.

Returns

Returns null if there is no part with the specified CID.

GetAttachmentByCID() Method

The same functionality as CSSEAIMimeMsgIn.GetPartByCID. Supports using a CSSEAIMimeMsgIn as an attachment source for copying attachments to output objects. Table 39 presents the parameter for this method.

Syntax

GetAttachmentByCID(cid)

Table 39. Parameters for GetAttachmentByCID() Method
Parameter
Description

cid

MIME Content Identifier to retrieve.

Returns

The attachment (a property set) specified by the CID. Returns null if there is no attachment with the specified CID.

GetXMLRootPart() Method

Finds the first MIME part that is an XML message in property set format and returns the root element of the XML document. The XML message must be in property set format as produced by the XML Hierarchy Converter Business Service. An error is raised is the XML message is not found. The method is intended for use with MIME messages that consist of an XML message and a series of related attachments. The property set returned is consistent with what XPSGetRootElement returns, and can be accessed with the XML Property Set functions. See XML Property Set Functions.

Syntax

GetXMLRootPart()

Returns

MIME body part representing an XML document.

Business Processes and Rules: Siebel eBusiness Application Integration Volume IV