DML functions: JMS property access

Retrieving

Keeping and setting

Deleting

Retrieving JMS properties

The following functions are available for retrieving JMS properties:

getJMSIntegerProperty

getJMSIntegerProperty Comment

Description

getJMSIntegerProperty returns the integer-type value of a specified JMS property.

Syntax

getJMSIntegerProperty(>property_name)

Returns

Integer

Parameters

property_name (String)

Name of the property from which you want to retrieve a value.

Example

The following example returns the value of a JMS_priority property:

getJMSIntegerProperty(JMS_priority) returns 1.

getJMSRealProperty

getJMSRealProperty Comment

Description

getJMSReaProperty returns the real-type value of a specified JMS property.

Syntax

getJMSRealProperty(property_name)

Returns

Real

Parameters

property_name (String)

Name of the property from which you want to retrieve a value.

Example

The following example returns the value of a total_sale property:

getJMSRealProperty(total_sale) returns 39.95.

getJMSStringProperty

getJMSStringProperty Comment

Description

getJMSStringProperty returns the string-type value of a specified JMS property.

Syntax

getJMSStringProperty(property_name)

Returns

String

Parameters

property_name (String)

Name of the property from which you want to retrieve a value.

Example

The following example returns the value of a Customer_name property

getJMSStringProperty(Customer_name) returns "John Smith".

Keeping and setting property values

Before you can set JMS properties, you must specify that the properties (which are defined in the JMS Channel object) are retain in memory during message processing. To do this you use the keepJMSChannelProperties function.

keepJMSChannelProperties

keepJMSChannelProperties Comment

Description

keepJMSChannelProperties enables you to specify whether the properties that are defined in a JMS Channel object are available for message processing.

Syntax

keepJMSChannelProperties(keep: true/false)

Parameters

keep (Boolean)

Set to true to instruct Map Engine to place the JMS Channel properties in the JMSSendMethodOverride attribute where they can be set and retrieved via DML functions.

If you set this parameter to false, the following JMS DML functions return errors: set, get, and remove.

Example

The following example makes the JMS Channel properties available in the JMSSendMethodOverride attribute:

keepJMSChannelProperties(true).

 setJMSProperty

setJMSProperty Comment

Description

setJMSProperty sets a JMS property to a specified value.

Syntax

setJMSProperty(property_name, value)

Parameters

property_name (String)

Name of the property for which you want to set the value.

value (Integer, Real or String)

Value you want to attribute to the property.

Example

The following example sets the value of the JMS_priority property to 2:

setJMSProperty(JMS_priority, 2).

setJMSDocumentProperty

setJMSDocumentProperty Comment

Description

setJMSDocumentProperty sets the value of a JMS property using the current Business Document instance.

Use this function for Maps or Step expressions.

Syntax

setJMSDocumentProperty(property_name, value)

Parameters

property_name (Integer, Real or String): Name of the property for which you want to set the value.

value (Integer, Real or String): Value you want to attribute to the property.

Example

The following example sets the value of the JMS_priority attribute to 2:

setJMSDocumentProperty(JMS_priority, 2).

Deleting property values

The following function is available for removing JMS properties:

removeJMSProperty

removeJMSProperty Comment

Description

removeJMSProperty deletes the value of a specified JMS property.

Syntax

removeJMSProperty(property_name)

Parameters

property_name (String)

Name of the property value you want to delete.

Example

The following example deletes the value of the JMS_priority property:

removeJMSProperty(JMS_priority).

Related Links