Anypoint Code Builder (ACB): Initial Observations Post GA

Kseniia Tarantsova
Another Integration Blog
9 min readNov 13, 2023

Today, there is a significant buzz surrounding Anypoint Code Builder, representing the latest advancement in API and Integration development. Why is this generating so much excitement? šŸ„ The reason is that it has officially reached the General Availability (GA) milestone, as of October 16th šŸ„³.

We extend our appreciation to those who have already had the opportunity to explore its capabilities. However, for those who have yet to experience it, thereā€™s no need to worry. Iā€™m here to guide you through an exploration of what Anypoint Code Builder offers. In this article, we will delve into its features, strengths, and weaknesses, and determine whether itā€™s the right time to transition from Anypoint Studio to Anypoint Code Builder.

Letā€™s embark on this journey together!

Anypoint Code Builder: prerequisites, download, install

Anypoint Code Builder is a comprehensive Integrated Development Environment (IDE) that is created to design, develop and deploy APIs within diverse environments, while also providing additional power of generative Artificial Intelligence (AI).

A detailed step-by-step guide for downloading and installing Anypoint Code Builder is readily available here:

1ļøāƒ£ Follow the link Download Anypoint Code Builder ā†’ choose Anypoint Code Builder and Mule 4 ā†’ fill in all the details to register ā†’ press Download.

Subsequently, you will be redirected to a web page featuring highly comprehensive video instructions for initiating your journey with Anypoint Code Builder on your desktop. To ensure a smooth and successful download and installation process, the following prerequisites are required:

2ļøāƒ£ Visual Studio Code (VS Code) ā€” code editor developed by Microsoft. Includes two installations: Install Visual Studio Code and Install Anypoint Extension Pack.

3ļøāƒ£ Anypoint Platform Account ā€” user account that grants access to MuleSoftā€™s Anypoint Platform (if you donā€™t have one, you can easily create a trial one following the link: Create Anypoint Platform Account).

4ļøāƒ£ Git ā€” distributed version control system (DVCS) used for tracking changes in source code during software development.

Upon successfully executing all the steps as demonstrated in the video, you will be greeted with the message ā€œWelcome to Anypoint Code Builderā€.

Anypoint Code Builder: Features

The current version of Anypoint Code Builder introduces an opportunity for us to engage with the three distinct API lifecycle stages as defined by MuleSoft:

  1. Design
  2. Implementation
  3. Management
https://www.mulesoft.com/sites/default/files/inline-images/image2_2.png

Simultaneously, itā€™s important to note that not all the steps within each of these stages are presently accessible.

Here, you will find a detailed list of steps within each stage, all of which are available:

Design Stage:

  • The capability to create API specifications.
  • The ability to commit and push API specifications to the Design Center.
  • The automatic generation of documentation based on RAML.
  • A mock service for testing APIs through the API Console.
  • The option to publish API specifications to the Exchange.

Implementation Stage:

  • The ability to import API specifications from the Exchange.
  • The scaffolding of flows is based on API Specifications.
  • The alignment with the Mule project structure (similar to Anypoint Studio).
  • The opportunity to build flows from scratch or utilize generative AI.
  • Access to all modules and connectors available in the Exchange.
  • ā—ļøPlease note that MUnits support is not yet available and is planned for FY25.

Management Stage:

  • Deployment.

Now, letā€™s explore these capabilities in practical terms.

Anypoint Code Builder: design

The initial phase in the API lifecycle involves the design process. In Anypoint Code Builder, you will find the Design an API action, conveniently situated in the upper-left corner of the interface. This action empowers you to start the process of designing and delineating your API, utilizing a variety of API specification languages.

To begin the API design process, certain key details must be provided:

  1. Project Name: A unique identifier for the API project.
  2. Project Location: This pertains to the directory on the local machine where the project files will be stored.
  3. API Specification Language: A selection can be made from a range of available options.
  4. Business Group: The specific business group to which the API Specification is associated.

Iā€™m going to create an Employee System API, a straightforward CRUD API that will facilitate two core operations: GET and PATCH. This APIā€™s primary responsibility is to establish communication with BambooHR, a human resources management software known for centralizing all employee information into a unified interface.

Iā€™ve opted for a RAML 1.0 from the available list of options. By selecting this choice and subsequently clicking Create Project, the system will prepare and unveil the API Specification page, marking the commencement of the API design process.

ā—ļøAnypoint Code Builder, unlike the Design Center, does not feature a dedicated hint menu when working on RAML file creation. Instead, you can access hint recommendations by utilizing the keyboard shortcut Control+Space.

Upon the completion of the RAML file, you have the option to perform testing directly from the API Console, which is conveniently accessible within the same window. The corresponding icon for accessing the API Console is located in the upper-right corner.

When you opt for the API Console icon, you will notice that the API Console, mirroring the familiar interface of the Design Center, becomes accessible. You can now proceed to test your API by choosing the Mocking Service option.

The final two steps encompass:

āœ… Commit and Push the RAML to the Design Center: This step involves the commit and push of the RAML file to the Design Center, ensuring that it is securely stored and managed within the Anypoint Platform.

āœ… Publish the API to Exchange: By publishing the API to the Exchange, you make it readily accessible and available for reuse by others within your organization.

Following these steps, a search bar will prompt you to specify essential details such as the project name, artifact ID, asset, and API version. Once this information is provided, the API will be successfully published to the Exchange.

Now, letā€™s explore the Anypoint Platform together to unveil the presence of the Employee System API in the Design Center and Exchange:

The design phase is completed and we are ready to proceed with implementation.

Anypoint Code Builder: Implementation

We can work on implementation by choosing one of the actions:

  • Implement an API
  • Develop an Integration.

The main difference is that implementing an API enables us to scaffold flows according to specification whereas developing an integration provides the option to build flows entirely from scratch or to leverage generative AI, aptly named Einstein, which is presently available in the Pilot version (ā—ļøaccess to this feature requires coordination with your companyā€™s account team). More about Einstein for Anypoint Code Builder and generative flows can be found in the Mulesoft blog article Generative Flows for Anypoint Code Builder.

Given our possession of a specification and our intent to scaffold flows, we will opt to Implement an API action from the quick actions list.

To implement an API by the specification, it is necessary to define a project name and search for the API specification within the Exchange.

Upon selecting Create Project, the interface will present a Project Explorer, Canvas, and Config XML file. Their appearance closely mirrors Anypoint Studio.

However, itā€™s worth noting that the Canvas within Anypoint Code Builder differs from that of Anypoint Studio. It features a vertical block structure, in contrast to the horizontal layout in Anypoint Studio. Notably, its interface grants visibility to only one flow at a time rather than displaying all flows within the file simultaneously.

Another noteworthy aspect is that in contrast to Anypoint Studio, Anypoint Code Builder lacks a graphical user interface for configuration properties. In Anypoint Code Builder, all configurations of processors, connector operations, dataweave mappings, and transformations must be specified through XML.

To enhance the efficiency of your work, built-in code snippets can be utilized. These are accessible by clicking the + icon on the flow canvas.

Once the implementation is finalized, you are fully equipped to initiate the process of running and debugging the API on your local machine. ā—ļøItā€™s essential to note that if additional VM arguments are required for the run configuration, you must make the necessary updates in the launch.json file.

Please be advised that steps 2 and 3 in the accompanying image can be omitted if you do not require any additional arguments.

Anypoint Code Builder: Deployment

Anypoint Code Builder offers a straightforward deployment process. The procedure involves the following steps:

  1. Click the rocket icon (šŸš€) located at the upper-right corner of the canvas.
  2. Review and, if necessary, modify the deploy.json file, which is automatically generated with the API name and deployment properties.
  3. Select your desired environment.
  4. You are now ready to proceed!

Upon accessing the Runtime Manager, you will observe the presence of the API, which was created and subsequently deployed to CloudHub. Following the successful completion of the deployment process, our next objective is to initiate a request to this API to assess its availability and to examine the structure of the response it generates.

First and foremost, letā€™s initiate a request to retrieve (GET) employee data using their unique ID.

Subsequently, let us proceed by initiating a request to update (PATCH) an employeeā€™s information using their unique ID. In this specific case, we will be updating the job title from ā€œSr. HR Administratorā€ to ā€œLead HR Administratorā€.

Conclusion

Anypoint Code Builder represents a remarkably powerful tool that consolidates a wide array of MuleSoft capabilities within a unified environment, representing a truly promising advancement.

According to Salesforceā€™s roadmap, we can anticipate the introduction of a user-friendly configuration interface (UI) that eliminates the need for manual XML manipulation by February 2024. Furthermore, additional capabilities, including MUnit support and a Dataweave expression builder, are scheduled for release in the upcoming fiscal year, FY25, and beyond. Considering this path of development, I believe that Anypoint Code Builder is progressively moving towards a complete replacement of Anypoint Studio. Therefore, we eagerly anticipate the improvements scheduled beyond.

In this context, the principle that ā€œmore is betterā€ holds, indicating a promising future for this extensive solution.

--

--

Kseniia Tarantsova
Another Integration Blog

Passionate about MuleSoft and API development, I share insights and tutorials to help developers integrate, automate, and innovate.