Broker 10.5 | webMethods Broker Documentation | Administering webMethods Broker | Managing Territory Gateways | Using Territory Gateway Filters | Filtering Documents
 
Filtering Documents
A filter string specifies criteria for the contents of a document. Filter strings can do any combination of the following:
*Compare document field contents against constants or computed values.
*Combine document field comparisons using the boolean operators and, or, and not.
*Perform arithmetic operations on document fields and constants.
*Contain regular expressions.
*Contain string and arithmetic constants.
*Contain a hint that specifies how documents should be processed.
For information about using regular expressions, hints, and filter functions from the webMethods Broker library, see the webMethods Broker Client Java API Programmer’s Guide.
Filter Sample - Filtering JMS documents based on the value set on the document header
If you want to filter JMS documents that contain JMSType set to name in the header, set the following gateway filter.
_env.jms_type = "name"
Filter Sample - Filtering JMS documents based on a property value
If we want to set up a filter to match JMS documents that contain jmsuser property set to admin, set the following gateway filter
Properties.jmsuser = "admin"
Filter Sample - Filtering documents based on person's age and state of residence
Assume that a document contains a person's age and state of residence. The following filter string matches only those documents whose age field is greater than 65 and whose state field is equal to FL.
age > 65 and state = "FL"
In this example filter string, age and state represent document fields. This filter also contains an arithmetic constant 65 and a string constant "FL". The boolean operator and combines the field criterion for age and state.