Contact Us 1-800-596-4880

Managing Global Configuration Elements

Add, edit, and delete global configurations in Anypoint Code Builder from Global Elements. Create connector configurations, TLS contexts, object stores, caching strategies, API Autodiscovery, global error handlers, import project references, and properties files. Manage the same configurations in Global Elements, through MuleSoft Vibes, or in the source editor.

Open Global Elements

Open Global Elements from Project Properties to view and manage the global configurations defined in your project.

  1. Use one of these options:

    • In the canvas toolbar, click the (Manage Global Elements) icon to open Project Properties with the Global Elements tab selected.

    • In the Explorer, right-click your project and select Mule > Manage Global Elements.

      Alternatively, select Mule > Open Mule Project Properties and then click Global Elements from the menu.

      Global Elements shows a searchable table with the Type, Name, and Notes for each element.

  2. In Selected File, select a configuration file and view its elements.

  3. After you select a file, select New Configuration to create a configuration, or use MuleSoft Vibes.

    The table updates in real-time as you make changes.

Add a Global Configuration

Add connector configurations and other global configuration types from Global Elements.

To add a global configuration:

  1. Open Global Elements.

  2. Select a configuration file from Selected File.

  3. Click New Configuration.

  4. In Select configuration type, search for or browse to the type you want.

    Types are grouped by category:

    • Component Configurations

    • Global Configurations

    • Connector Configurations

    • Caching Strategies

  5. Select a type. A form opens, scoped to the file you selected.

  6. Complete the required fields and save.

The new element appears in the Configured Elements table and is written to the selected configuration file.

You can also add global configurations through MuleSoft Vibes using natural language. The element is created with the correct structure and placed in the right file automatically. For example:

  • "Add a Salesforce connector config"

  • "Register a new properties file"

  • "Create an HTTP Listener global config on port 8081"

For more details on using Vibes to manage global elements, see Use MuleSoft Vibes to Manage Global Configurations.

Edit a Global Configuration

To edit an existing element, use one of these methods:

  • Form editor — Click the More actions (…​) menu next to the element and select Edit. A form-driven editor opens with field validation so you can update the configuration. Form editing is available for connector configurations and for these global configuration types:

    • TLS Context

    • Object Store

    • Caching Strategy

    • API Autodiscovery

    • Global Error Handler

    • Import Project Reference

    • Properties

  • Source editor — Click More actions (…​) > Go to Source to jump directly to the element’s location in the XML file and edit it in context. Use this option for elements that don’t open in the form editor.

  • MuleSoft Vibes — Describe your change conversationally and Vibes applies it for you.

Remove a Global Configuration

Delete connector configurations and other global configuration elements from Global Elements.

To delete a global configuration:

  1. Open Global Elements.

  2. In the Configured Elements table, click the More actions (…​) menu next to the element.

  3. Select Delete.

  4. Confirm the deletion when the dialog names the element.

The element is removed from the configuration file, and the list refreshes.

You can also remove a global configuration through MuleSoft Vibes. For example:

  • "Remove the Salesforce connector config"

  • "Delete the HTTP Listener global config"

Before removing an element, Vibes identifies any flows that reference it and warns you of the impact before making any changes.

Consolidate Global Configurations

If global elements are scattered across multiple configuration files, consolidate them into a single global-configs.xml file.

To consolidate from Global Elements:

  1. Open Global Elements.

  2. Click Consolidate.

Anypoint Code Builder combines global configurations from all project files into global-configs.xml and updates flow file references.

To consolidate through MuleSoft Vibes, see Centralize Configurations from Studio Projects.

Manage Configuration Properties Files

When you create a new project, Anypoint Code Builder automatically generates a global-configs.xml file for storing configuration properties separately from flow definitions. If you open a project migrated from Studio, Anypoint Code Builder preserves the existing project structure.

Register a Properties File

To register a .yaml or .properties file as a configuration source, click New Configuration in Global Elements and select the configuration properties type. You can also use MuleSoft Vibes. For example:

  • "Register a new properties file"

  • "Add config.yaml as a configuration properties file"

Anypoint Code Builder adds a <configuration-properties> element to your global config XML and the file appears in Global Elements, under Configuration Properties.

Add Inline Global Properties

To add <global-property> key-value pairs, click New Configuration in Global Elements and select the global property type. You can also use MuleSoft Vibes. For example:

  • "Add a global property named env with value dev"

All inline properties are stored in global-configs.xml instead of individual application XML files.

Set Up Multi-Environment Configuration

Anypoint Code Builder supports the $site.yaml file pattern for environment-specific property files.

If your project contains files such as dev.yaml, qa.yaml, and prod.yaml, they appear in the Environments section of Global Elements.

To set the default environment, use MuleSoft Vibes. For example:

  • "Set the default environment to dev"

  • "Set up multi-environment configuration for dev, QA, and prod"

Vibes adds a corresponding <global-property> element to your global configuration file, for example: <global-property name="env" value="dev"/>.

Use Preview Mode to switch the active environment and verify that property placeholders resolve correctly before you deploy.

Work with Secure Properties

Anypoint Code Builder supports the Mule Secure Properties module:

  • Generate encrypted property values from Anypoint Code Builder.

  • Anypoint Code Builder warns you when a properties file contains unencrypted credentials.

For information about encrypting values and referencing them in your Mule application, see Defining and Securing Properties for a Mule Application. To edit a secure properties configuration from Global Elements, see int-create-secure-configs.adoc#edit-via-ui.

Global Element Types

In addition to connector configurations, you can add, edit, and delete these global configuration types from Global Elements:

Component What It Does

Global Error Handler

Set any error handler as the application-wide default. You can also reference handlers from imported projects for consistent exception management across teams.

API Autodiscovery

Configure your Mule application for API Manager auto-discovery at deployment time. Select from the flows defined in your application when configuring the auto-discovery settings.

TLS Context

Set up Trust Store and Key Store configurations once, then reference them from any connector that supports TLS.

Import Project Reference

Import a JAR containing a shared Mule project. Use its flows, error handlers, and connection configurations. Anypoint Code Builder handles POM dependency management. When you import from a project dependency, specify the Mule configuration file to import.

Caching Strategy

Define a centralized caching strategy that you can reference from Cache scopes across the project.

Object Store

Create an object store to use with a caching strategy or other components that persist data.

Configuration Properties

Register a .yaml or .properties file, or add inline global properties, so your application can resolve placeholders consistently.

For API Autodiscovery configuration details, see Configure API Autodiscovery for Local Testing and Tracking Requests with Autodiscovery.

Use MuleSoft Vibes to Manage Global Configurations

You can use MuleSoft Vibes to create and update global elements by using natural language prompts.

Automatic Generation

When Vibes generates a flow that uses a connector, it also generates the corresponding global configuration element. Credentials are stored as property placeholders, and a sample properties file is created for the generated configuration.

Natural Language Examples

You can ask Vibes things like:

  • "Create an HTTP Listener global config on port 8081"

  • "Set up multi-environment configuration for dev, QA, and prod"

  • "Centralize all global configs into the global-configs.xml file"

  • "What global elements are defined in this project?"

  • "Validate my property placeholders"

Centralize Configurations from Studio Projects

If your project has global elements scattered across multiple config files (common in projects migrated from Studio), ask Vibes to consolidate them:

"Move all global configs into global-configs.xml"

Vibes identifies every global element across your config files, moves them to global-configs.xml, and updates all flow file references automatically.

You can also click Consolidate in Global Elements. See Consolidate Global Configurations.

The manage-global-configurations skill powers these operations. For more on skills in MuleSoft Vibes, see Using Skills with MuleSoft Vibes.