You are viewing an older version of this section. Click here to navigate to the latest version.

Expression Filter


Expression Filter

*Purpose:* Evaluates a range of expressions.

Minimum Configuration: The Evaluator and Expression properties are required.

Discussion: This filter lets you evaluate a range of expressions. It supports expression types such as header, payload (payload type), regex, and wildcard.

Set Evaluator to specify the expression evaluator type to use. The evaluator type can be one of the following: header, payload-type, exception-type, wildcard, regex, ognl, xpath, jxpath, bean, groovy, or custom.

Set Expression to the actual expression. Expressions vary depending on the evaluator type. For example, if the expression type is xpath, bean, or ognl, the expression should be a boolean.

If the expression type is custom, then you need to provide the name of the custom evaluator. In addition, the custom evaluator must already be registered with Mule (see Creating Expression Evaluators).

"Null returns true" is normally false. You have the option to set it to true if you want to return true whenever the expression is null.

XPath Expressions

XPath expressions use the standard XPath query language, based on JAXP, the Java API for XML processing. See Using Filters for more information about XPath expressions.

JXPath Expressions

JXPath is an XPath interpreter that can apply XPath expressions to graphs of objects of all kinds, including JavaBeans, Maps, Servlet contexts, DOM objects, plus to mixtures of these objects. For more information about JXPath, see Using Filters.

OGNL Expressions

OGNL is a simple but very powerful expression language for plain Java objects. Similar to JXPath, OGNL works on object graphs. Filters using OGNL expressions enable simple and efficient content routing for payloads. See Using Filters for more information.

Mule ESB Reference:
For more information about Custom Filter, see here.

Configuration Options: