Page History
This section describes the best practices and recommendations you can follow when implementing and using connectors with WSO2 ESB.
Following are some of the best practices you can adhere to when using connectors:
Use secure vault to secure user credentials used in the
init
method. For more information on how to use secure vault, see Working with Passwords.To seamlessly refresh tokens, use a registry location that is visible to all esb cluster members. For example, config registry mounted. Here the refresh token value should be passed as a connector parameter. For detailed information on how this can be done for the relevant WSO2 ESB connectors, see the documentation for the relevant connector.
Use
$ctx
instead of theget-property()
function because$ctx
provides better performance thanget-property()
.
Following are some of the best practices you can adhere to when implementing connectors:
Always use lower case letters to name a connector. For example, activecampaign.
Make sure that the parameter values are atomic to the calling api. For example, if the api expects the following request to insert the
firstname
andlastname
for a user, you need to provide thefirstname
andlastname
as separate parameters when implementing the connector.Code Block title Request "user": { "firstname" : "someuser", "lastname" : "someuser", "groups" : [ "jira-users", "my-custom-group" ], "active" : true, "email" : "[email protected]", "fullname" : "User 1"}
...