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.