14
Creating a Custom Connector in Mule By Achyuta Laxmi

Creating a custom connector in mule

Embed Size (px)

Citation preview

Page 1: Creating a custom connector in mule

Creating a Custom Connector in Mule

By

Achyuta Laxmi

Page 2: Creating a custom connector in mule

Overview

What is Mule Connector? Development Steps Setup to create Connector Determine resource access Choose an authentication mechanism Choose the connector’s data model Add connector @ attribute annotations Code tests Document your connector

Page 3: Creating a custom connector in mule

What is Mule Connector?

A MuleSoft connector is an extension module to the MuleSoft Anypoint Platform, with modules that ease the interconnection of third-party systems and APIs with Mule applications.

Page 5: Creating a custom connector in mule

Setup to create Connector

New Connector : •Create an Anypoint project - •Set up Anypoint Studio and install the connector plugin. 

Existing Connector:•Click File > Import > Anypoint Studio > Anypoint Connector Project from External Location, choose a URL or a .zip file, and complete the wizard to locate and import the project.

Page 6: Creating a custom connector in mule

Determine resource access

Determine resource access - Each resource has a different access method, such as REST, SOAP, FTP, or the Java SDK features.

Page 7: Creating a custom connector in mule

Choose an authentication mechanism

Choose an authentication mechanism - Mule supports OAuth V1 or V2, and username and password authentication (known as connection management), which can be used for protocols such as API Key, SAML, NTLM, Kerberos, or LDAP.

Page 8: Creating a custom connector in mule

Choose the connector’s data model

Choose the connector’s data model - Models can be static Java objects or dynamic objects.

You can use DataSense - Determine what information the target resource expects.

Page 9: Creating a custom connector in mule

Add connector @ attribute annotations

Add connector @ attribute annotations - Create code for your connector containing the @ attributes that Mule uses to designate the important parts of your connector.

Page 10: Creating a custom connector in mule

Code tests

Code tests - Tests can be unit tests, functional tests, and Studio interoperability tests.

While DevKit does not enforce writing tests, you should develop unit and functional tests for your connector as part of the development process. A connector should not be considered production-ready without a proper test suite.

Page 11: Creating a custom connector in mule

Document your connector

Document your connector - 

MuleSoft provides a template that helps you fill in the blanks to create documentation to help your staff and to help others understand the features and use of your connector.

Page 12: Creating a custom connector in mule

Package your connector

Package your connector

When your connector is ready for release to a broad audience, take the following additional steps to ensure user success:

•Create a license agreement for your connector.•Develop end-to-end walkthroughs to illustrate performing common use cases with your connector.•Create a compressed file for distribution.

Page 13: Creating a custom connector in mule

Conclusion 

MuleSoft’s program certifies and publishes third party connectors to be distributed through Anypoint Exchange.

References:

https://docs.mulesoft.com/anypoint-connector-devkit/v/3.7/

Page 14: Creating a custom connector in mule

Thank you