DML functions: Message

Message Functions (attribute access)

getAttribute

getDateAttribute

getIntegerAttribute

getRealAttribute

getStringAttribute

setAttribute

getMessagePriority

setMessagePriority

getInputMessage

getInputInstance

Usage Limits

Message functions (attribute access)

To process an integration, Mapping Services Server processes messages flows. One part of the information contained in the message flow is pairs of attributes and values. The DML Message Functions described in this book enable you to retrieve or set the values of these attribute/value pairs, as applicable.

  • Get functions - To access the Date, Integer, Real, or String value of an attribute field of a message, you use the getAttribute, getDateAttribute, getIntegerAttribute, getRealAttribute or getStringAttribute functions. Additionally, you can use the getMessagePriority function to obtain the priority setting of a message in a Decision Path.
  • Set functions - To define or update the value of an attribute field for any data type in a message, you use the setAttribute function.
  • When you use the setAttribute function in a Map expression, it updates a specified attribute value in the current output Business Document.
  • To define or update the priority setting of a message in a Decision Path, you use the setMessagePriority function.

getAttribute

getAttribute Comment

Description

getAttribute returns the list of values of all attribute field.

Syntax

getAttribute(attribute_name)

Returns

string

Parameters

attribute_name

Enter a String that represents the attributes for which you want to retrieve values.

Examples

setAttribute("myAttribute_1", "myValue_1");getAttribute("myAttribute_1") returns the value of the attribute with name "myAttribute_1": "myValue_1".

getAttribute("FTPReceiveInfo")

returns all the value of the attribute with name "FTPReceiveInfo": "{3727,0,"local","","input.xml"}"

The result has the same format as the RECORD FTPReceiveInfo.

getDateAttribute

getDateAttribute Comment

Description

getDateAttribute returns the date value of the specified attribute field.

Syntax

getDateAttribute(attribute_name, field_name)

Returns

Date

Parameters

attribute_name (String)

field_name (String)

Example

getDateAttribute("XXX_Receive","Date")

returns the value of the Date parameter.

getIntegerAttribute

getIntegerAttribute Comment

Description

getIntegerAttribute returns the integer value of the specified attribute field.

Syntax

getIntegerAttribute(attribute_name, field_name)

Returns

Integer

Parameters

attribute_name (String)

field_name (String)

Example

getIntegerAttribute("JMSReceiveInfo","JMSPriority")

returns the value of the JMSPriority parameter.

getRealAttribute

getRealAttribute Comment

Description

getRealAttribute returns the real value of the specified attribute field.

Syntax

getRealAttribute(attribute_name, field_name)

Returns

Real

Parameters

attribute_name (String)

field_name (String)

Example

getRealAttribute("XXX_Receive","PI")

returns the value of "PI"

getStringAttribute

getStringAttribute Comment

Description

getStringAttribute returns the string value of the specified attribute field.

Syntax

getStringAttribute(attribute_name, field_name)

Returns

String

Parameters

attribute_name (String)

field_name (String)

Example

getStringAttribute("EmailRuntimeReceiveInfo","From")

returns the value of the From parameter.

getStringAttribute("EmailRuntimeReceiveInfo"," HeaderFields[2].Name"

returns the name of the second record of HeaderField. Record count start at 1.

setAttribute

setAttribute Comment

Description

setAttribute sets the value of an attribute field of a message.

Syntax

setAttribute(attribute_name, field_name, value)

Returns

setAttribute does not return a value.

Parameters

attribute_name

Enter a String that represents the attribute name of the output Business Document.

field_name

Enter a String that represents the attribute field name of the output Business Document.

value

Enter the Date, Integer, Real or String value to set.

Examples

setAttribute("OverrideEmailRuntimeSendMethod", "Subject", "Main information") sets in the OverrideEmailRuntimeSendMethod attribute, the severity field of the output Business Document to "Main information".

setAttribute("OverrideEmailRuntimeSendMethod", "Use_Subject", 1) sets in the OverrideEmailRuntimeSendMethod attribute, the Use_Subject field of the output Business Document to 1.

getMessagePriority

getMessagePriority Comment

Description

getMessagePriority returns the priority of the message.

Syntax

getMessagePriority(priority)

Returns

The priority of the message between 1 (lowest) and 1000 (highest). This value is an Integer.

Parameters

None

Examples

getMessagePriority() returns 1.

setMessagePriority

setMessagePriority Comment

Description

setMessagePriority(priority) - modifies the priority of the message.

Syntax

setMessagePriority(priority_value)

setMessagePriority(priority_name)

Returns

setMessagePriority does not return a value

Parameters

priority_value:

Enter an integer value between 1 and 1000. The lowest priority is 1 and the highest priority is 1000.

priority_name:

Enter one of the following string values:

  • "Low" - corresponds to the priority 1
  • "Medium" - corresponds to the priority 500
  • "High" - corresponds to the priority 1000

Examples

setMessagePriority(1000) sets the priority of the message to 1000.

setMessagePriority("Medium") sets the priority of the message to 500.

getInputMessage

getInputMessage Comment

Description

getInputMessage returns the input message in a VLOB.

Syntax

getInputMessage()

You cannot use this function in a:

  • Variable initialization expression
  • Validation Rule

Returns

The input message in a VLOB.

Parameters

none

Example

getInputMessage()

getInputInstance

getInputInstance Comment

Description

getInputInstance returns the current instance being processed in a VLOB for A2A mode.

Syntax

getInputInstance()

You cannot use this function in a:

  • Variable initialization expression
  • Validation Rule

Returns

The current instance in a VLOB.

Parameters

none

Example

getInputInstance()

Usage limits

Use the Message Functions in the following DML expressions:

Message Function DML Expression

getDateAttribute

getIntegerAttribute

getRealAttribute

getStringAttribute

getMessagePriority

  • Validation Rule
  • Map
  • Map on Trigger
  • Decision-Path
  • Decision-Path on Trigger

setAttribute

setMessagePriority

  • Map
  • Map on Trigger

Related Links