DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • MuleSoft: Tactical and Strategical Role of an Application Template
  • How To Build AI-Powered Prompt Templates Using the Salesforce Prompt Builder
  • Automated Bug Fixing: From Templates to AI Agents
  • MuleSoft OAuth 2.0 Provider: Password Grant Type

Trending

  • Bridging UI, DevOps, and AI: A Full-Stack Engineer’s Approach to Resilient Systems
  • Developers Beware: Slopsquatting and Vibe Coding Can Increase Risk of AI-Powered Attacks
  • Proactive Security in Distributed Systems: A Developer’s Approach
  • How To Build Resilient Microservices Using Circuit Breakers and Retries: A Developer’s Guide To Surviving
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. How to Create a Template Project With Anypoint Studio and Mulesoft Exchange

How to Create a Template Project With Anypoint Studio and Mulesoft Exchange

You write process APIs by making a template process API and template item in Mulesoft Exchange.

By 
Jos Aikema user avatar
Jos Aikema
·
Dec. 15, 16 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
15.0K Views

Join the DZone community and get the full member experience.

Join For Free

For a project, I needed to write a couple of process APIs. These process APIs all consist of an HTTP connector followed by a Choice element. In this Choice element, a specific HTTP request is made to a system API. The choice is made based on the following query param:

(#[message.inboundProperties.'http.query.params'.brand == 'xxx']

I decided to make a template process API and create a template item in the Exchange (only visible for my account). In this tutorial, I will show how I did it.

Create and Export the Template Project

Make a normal Mule project with the needed elements:

Image title

This Mule project will be used as a template for the other process APIs. Therefore, we need to download the project from Anypoint Studio as a ZIP file. This can be done by right-clicking on the project in the Package Explorer and then choose for Anypoint Studio Project to Mule Deployable Archive (includes Studio metadata).

Image title

Create an Exchange Template

To add the template to Exchange, you need to put the ZIP file you just have created in a place on the internet that's accessible to the public. This can be somewhere on your website, in Dropbox, or in Google Drive. I have made the choice to put on a website.

Image title

In the Exchange, you can add different kinds of items. In this case, we choose a template to add.

Image title

Now, you have to fill in some general details regarding the API.

Image title

At the bottom, you can choose how your template will be provided to the world of Mulesoft developers. Click on Add and you can add a ZIP file.

Image title

You have to fill in a version number and you can choose in which way your template is available. In this case, I have uploaded it to a website and entered the link to the template ZIP. Click on Done, and on the next screen, click on Save new item. Your template is ready to serve!

Use Your Template in Anypoint Studio

Once you have created your template in Exchange, you can use it in Anypoint Studio as a template for a new project.

Image title

The items from the Exchange are loaded and you can now see all public items in the Exchange. In the top-right corner, you can log in with your Anypoint Platform account to see your own templates.

On the right side, you can choose which content should be shown. Choose your company (in my case, NextSense) and you will see your recently added template.

Image title










Click on Open and a new project will be created in Anypoint Studio based on your template.

Template MuleSoft

Opinions expressed by DZone contributors are their own.

Related

  • MuleSoft: Tactical and Strategical Role of an Application Template
  • How To Build AI-Powered Prompt Templates Using the Salesforce Prompt Builder
  • Automated Bug Fixing: From Templates to AI Agents
  • MuleSoft OAuth 2.0 Provider: Password Grant Type

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!