Name of the variable in which you want to store message data. Names can only include numbers, characters, and underscores. For example, hyphens are not allowed in the name.
Value of the data to store in the target variable. By default, the value is the message payload (payload). The field accepts any value that a variable accepts: any supported data type, DataWeave expressions, the keywords payload, attributes, and message, but not the keyword vars.
See mule-runtime::target-variables.adoc in the Mule documentation.
| Encoding
| encoding
| Encoding of the payload that this component outputs.
| Mime type
| mimeType
| MIME type of the payload that this component outputs. For more information, see Using Reader and Writer Properties.
| Parameters
| N/A
| Appends a key-value pair for a reader property to the value of the outputMimeType attribute. Multiple key-value pairs are allowed. Reader properties are specific to the MIME type. For example, see the JSON reader properties for application/json. To find other reader properties, navigate to a supported format from the DataWeave format documentation, and see Using Reader and Writer Properties.
For reference documentation on specific connector and component configurations, see acb-reference.adoc.
When adding components, you can start from the canvas or the configuration XML for your app. You can configure components from their configuration panels in the canvas or from the XML.
In Anypoint Code Builder, both integrations and implementations are Mule applications.
reuse::partial$connectors/connectors-mule-apps.adoc
Built-in Anypoint connectors are available from the canvas and configuration XML for integration and implementation projects. These connectors include:
-
Anypoint Connector for Agent2Agent (A2A) (Beta) (<a2a:/>) (A2A Connector)
-
Anypoint Connector for Agentforce (<ms-agentforce:/>) (Agentforce Connector)
-
Anypoint Connector for Database (<db:/>) (Database Connector)
-
Anypoint Connector for Einstein AI (<ms-einstein-ai:/>) (Einstein AI Connector)
-
Anypoint Connector for Email (<email:/>) (Email Connector)
-
Anypoint Connector for File (<file:/>) (File Connector)
-
Anypoint Connector for HTTP (<http:/>) (HTTP Connector)
-
Java Module (<java:/>)
-
Anypoint Connector for MCP (MCP Connector) (<mcp:/>)
-
Anypoint Connector for Salesforce (<salesforce:/>) (Salesforce Connector)
-
Anypoint Connector for Salesforce Data Cloud (<sdc:/>) (Salesforce Data Cloud Connector)
-
Anypoint Connector for Sockets (<sockets:/>) (Sockets Connector)
-
Anypoint Connector for Workday (<workday:/>) (Workday Connector)
Connector XML tags start with a namespace followed by an operation, following the syntax namespace:operation, such as <db:select/> for a Select operation in Anypoint Connector for Database (Database Connector).
For more information, see connectors::introduction/intro-config-use-acb.adoc.
Many other connectors are available from your Anypoint Code Builder IDE through Anypoint Exchange:
-
US cloud (non-EU host): Exchange (US)
-
EU cloud (EU host): Exchange (EU)
To find information about more connectors, see connectors::introduction/introduction-to-anypoint-connectors.adoc, and find documentation on all Anypoint connectors and modules.
Use the Connection Management Configuration Panel to easily configure connections to third-party systems directly from the UI.
In this panel, you can create, edit, delete, and test connections directly within the IDE interface, automatically populate connection fields using metadata provided by the connector, and save and manage connection configurations without switching to the XML view.
To open the configuration panel:
-
Select an existing component, or add a new one.
-
Click the + icon.
This action displays the configuration panel, for example:
From here, you can:
-
Configure a connection for this project.
You can select a previously saved connection in the Connection field and the form is pre-populated with existing configuration data.
NoteChanges impact all components using this connection. -
Update connection details without manually editing the XML code.
-
Test the connection directly within the panel to verify it’s correctly configured.
The test functionality helps prevent errors by allowing users to confirm that the connection is valid before committing changes.
-
Delete an existing connection if it’s no longer needed.
A confirmation message shows any affected components that use the connection.
-
View all components that depend on a connection.
Configure message and event processing in an integration application or API implementation. Core processors (also called Mule components) run on the Mule runtime engine.
-
acb-component-error-handler.adoc
Includes On-Error Continue (
<on-error-continue/>) and On-Error Propagate (<on-error-propagate/>)
The following examples illustrate basic configurations for adding components to your project from the canvas, and the configuration XML. The examples assume you are beginning with an empty integration project.
-
{open-config-xml}, such as
my-project-name.xml.-
The canvas provides space for a visual representation of your Mule flows or subflows.
-
The configuration XML editor displays the configuration file for your Mule application.
-
-
Select Build a Flow from the canvas to create an empty flow within a Mule integration application.
-
Change the default name of the flow from the canvas or from the configuration XML.
- From the canvas
- From the configuration XML
-
Replace the default name of the flow (
name1) with your flow name, such asgetFlights, for example:<flow name="my-flow" > </flow>
-
Add a component to your project from the canvas.
For example, add the HTTP Listener component:
-
In the Add Component panel, search for and select Listener from the HTTP results:
The configuration XML file now includes the XML for the HTTP Listener within the
<flow/>element, for example:<flow name="getFlights" > <http:listener path="mypath" config-ref="config-ref" doc:name="Listener" doc:id="rrjiqa" /> </flow>
-
Add another component, this time using the configuration XML.
In the configuration XML, place your cursor before the opening
<flow>tag. Ensure that the cursor is not inside the<flow/>element. Add the following code:<http:listener-config name="HTTP_Listener_config" > <http:listener-connection host="0.0.0.0" port="8081" /> </http:listener-config>
-
Notice that the Listener component in the canvas now displays an error:
-
To determine where the error is, select the processor in the canvas.
Anypoint Code Builder highlights its location within the configuration XML, and you can mouse over the issue for more information, for example:
-
To fix the error, change the value of the
nameattribute inhttp:listener-configto match the name of theconfig-refvalue in yourhttp:listenerconfiguration:<http:listener-config name="config-ref" > <http:listener-connection host="0.0.0.0" port="8081" /> </http:listener-config>
The HTTP listener within your flow now references the HTTP listener configuration, a global connection configuration that resides outside of the flow. For more information about debugging, see anypoint-code-builder::debugging-mule-apps.adoc.
-
-
Add another component to your flow.
For example, add a Set Payload component to your HTTP Listener operation:
For more information about configuring DataWeave expressions, see anypoint-code-builder::int-configure-dw-expressions.adoc.
Your configuration XML file now looks similar to the following:
<http:listener-config name="config-ref" > <http:listener-connection host="0.0.0.0" port="8081" /> </http:listener-config> <flow name="getFlights" > <http:listener path="path" config-ref="config-ref" doc:name="Listener" doc:id="rrjiqa" /> <set-payload value="my value" doc:name="Set payload" doc:id="gecykt" /> </flow>
-
Add another component to your flow.
For example, add the Create operation from Anypoint Connector for Salesforce to insert an Account record.
Use this pattern when your flow receives data through an HTTP Listener and must create Salesforce records. If you completed the earlier steps that add Set payload with a fixed string, remove or replace that processor so you can shape the payload before Create.
For more information about using Create with Account records, see salesforce-connector::salesforce-connector-examples.adoc.
-
In the configuration XML, add a global Salesforce connection element above your
<flow>element (not inside the flow).Use configuration properties for credentials instead of literals; for example:
<salesforce:sfdc-config name="Salesforce_Config" doc:name="Salesforce Config"> <salesforce:basic-connection username="${salesforce.username}" password="${salesforce.password}" securityToken="${salesforce.token}" /> </salesforce:sfdc-config>
For more information about connection types and authentication fields, see salesforce-connector::index.adoc.
-
In the canvas, click the
(Add component) icon after HTTP Listener. -
In the Add Component panel, search for Set payload, and add the component.
-
Configure Set payload with a DataWeave expression that builds a JSON object whose fields match your HTTP API (they need not match Salesforce field names yet).
For example, use fx to enter DataWeave with
output application/jsonand sample fields such ascompanyName,industry, andphoneNumber.Alternatively, add Transform Message and use the same DataWeave in
<ee:set-payload/>.For more information about Transform Message, see anypoint-code-builder::acb-component-transform.adoc.
-
From the canvas, click the
(Add component) icon after Set payload (or Transform Message). -
In the Add Component panel, click Connectors, select Salesforce, and select Create.
-
In the configuration panel for Create, set:
-
Connection config: The global Salesforce configuration name (for example,
Salesforce_Config). -
Type:
Account. -
Records: A DataWeave expression that resolves to the records to create.
If the incoming payload uses different property names than Salesforce expects, map those properties in Records, as shown in the configuration XML example that follows. If the payload is already an array of Java objects with Salesforce field names (
output application/java), you can use#[payload].
TipIf Type stays empty until you establish a working Salesforce connection, set
type="Account"on<salesforce:create/>in the configuration XML. For more information about connector fields for this operation, see salesforce-connector::index.adoc.NotePicklist fields such as Industry must use values that exist in your Salesforce organization.
The following configuration XML listens on
/accounts, builds a JSON payload, maps it to Account fields inside<salesforce:records/>, and calls Create. Alignconfig-refon<http:listener/>with thenameof your<http:listener-config/>(for example,config-reffrom the earlier steps in this topic).<http:listener-config name="config-ref" > <http:listener-connection host="0.0.0.0" port="8081" /> </http:listener-config> <salesforce:sfdc-config name="Salesforce_Config" doc:name="Salesforce Config"> <salesforce:basic-connection username="${salesforce.username}" password="${salesforce.password}" securityToken="${salesforce.token}" /> </salesforce:sfdc-config> <flow name="createSalesforceAccountFlow" > <http:listener path="/accounts" config-ref="config-ref" doc:name="Listener" doc:id="rrjiqa" /> <set-payload doc:name="Set Payload" value="#[%dw 2.0 output application/json --- { companyName: 'Anypoint Inc.', industry: 'Technology', phoneNumber: '415-229-2000' }]" /> <salesforce:create doc:name="Create" type="Account" config-ref="Salesforce_Config"> <salesforce:records>#[%dw 2.0 output application/java --- [{ Name: payload.companyName, Industry: payload.industry, Phone: payload.phoneNumber }]] </salesforce:records> </salesforce:create> </flow>
If the message payload is already an array of Java objects with Salesforce field names, you can omit
<salesforce:records/>and set Records to#[payload], or use a self-closing<salesforce:create/>element with that default.You can achieve the same result by adding Transform Message with
output application/javafollowed by<salesforce:create type="Account" config-ref="Salesforce_Config"/>with Records set to#[payload]. -
-
Most connectors provide an operation, such as the HTTP Listener operation, that triggers the flow to start. These operations typically include connection configurations that you can test.
You can test the connection from the connectors Configuration panel. For example, to test an HTTP Listener connection:
-
Click the + icon on the connector to open the configuration panel.
-
After filling in the required fields, click Test Connection.
The status bar shows the progress:
-
Verifying connection indicates that the test is in progress.
-
Connection is valid indicates a successful connection.
-
Invalid Connection Got status code: 500 when trying to resolve a Mule Runtime operation indicates a connection error.
You can test the connection from the configuration XML. For example, to test an HTTP Listener connection, click Test Connection in the configuration XML:
The status bar shows the progress:
-
Verifying connection inbound-request indicates that the test is in progress.
-
Connection is valid indicates a successful connection.
-
Invalid Connection Got status code: 500 when trying to resolve a Mule Runtime operation indicates a connection error.
A common code
500error isport 8081: Address already in use. For port conflicts, configure a different port, such as8082, and retest the connection.
Before publishing, run your application in debug mode.
Anypoint Connectors provide operations for retrieving, modifying, and sending data to and from systems. In addition to the built-in connectors that Anypoint Code Builder provides, you can download many other connectors from Anypoint Exchange.
To import a connector from Exchange and add it to your configuration:
-
{open-config-xml}, such as
my-project-name.xml. -
Click
(Show Mule graphical mode) in the activity bar to open the UI canvas if it doesn’t open automatically. -
Add the connector the same way you added other components from the canvas:
-
In the Add Component panel, click Connectors.
-
Click the connector name and then click the operation to add, such as Publish:
-
If the connector is not available locally, click the
(Search in Exchange) toggle:-
Search locally
-
Search in Exchange
-
-
Select the connector to add to your project. You can select from connector versions that are compatible with your Mule runtime and Java version set in Project Properties.
-
Select the operation from the Add Component panel.
To import a connector from Exchange to use later in your project:
-
{open-config-xml}, such as
my-project-name.xml. -
Click
(Show Mule graphical mode) in the activity bar to open the canvas if it doesn’t open automatically.
partial$acb-reusable-steps.adoc -
Select the following command:
MuleSoft: Import Asset from Exchange
-
Select Connector.
-
Search for the connector name to import, such as "MQ," for example:
-
Select the connector.
-
At the prompt, select the version of the connector to import, such as
v4.0.3.Anypoint Code Builder imports the connector and makes it available in the Components list.
For more information about the connectors available on Exchange, see connectors::index.adoc. For more information about Exchange, see Exchange (US) or Exchange (EU) and exchange::index.adoc.
You can open a component and its configuration panel in the canvas from the XML editor. This feature is helpful, for example, if you want to configure the component from the UI, if a component is in another flow than the flow currently displayed in the canvas, or if the canvas is not open.




