Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 the getProperty get-property() function because $ctx provides better performance than getProperty get-property().

Following are some of the best practices you can adhere to when implementing connectors:

  • Always use lowercase 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 and lastname for a user, you need to provide the firstname and lastname as separate parameters when implementing the connector.

    Code Block
    titleRequest
    "user": {
           "firstname" : "someuser",
           "lastname" : "someuser",
           "groups" : [ "jira-users", "my-custom-group" ],
           "active" : true,
           "email" : "user1@example.com",
           "fullname" : "User 1"}

...

For answers to some of the common questions regarding implementing a connector, see the FAQ FAQs section.