Message Element Setter mediation primitive properties
Message Elements messageElements
Elements of the message that you want to add, change, or delete.
In IBM Integration Designer, click Add to specify a message element update. After you have defined an update, it appears in the Message Elements table. You can change the order in which message element updates occur, by moving the Message Elements up and down in the table.
- Action
-
In IBM Integration Designer, use this field to define how you want to alter the message. The actions are: Set, Copy, Append, or Delete. Depending on the action you select, the IBM Integration Designer panel lets you enter different properties. The default action is Set. The Set, Copy and Append actions create new elements (or trees of elements), if required.
- Using Set, you can set a target element to a constant value (specified in the Value property).
- Using Copy, you can copy from a source element to a target element.
Note: You must ensure that the source data type is compatible with the target data type, or a runtime exception occurs.
- Using Append, you can copy from a source element to a new element
instance, by appending to a repeating element in the output. You can only append to a repeating
element in the output. Note: You must ensure that the source data type is compatible with the target data type, or a runtime exception occurs.
- Using Delete, you can delete an element instance from the SMO. Note: You should only attempt to delete optional or repeating elements.
| Field detail | Value and notes |
|---|---|
|
Validate input validateInput
If true, causes the input message to be validated before the mediation is performed.
| Field detail | Value and notes |
|---|---|
| Required | Yes |
| Valid values | Boolean Note:
|
| Default | false |
Considerations
Consider the following when using the Message Element Setter mediation primitive:
- If the XPath expression of the source resolves to more than one element in the SMO, a runtime exception occurs.
- If you attempt to set a target element to a value of incompatible type, a runtime exception occurs.
- If the Validate input property is true and the input message is invalid, a runtime exception occurs.
Sample XML code
<node name="MessageElementSetter1" type="MessageElementSetter">
<table name="messageElements">
<row>
<property name="target" value="/body/myRequestMsg/person/message"/>
<property name="type" value="{http://www.w3.org/2001/XMLSchema}string"/>
<property name="value" value="HelloWorld"/>
</row>
</table>
<inputTerminal/>
<outputTerminal>
<wire targetNode="DatabaseLookup1"/>
</outputTerminal>
<failTerminal/>
</node>
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15