Onepoint is working on multiple client projects with the Boomi Integration platform. This low code platform is excellent for integrating data and applications in enterprises. It provides a graphical user interface which allows developers to create complex data-driven processes and workflows.
This is how a simple Boomi workflow looks like:
Boomi uses so-called "connectors" to connect to REST services, databases, CRM systems, and cloud services like S3. These "connectors" are a central piece of the integration platform and are typically provided by the Boomi integration platform out of the box.
Yet they can be extended if you need to integrate with platforms or use technologies that are not supported out of the box.
We decided to look at how you can create custom connectors with Boomi, since we have some very specific requirements that are currently not covered by the Boomi platform.
The custom connector we will present in this blog is a very simple connector, which we built for learning purposes, and gives a good insight into how Boomi connectors work under the hood.
The connector has to be written in Java programming (even though it could also be developed in any JVM language).
We have chosen Maven (a Java build tool) for building the project. You can also use Gradle if you want, but we found that the project creation was easier with Maven, which allows us to use project archetypes.
What Our Example Connector will Do
The connector we are describing here is going to support two operations:
- GET: is going to receive a JSON file, convert it to YAML and store it in a specific S3 bucket
- EXECUTE: read an ID and fetch a YAML or JSON file with that ID from an S3 bucket
Creating a Boomi Connector From Scratch
If you have Maven properly configured on your system, you can simply create a Boomi connector project by running this command on your computer:
This command will ask you a couple of questions about the project identifiers and will generate a skeleton project that you can use to develop your Boomi connector.
Before you run this command, make sure that you change your Maven settings to point to the Boomi repository. So you need to go the conf folder of your Maven installation and change the settings file to include this code:
Anatomy of a Boomi Connector Project
This command will generate a project with a typical structure for Maven projects:
In the resources folder, it will generate two very important files with the connector configuration:
|connector-config.xml||Contains the name of the connector class name|
|connector-descriptor.xml||Contains the connector parameters which you can use via the Boomi user interface|
Here is an example of a connector-config.xml file:
And here is a a connector-descriptor.xml example:
Then you need to implement a class which extends from com.boomi.connector.util.BaseConnector and implements the connector's operations and a "Browser" method which allows Boomi to browse the schema of the component. In our case, we have a "GET" and "EXECUTE" operation, so the implementation looks more or less like this:
If you want to see the details of our Example Connector, you can download the sources of this small project here:
Installing the Connector
After having written the connector, you can build it on the command line with this line
mvn clean package
This will produce the binary *.car file, which you will need for deployment.
The connector can then be created via the Boomi user interface by going to Settings -> Developer.
Initially, you will need to add a "Connector Group":
And then, you can add your connector using the "Add Connector" button:
After having done this, you have to add a connector version. At this stage you will upload the compiled *.car file and the descriptor file:
This last step will upload the connector, which will initially have "PRIVATE" visibility, meaning it is only available to you. Later on, there is always the possibility to make this connector "PUBLIC" (there is a Boomi review process, which can also be triggered via the Boomi user interface).
Using the Connector
If all the connector files were successfully uploaded, you can now use to connector in a Boomi process. Here is our example connector in action in the Boomi Build user interface:
Boomi is not only a rich and user-friendly integration low code platform. It is also easily extensible, allowing developers to extend it via a well defined and documented API. Boomi can therefore be used in very specific or edge case scenarios.