Mule Flow Building Blocks
By the end of this lesson, you'll be able to:
- Distinguish sources, processors, and connectors within a Mule flow
- Read a simple Mule flow XML and identify each building block
Prerequisites: Anypoint Studio and Mule Applications
Sources vs. processors vs. connectors
A source triggers the flow (exactly one per flow, always first). Processors transform, filter, or route the in-flight message (transform, choice/router, logger). Connectors are processors specialized for talking to one external system (the Salesforce connector, an HTTP request connector, a database connector) — every connector is a processor, but not every processor is a connector.
Reading a flow
Reading top to bottom (or left to right in the visual canvas) tells the whole story — what triggers this, what happens to the message at each step, which external systems get touched, and in what order.
A scheduled sync flow
<flow name="sync-new-leads-flow">
<scheduler>
<scheduling-strategy><fixed-frequency frequency="5" timeUnit="MINUTES"/></scheduling-strategy>
</scheduler>
<salesforce:query salesforceQuery="SELECT Id, Email FROM Lead WHERE CreatedDate = LAST_N_MINUTES:5"/>
<logger message="Synced #[sizeOf(payload)] new leads"/>
</flow>
The scheduler is the source (runs every 5 minutes); the Salesforce query is a connector-processor fetching new Leads; the logger is a plain processor recording what happened — three distinct roles, one flow.
Exercise
In a comment, identify the source, the connector, and the plain processor in this flow: an HTTP listener, followed by a database insert connector, followed by a logger.
Show hint
Only one of these three triggers the flow; one talks to an external system; one just logs.
Mule Flow Building Blocks — Quick Check
My Notes
Log in to keep private notes on this lesson.
Questions about this lesson
No questions yet — be the first to ask.
Log in to ask a question about this lesson.
Summary
Every Mule flow is source-then-processors, with connectors being a special kind of processor that talks to a specific external system — recognizing these three roles makes any Mule flow readable, even one you didn't build.