Contact Us 1-800-596-4880

Filters

Mule Runtime Engine versions 3.5, 3.6, and 3.7 reached End of Life on or before January 25, 2020. For more information, contact your Customer Success Manager to determine how you can migrate to the latest Mule version.

Mule bundles more than a dozen Filters that determine whether a message can proceed through an application flow. The simplest filters implement basic logic operators (such as and, or, and not), but these simple elements can be combined in various ways to specify complex logical conditions.

Custom Filters

In addition to applying standard filters, you can create a custom filter to specify a precise set of conditions a message must satisfy before it can continue through the flow.

Global Filters

You can also create a global filter that specifies a set of conditions that the message must meet at points along the flow specified by the Filter Ref building block.

Bundled Filters

Filters Description Reference

Filter-24x16

And/Not/Or

The three And/Not/Or logic filters express simple logic. When required to express complex logic, these three filters can be used in combination with other filters.

Logic Filter Reference

Filter-24x16

Custom

References a user-implemented filter class.

Customer Filter Reference

Filter-24x16

Exception

Filters against an exception of a specified type.

Exception Filter Reference

Filter-24x16

Expression

Filters against a range of expressions.

Filter-24x16

Filter Ref

References a globally-defined filter.

Filter Ref Reference

Filter-24x16

Idempotent Message

This filter ensures that a flow receives only unique messages.

Filter-24x16

Message

Applies specified criteria to a message to determine whether it should be processed.

Message Filter Reference

Filter-24x16

Message Property

Evaluates message properties to determine whether that message should be processed.

Message Property Filter Reference

Filter-24x16

Payload

Evaluates the payload type of a message to determine whether it should be processed.

Filter-24x16

Regex

Applies a regular expression pattern to the message payload to determine whether it should be processed.

Regex Filter Reference

Filter-24x16

Schema Validation

Uses the JAXP libraries, to validate a message against a schema.

Schema Validation Reference

Filter-24x16

Wildcard Filter

Matches string messages against a wildcard pattern.

Wildcard Filter Reference

About Filter Logic

When a message fails to satisfy the conditions specified by a filter, that filter returns a null value, which causes the processing of that particular message to halt. In other words, the message is rejected and undergoes no further processing.

When a message satisfies the conditions specified by a filter, that filter passes the payload of the message to the next building block in the flow, and processing of that particular message continues.

When you place a filter immediately after an HTTP endpoint configured for a request-response pattern, and no response has been configured for the flow, Mule uses as a response the result returned by the final message processor in the flow, which is null.

Configuring Filters

This section covers only those configuration activities common to all filters. For configuration activities that apply only to individual filters, click one of the links in the Reference column of the table Bundled Filters.

As for all Studio building blocks, you configure Filters in two major steps:

  1. Drag the filter from the Palette to the Message Flow canvas, then set its position within the sequence of building blocks that make up the application flow.

  2. Provide values for the required fields on the various tabs in the filter’s Properties Editor.