Contact Us 1-800-596-4880

Core Components

Standard Support for Mule 4.1 ended on November 2, 2020, and this version of Mule reached its End of Life on November 2, 2022, when Extended Support ended.

Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted.

MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements.

Like the operations in connectors and modules, Core components are important building blocks of flows in a Mule app. Core components provide the logic for processing a Mule event as it travels in a series of linked steps through the app. Examples include the Scheduler, For Each, and Logger components.

  • In Studio, Mule components are accessible by clicking Core from the Mule palette.

    Core Components in Studio

    Notice that the components are subdivided into types, including Batch, Error Handling, and Flow Control.

  • In Design Center, when you are building a Mule app, you can find Mule components listed among Modules in the Select a Component dialog.

    Core Components in Design Center

    Design Center provides many of the Core components described below. Though the Design Center UI does not subdivide components into the types you see in the Studio UI, it can help to conceptualize them by those types.

Batch

To process Mule messages in batches, instead of processing them all together, you can use Batch components, which include:

  • Batch Aggregator

  • Batch Job

  • Batch Step

Components

These Core components perform a variety of tasks:

  • Custom Business Events: For collecting information about flows and message processors that handle your business transactions. See also Business Events.

  • Dynamic Evaluate: For dynamically selecting a script, instead of forcing you to hardcode it through the Transform Message Component.

  • Flow Reference: For routing the Mule event to another flow or subflow (and back) within a Mule app.

  • Logger: For logging important information about your Mule app, such as error messages and status notifications.

  • Parse Template: For processing a template and obtaining a result.

  • Transform Message: For converting input data to a new output structure or format.

Endpoints

Endpoints (sometimes called Sources in Studio or Triggers in Design Center) include components that initiate (or trigger) processing in a Mule flow. The Scheduler is an endpoint. It triggers a flow to start at a configurable interval.

Note that some connectors provide listeners that serve as endpoints. Listeners can trigger a flow when they receive an external request. For example, an HTTP Listener that is configured for a given URL can trigger a flow when someone or some process goes to that URL.

Error Handling

Error handling components route and process Mule errors that occur in a Mule app:

  • Error Handler

  • On Error Continue

  • On Error Propagate

Flow Control (Routers)

A Flow Control component (or Router) takes the input Mule event and routes it to one or more separate sequences of components. Flow Control components include:

  • Choice

  • First Successful

  • Round Robin

  • Scatter-Gather

For example, a Choice router applies DataWeave logic to pick one of two or more routes, where each route is a separate sequence of event processors.

A Scatter-Gather router router sends the input event to every route, and each route independently processes the event. After every route has processed the event, the results from all the routes are combined together into one output event.

Scopes

A Scope is a type of component that groups together a sequence of event processors (such as other Core components and operations from both modules and connectors) to apply some programming behavior to that isolated sequence of event processors.

Scopes include these components:

  • Async

  • Cache

  • Flow

  • For Each

  • Try

  • Until Successful

For example, a Try scope lets you isolate and handle any errors that occur in a particular sequence of flows. So, you might wrap an outbound HTTP Request connector (and perhaps some other surrounding components before and after the HTTP Request connector, such as a Transform Message component or a Logging component) in a Try scope, so if an error results, you can apply logging or compensation logic specific to that grouping of components. See Try Scope.

Another example is the For Each (or Foreach) scope, which takes a collection of data, usually extracted from the current input event, and applies the same sequence of event processors to every item in the collection. For example, a For Each scope might be used to process each individual row returned from a database query or each individual line from a CSV file. See For Each Scope.

Transformers

Transformers are components you can use to set or remove a part of the Mule event. Transformers include: