Message Filter mediation primitive properties

You can specify values for mediation primitive properties either by using the property fields in the IBM® Integration Designer user interface or by using an XML format. The property field names displayed in IBM Integration Designer are generally different from the property names used when building a mediation flow using XML code. In the following information, icons are used to identify each property name used in IBM Integration Designer and the corresponding XML name. (Where applicable, XML names that are required, but not shown in IBM Integration Designer, are also described.)

Enabled enabled

Defines whether the message is mediated by the Message Filter mediation primitive. By default the mediate action of the Message Filter mediation primitive is enabled. You can suspend the mediate action by clearing the check box. If you suspend the mediation, the message goes to the default terminal.

Required Yes
Valid values Boolean
Note:
Default true

Distribution mode distributionMode

Determines the behavior of the mediation primitive when an inbound message matches multiple expressions.

Required Yes
Valid values
First 0
If the Distribution mode is set to First, the message is propagated to the first matching output terminal.
All 1
If the Distribution mode is set to All, the message is propagated to all matching output terminals.
Note:

If there is no matching output terminal, the default terminal is invoked.

Default First

Filters filters

A list of expressions, and associated terminal names, that define the filtering performed by the mediation primitive.

Note: Order is significant in the list of expressions. Expressions are evaluated in the order in which they are shown in the table.
Field detail Value and notes
Pattern pattern
An XPath 1.0 expression against which the message is tested. The expression is evaluated starting from the XPath expression /, which refers to the complete SMO.
Terminal name terminalName
The name of an output terminal, with a valid type of String. There is one terminal name for each pattern XPath expression. The terminal name must be a valid connection endpoint, and it must not be fail or default. The default value is empty, which is invalid.

Considerations

If there is a syntax error in the XPath expression of a Pattern it can cause an exception at run time.

Sample XML code

<node name="MessageFilter1" type="MessageFilter">
  <table name="filters">
    <row>
      <property name="pattern" value="/body/myRequestMsg/person/name=&quot;Bob&quot;"/>
      <property name="terminalName" value="match1"/>
    </row>
  </table>
  <inputTerminal/>
  <outputTerminal name="default">
    <wire targetNode="MessageElementSetter1"/>
  </outputTerminal>
  <outputTerminal name="match1"/>
  <failTerminal/>
</node>