Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Service Development | Working with webMethods Messaging Triggers | Creating a webMethods Messaging Trigger | Creating Filters for Use with Universal Messaging | Universal Messaging Provider Filters and Encoding Type
 
Universal Messaging Provider Filters and Encoding Type
The encoding type specified for the publishable document type to which the webMethods messaging trigger subscribes determines the scope of the published document to which Universal Messaging applies the filter.
*When IData is the encoding type, Universal Messaging applies the filter to the custom header fields added to a published document via the _properties field. The provider filter allows the webMethods messaging trigger to indicate which documents it wants to receive based on the header contents.
*When protocol buffers is the encoding type, Universal Messaging applies the filter to the body of the document only.
Because Integration Server includes the headers in the body of the published document as well as in the document header, you can still filter on the document headers when the encoding type is protocol buffers.
When using protocol buffers to encode messages, there are additional considerations for creating provider filters for Universal Messaging. Specifically, Universal Messaging cannot filter on:
*Fields that cannot be encoded as protocol buffers, including fields whose names contain characters that are not valid for protocol buffers, data types that are not supported by protocol buffers, and duplicate fields.
For information about fields that cannot be represented as protocol buffers, see the information about setting an encoding type for a publishable document type in the webMethods Service Development Help.
*Undeclared fields that are not defined in the publishable document type but are in the published document.
*Fields that contain null values. Even if the field can be represented in protocol buffers, at run time, a null value cannot be included in a protocol buffer message. Consequently, Universal Messaging cannot apply a provider filter that checks for a null value.
*Any list data type where one of the elements in the list contains a null value.
*Fields whose values are references to another field.
While Universal Messaging cannot filter on the contents of the fields identified above, these fields and their contents will be passed through as an UnknownFieldSet which is represented as an IData byte array. A webMethods messaging trigger that receives the document will be able to decode the fields and include them in the pipeline.
For Universal Messaging to filter on protocol buffers, the configuration property Global Values > ExtendedMessageSelector must be set to true on Universal Messaging. True is the default.
Use Universal Messaging Enterprise Manager to view and edit the configuration properties for the realm to which Integration Server connects.
Note:
When the encoding type is IData, it is optional to include _properties in the provider filter. For example, if you want Universal Messaging to filter for messages where the contents of the _properties/color field is equal to “blue”, the provider filter would be: color=’blue’. However, when the encoding type is protocol buffers, you need to include _properties in the provider filter. For example, _properties.color=’blue’. If you want a provider filter that operates on the contents of _properties to work regardless of the encoding type, always include _properties in the filter expression.