-
Open the Command Palette.
-
Before starting your Mule app, confirm that the connection to the listener is successful:
From the code editor, above the HTTP Listener configuration (
<http:listener-config/>), click Test Connection.-
If the test succeeds, you see a Connection is valid message.
-
If the connection fails, an error message indicates that the connection was unsuccessful. If the app is running when you click Test Connection, this error message appears:
Invalid Connection Got status code: 500 when trying to resolve a Mule Runtime operation. Reason: 'Internal Server Error.
-
-
Open the Run and Debug panel.
-
Open the Output panel.
Show me how
-
Mac: Ctrl+Shift+g
-
Windows: Cmd+Shift+g
-
-
Open the Source Control panel.
-
Open the Source Control panel.
-
Open the Auto Complete menu.
Show me how
-
Mac: Ctrl+Space
-
Windows: Cmd+Space
-
-
Navigate to Configure Snippets.
Show me how
-
In the desktop IDE, select Code > Settings > Configure Snippets.
-
In the cloud IDE, click the
(menu) icon, and select Preferences > Configure Snippets.
-
In either IDE:
-
Use keyboard shortcuts to open the Command Palette:
-
Mac: Cmd+Shift+p
-
Windows: Ctrl+Shift+p
-
-
Select this command:
Snippets: Configure Snippets
-
-
-
In the activity bar of the IDE, click the
(Anypoint Code Builder) icon. .Show me how
Show me how
-
US cloud (non-EU host): Anypoint Platform (US)
-
EU cloud (EU host): Anypoint Platform (EU)
Show me how
-
US cloud (non-EU host): Exchange (US)
-
EU cloud (EU host): Exchange (EU)
To reuse an existing project name, you must delete the project that is already using the name first. See des-delete-api-projects.adoc. . To reference an element within a component defined in the fragment file:
+
After adding the fragment to your spec, you can:
-
Navigate to the dependency:
Place the cursor on the fragment reference and press Command+Click. For example:
-
View the dependency in the API Console:
Place the cursor on the fragment reference and click the
(API Console) icon to open the fragment in the console.
For more information, see Review Your Spec in the API Console. This topic is in progress. Don’t create the project within another project directory.
-
Click the
(Start Debugging (F5)) icon for Debug Mule Application.
Alternatively, if the Start Debugging (F5) icon is not present:
-
Click Run and Debug.
-
If a Select debugger dropdown menu appears, select Mule Xml Debugger to initiate the debugging session:
When the application deploys successfully, you see a
DEPLOYEDlog message in the output panel:********************************************************************** * - - + DOMAIN + - - * - - + STATUS + - - * ********************************************************************** * default * DEPLOYED * **********************************************************************
-
-
From your IDE, open the Terminal window in the console:
Anypoint Code Builder supports scaffolding these schema fragment files if they’re referenced from API specs:
| Avro | JSON | RAML | |
|---|---|---|---|
AsyncAPI |
Yes |
Yes |
No |
GraphQL |
No |
No |
Yes |
OData |
No |
No |
Yes |
REST |
No |
No |
Yes |
SOAP |
No |
No |
Yes |
If you add a fragment that isn’t supported, the scaffolder doesn’t add these fragments as project dependencies when you import the spec from Exchange. However, you can scaffold schemas that are specified inline within the spec.
For OAS and JSON schema, you can also specify fragment files that you create manually within the implementation or integration project directory.
AsyncAPI Open Beta: Starting in June 2024, scaffolding and implementing version 2.6 and 2.0 AsyncAPI specifications are supported. Your Anypoint Platform organization administrator must accept Beta terms and conditions before you can discover an AsyncAPI spec in Exchange and scaffold it into your project. Enablement status is available in Anypoint Platform from Anypoint Code Builder.
-
An administrator with an Anypoint Platform organization account must provide you with the necessary permissions. See start-configure-permissions.adoc.
-
The cloud IDE requires a non-trial Enterprise license of Mule runtime engine. See Upgrade Your Account and mule-runtime::installing-an-enterprise-license.adoc.
-
Anypoint Platform requires a user account. You can use an existing account or create one from Anypoint Platform (see supported Cloud Hosts).
-
If an API specification is open in the Explorer panel of the IDE, close the project to avoid a synchronization error when you switch clouds.
-
In the desktop IDE, click File > Close Folder.
-
-
Open the Settings tab in the desktop IDE:
-
Open the Settings tab for the IDE:
+ .Show me how
Details
-
From the Anypoint Code Builder panel, click the
(gear) icon.
-
From the activity bar, click the
(gear) icon, select Settings, and search for
mulein the Settings tab. -
Provide the command
MuleSoft: Open ACB Settingsin the Command Palette.
Use source control management (SCM) to store and share your design, integration, and implementation projects. For source control options, see anypoint-code-builder::start-scm.adoc.
-
Have some familiarity with business groups.
When you publish your API spec to Exchange from Anypoint Code Builder, the IDE requests the name of the business group.
To sync changes to project files with your repo, see [sync-changes].
-
Stage your files to your local repository by hovering over the Changes area (located after the Commit button) and clicking the
(plus) icon.
Alternatively, you can stage a single file by clicking the plus icon for that file.
Staged files move from the Changes area in the Source Control panel to the Staged Changes area. The UI uses the
git addcommand to add changes from your working directory to the staging area in your local Git repo. -
Provide your a commit message for the files, and then click Commit, for example:
-
Provide the following command:
MuleSoft: Import Asset from Exchange
-
Depending on the language of your API spec, select one of these options:
-
Rest API for OAS or RAML
-
GraphQL API
-
-
If prompted, click Allow to allow sign in using Anypoint Platform and select the business group.
-
Type the name of the API spec, and press Enter.
-
Wait for the IDE to load a list of matches to the name.
+ .Show me how
Details
-
In the field that opens, provide a name for your implementation project.
-
Navigate to a directory for your project, and click Select target folder.
-
Select a Mule runtime (Mule) version for your project.
-
Select a supported Java version for Mule.
-
After the scaffolding process completes, view the scaffolded interface for your project from the
src/main/muledirectory in the Explorer.If the scaffold fails, see troubleshoot-implementation-errors.adoc.
You can also open your new project’s
mule-artifact.jsonfile from the Explorer to check the Mule and Java versions, for example:anypoint-code-builder::partial$acb-reusable-steps.adoc
The
mule-artifact.jsonfile is located at the root level of the project directory.
{
"minMuleVersion": "4.6.2",
"javaSpecificationVersions": [
"11"
]
}<dependency>
<groupId>e91cab06-650b-4634-9c6f-5bc4f4fc4d17</groupId>
<artifactId>OAS-Example</artifactId>
<version>1.0.1</version>
<classifier>oas</classifier>
<type>zip</type>
</dependency>Although it is also possible to set the versions as values to muleRuntimeVersion and jdkVersion items directly in the Settings tab, you must know the major, minor, and patch numbers, and in some cases, the timestamp. It is easier to set them after clicking Edit defaults through command palette.
-
If prompted, click Set Version to set a supported Mule runtime or Java version in the Project Properties tab.
Make sure that you have access to AsyncAPI implementation features from the IDE:
-
Log in to Anypoint Platform.
-
From Anypoint Platform, open the Anypoint Code Builder landing page.
-
If the message AsyncAPI Beta is now available in Anypoint Code Builder and Anypoint Studio appears on the page, ask your organization administrator to join the Beta program by:
-
Clicking Join Beta from the Anypoint Code Builder landing page
The Join Beta button is available only to your organization administrator.
-
Reviewing the terms and conditions of the beta program
-
Clicking Get Access
When the AsyncAPI feature is available for your organization, the Anypoint Code Builder landing page provides the following notification:
AsyncAPI Implementation Beta for Anypoint Code Builder and Studio is enabled for your organization.
-
-
From Create, click Implement an API:
-
Complete the Implement an API Specification form:
Field Name Field Value Project Name
Unique name for your project.
This name is used as the title and name of the project file. For example, if the project name is My Project, the project file name is
my-project.Project Location
Your home directory or another directory you create.
Search an API Specification from Exchange
Name of the specification in Exchange. Search results can include OAS, RAML, AsyncAPI, and GraphQL specifications. Activate Show filters to narrow your search results. See imp-filter-search-results.adoc for more information. To implement a gRPC API spec, see imp-implement-grpc-api-spec.adoc.
Mule runtime
Mule runtime version to use for your project.
Java Version
Java version to use for Mule.
-
Search for an API spec on Exchange:
-
Start typing the name of an API spec.
-
Press Enter to display a list of search results.
-
Click Add Asset to add the selected API spec:
-
-
Provide business logic to implement this interface within the Mule app:
Define your business logic by configuring connector operations and processing components, as needed for your use cases. Provide configuration property values to the
dev-properties.propertiesfile. Optionally, create and configure additional flows or subflows for your processing requirements.To find guidance on configuring components, debugging, performing unit testing on your application, and other tasks, see int-developing-integrations.adoc. For information about connectors and processors for configuring your business logic, see acb-reference.adoc.
For an example of an AsyncAPI specification, the scaffolded interface, and business logic for processing some orders within a Mule application, see [examples].