Mulesoft Connectors

May we present to you – Mulesoft Connectors

You probably remember our previous article on Mulesoft in which we first introduced this technology (if not, please check out introducing to you Mulesoft)

This article is about more specified area, namely: Mulesoft Connectors, which are, without a doubt, the main building block of all Mulesoft applications. 

For starters, you are going to need some rough information on the key elements of Mulesoft’s message and event processing.  

Each application consists of core components, connectors and modules which can be grouped into two scopes – Flows and Subflows. Their task is to divide applications into functional modules. An application might technically consist of one flow only, however, in most cases it is composed of multiple ones. Each scope has its individual error-handling system.

Nothing could be ever done without the core components which play the most significant role in the Mule Runtime functionality. Operations such as asynchronous processing, setting payloads and transforming data, logging are all handled thanks to them. 

Modules add flexibility to applications. They implement features that are closer to traditional coding. Java Module is one of the most recognizable examples here. Some of the modules might also be used for advanced XML and JSON processing.

In AnypointStudio all building blocks can be found in Mule Palette.

Well, as you surely know, any other tool would require specific connectors (e.g. Database Connector, File Connector) which would allow us to integrate the data with external third parties APIs (such as SAP). Mulesoft provides another integrational element which makes the whole process so much easier. 

All Mulesoft users are provided with various connectors throughout the Anypoint Exchange. Mulesoft Organization allows you to create custom connectors as well, and share them with other users. In that way you are able to form the API layers (that have already been described in the previous article – Experience, Process and System APIs).

Any examples? 

All provided connectors could facilitate integration with services and systems such as Salesforce, SAP and Twilio, as well as with IT technologies like MongoDB and Kafka. Some of them may even be used as integration tools with office software like Google Sheets. This, among other useful features, makes it possible to insert data directly into spreadsheets.

MongoDB and Twilio Connectors in Exchange:

  1. Solution number one: through graphic interface
  • First, localize the Mule Palette window, and click on “Search in Exchange.”
  • Type the name of the connector (for illustrative purposes let us pick ‘twilio’) [In order to search for your organization’s connectors you have to login to your Anypoint Platform account first.]
  • Pick the connector of your choice, and click “Add’’. At this point you should be able to select a specific version of the connector.
  • Click “Finish.”

And that’s it, all done!

  1. Solution number two: through building automation tool (eg. Maven) dependency.
  • Again, select a connector in “Exchange” and pick the desired version. Then, click on the Dependency Snippets button.
  • Choose your building automation tool for the correct entrance (in this case we are going to use Maven).
  • For Maven, open the project’s pom.xml file and add dependency inside the <dependencies> marker.

[That brings us to the same point as by using the graphical method]

So far, we have already added the Twilio Connector to our Palette.

Let’s click on it to see what happens. 

Here we can see a list of around 200 operations which this connector provides. 

In this case we wish to implement the Create Message connector. It can be added to the flow simply by dragging and dropping it in the box.

But before we are going to be able to use it, it has to be configured. In order to do that, you are going to need to paste the Account Sid (String Identifier), and then proceed to the connector configuration.

Voilà! – the connector is ready to use.



Check out other articles in the technology bites category

Discover tips on how to make better use of technology in projects

Do you have any questions?