Contact Free trial Login

Mule Applications

You typically create Mule apps to perform system integrations. Mule apps are configured to run in Mule Runtime. A request to a Mule app triggers Mule to encode the request and data in a Mule Event, and to pass it to either single or multiple threads.

The main building blocks of Mule apps are components. Components execute business logic on the messages that flow through your apps. There are three categories of component: core components, components that are grouped into collections named connectors, and components that are grouped into collections named modules.

Core Components

These are individual components that are part of the core of the functionality of Mule Runtime. Here is a sampling of the features that core components let you add to your apps:

  • Asynchronous processing of parts of a flow or subflow

  • Batch processing of messages

  • Initiating subflows

  • Logging

  • Setting payloads

  • Transforming messages with the DataWeave language

  • Creating Try scopes in your flows so that you can catch and respond to errors

For example, the Choice router is a component that dynamically routes messages through a flow according to a set of DataWeave expressions that evaluate message content. Each expression is associated with a different routing option. The effect is to add conditional processing to a flow, similar to an if/then/else code block in most programming languages.

A list of the Core components in Anypoint Studio
Figure 1. A List of the Core Components in Anypoint Studio

For component documentation, see Core Components.

Connectors

Connectors group together components that were created to facilitate the integration of MuleSoft applications with any external resources, such as third-party APIs or standard integration protocols. They enable connectivity to SaaS and on-premises applications, systems, and services.

For example, the Salesforce Connector provides components that let you use the Salesforce platform APIs to perform a large number of different operations.

The Salesforce connector and its operations listed in Anypoint Studio
Figure 2. The Salesforce connector and its operations listed in Anypoint Studio

For connector documentation, see Connectors and Modules (for Mule 4).

Modules

Modules group together components that were created to add flexibility to your apps by allowing you to aggregate values compress data, use Java features, use extra features for processing JSON, and more. The features that modules offer are more at the level of traditional application coding.

For example, the XML module provides components that can process and extract data from an XML document.

The XML module and its components
Figure 3. The XML module and its components listed in Anypoint Studio

Mule Configuration File for Applications

Mule apps are defined in a Mule Configuration File. This file is an XML document that specifies dependencies needed to run the app. In this configuration file, you can write the XML by hand.

You can also use the graphical user interfaces in Design Center or Anypoint Studio to structure and define the behavior of your Mule app. While you use either of these GUIs, the underlying XML is provided for you.
In Studio, the XML is also available for viewing and editing.

For module documentation, see Connectors and Modules (for Mule 4).

For module documentation, see Connectors and Modules (for Mule 4).

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub