Global Elements 

A global element is an object that you define once to configure specific parameters for a module in a Mule flow. Rather than repeatedly writing the same code to apply the same configuration to multiple local elements in flows, you create one global element that details your connection, configuration or transport details.

Then, you can require any number of elements across flows in your Mule application to reference the global element to configure runtime behavior.

Global elements provide a number of benefits to you as a Mule application developer:

  • Reusability: You can configure a global element just once, and share that configuration among building blocks of the same type. This is particularly useful when you have to define the connection details and login credentials for an external source, such as a SaaS application or database.

  • Efficiency: Rather than changing the same configuration multiple times within many like building blocks (e.g. multiple connectors that hook into the same service, using one set of credentials) throughout the Mule flow, you can change the configuration once in the global element, and the changes apply to all Mule flow elements that reference the global element.

  • Flexibility: An element in a Mule flow can apply a global element’s configuration exactly as defined, or compliment the global configuration properties.

In this topic:

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.