MuleSoft fundamentals and Mule 4 flow design revolve around two core ideas: a single Mule event object moves through an application, and work is organized into flows. When an entry component such as an HTTP listener, scheduler, or JMS listener runs, the runtime constructs one Mule event and passes it sequentially through processors. That event includes payload (the data that is repeatedly transformed), attributes (source metadata like headers and URI/query details that remain stable during the flow), and variables (flow-scoped storage used to keep values needed later). Because payload can be replaced by later steps, developers often store identifiers or correlation data in variables early, rather than depending on payload values. Mutating attributes directly is also discouraged, since attribute changes may not take effect as expected.

For structuring logic, Mule 4 provides public flows (with a source and their own error handling), subflows (sourceless and inheriting the caller’s context and error handling), and private flows (sourceless but owning their own error handling and isolated context). Flow-ref connects these units and supports passing outputs via target and targetValue without overwriting the main payload. For orchestration, scatter-gather can call multiple private flows in parallel, with a deliberate choice between fail-fast and graceful degradation when one route fails.