Mule Concepts
Elements in a Mule Flow :
Filters, Scopes and Routers
• Mule includes a variety of message processors
designed to facilitate message routing or filtering,
and message processor wrapping.
• They can be categorized as follows :
– Filters
– Scopes
– Routers
Elements in a Mule Flow
• Filters :
– Filters evaluate a message to determine whether it can
proceed through a flow.
– The simplest filters implement basic logic operators (such
as and, or, and not)
– These simple elements can be combined in various ways to
specify complex logical conditions.
– Example :
• a filter near the beginning of your flow can be used to reject any
requests from a particular range of IP addresses, or simply use a
filter to reject any messages with a particular payload, or with a
null payload
Elements in a Mule Flow : Filters
• Filters Example
(Expression Filter):
Elements in a Mule Flow : Filters
• Scopes :
– Work to encapsulate other message processors so that
they function as a single unit.
– You might wrap several message processors together to
form a transactional unit, so that they succeed or fail to
process a message together.
– This ensures accurate updating of a database, for
example.
– Example :
• You might wrap several message processors together within
acache scope to store the result of their processing for reuse, or
wrap a single message processor within a message enricher scope
to add to a message payload without manipulating the original
contents.
Elements in a Mule Flow : Scopes
• Scopes Example (Message Enricher and Cache Scope):
Elements in a Mule Flow : Scopes
• Routers / flow controls:
– Are used to direct or otherwise control messages within a flow.
– At times, flow controls act as splitters, resequencers, or
aggregators, splitting messages into individual items for
processing, resequencing message content, or aggregating split
messages.
– At times, they act as forks in the road, evaluating a message’s
payload, properties, or variables, then routing to the message
down a particular "pathway" according to those contents.
– Thus, flow controls facilitate content-based routing.
– Example :
• you can use a choice flow control to examine part of a message
payload, then route the message to the first "pathway" for which the
set condition evaluates to true, such as where an order exceeds
$5,000.
Elements in a Mule Flow : Routers
• Routers / flow controls Example (Choice Router):
Elements in a Mule Flow : Routers
Mule Concepts
Thank You.

Mule concepts filters scopes_routers

  • 1.
    Mule Concepts Elements ina Mule Flow : Filters, Scopes and Routers
  • 2.
    • Mule includesa variety of message processors designed to facilitate message routing or filtering, and message processor wrapping. • They can be categorized as follows : – Filters – Scopes – Routers Elements in a Mule Flow
  • 3.
    • Filters : –Filters evaluate a message to determine whether it can proceed through a flow. – The simplest filters implement basic logic operators (such as and, or, and not) – These simple elements can be combined in various ways to specify complex logical conditions. – Example : • a filter near the beginning of your flow can be used to reject any requests from a particular range of IP addresses, or simply use a filter to reject any messages with a particular payload, or with a null payload Elements in a Mule Flow : Filters
  • 4.
    • Filters Example (ExpressionFilter): Elements in a Mule Flow : Filters
  • 5.
    • Scopes : –Work to encapsulate other message processors so that they function as a single unit. – You might wrap several message processors together to form a transactional unit, so that they succeed or fail to process a message together. – This ensures accurate updating of a database, for example. – Example : • You might wrap several message processors together within acache scope to store the result of their processing for reuse, or wrap a single message processor within a message enricher scope to add to a message payload without manipulating the original contents. Elements in a Mule Flow : Scopes
  • 6.
    • Scopes Example(Message Enricher and Cache Scope): Elements in a Mule Flow : Scopes
  • 7.
    • Routers /flow controls: – Are used to direct or otherwise control messages within a flow. – At times, flow controls act as splitters, resequencers, or aggregators, splitting messages into individual items for processing, resequencing message content, or aggregating split messages. – At times, they act as forks in the road, evaluating a message’s payload, properties, or variables, then routing to the message down a particular "pathway" according to those contents. – Thus, flow controls facilitate content-based routing. – Example : • you can use a choice flow control to examine part of a message payload, then route the message to the first "pathway" for which the set condition evaluates to true, such as where an order exceeds $5,000. Elements in a Mule Flow : Routers
  • 8.
    • Routers /flow controls Example (Choice Router): Elements in a Mule Flow : Routers
  • 9.