Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 49 additions & 15 deletions en/docs/develop/creating-artifacts/adding-connectors.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,64 @@
# Add Connectors

You can develop configurations with connectors, and deploy the configurations and connectors as composite application archive (CAR) files in WSO2 Micro Integrator.

!!! Info
In addition to the below methods, you can enable a connector by creating a configuration file in the `MI_HOME/repository/deployment/server/synapse-configs/default/imports` directory with the following configurations. Replace the value of the `name` property with the name of your connector, and name the configuration file `{org.wso2.carbon.connector}<CONNECTOR_NAME>.xml` (e.g., `{org.wso2.carbon.connector}salesforce.xml`).
```xml
<import xmlns="http://ws.apache.org/ns/synapse"
name="salesforce"
package="org.wso2.carbon.connector"
status="enabled"/>
```
You can develop configurations with connectors, and deploy the configurations and connectors as composite application archive (CAR) files in WSO2 Integrator: MI.

## Instructions

See the topics given below.

### Import connectors

Follow the steps below to import connectors into Micro Integrator VS Code Extension:
The following methods allow you to import connectors into the project.

#### Method 1: Add connectors from the Connector Store

1. Navigate to the **Project Overview** page.
2. Click on **Add artifact**.

<a href="{{base_path}}/assets/img/develop/create-artifacts/add-artifact-icon.png"><img src="{{base_path}}/assets/img/develop/create-artifacts/add-artifact-icon.png" alt="add artifact" width="80%"></a>

3. Click **+ View More** under **Create an Integration**.
4. Select **Connections** under **Other Artifacts** to open the **Connector Store** form.

<a href="{{base_path}}/assets/img/integrate/connectors/connections-artifact.png"><img src="{{base_path}}/assets/img/integrate/connectors/connections-artifact.png" alt="connections artifact" width="80%"></a>

5. Choose the desired connection. This will ask for the addition of dependencies to the project. Clicking **Yes** will add the connector to the project.

#### Method 2: Import connectors

1. When adding a Connector operation, choose the desired Connector in the **Connector** palette. This will automatically import the selected Connector.
1. Navigate to the mediation flow to which the connector operation should be added.
2. Click the **+** icon in the relevant location of the mediation flow to open the mediator palette.
3. Click on **+ Add Module** and then select the **+ Import Module** option.

2. If you have already downloaded the connector, in the project file structure you can add the connector file into the directory, `<PROJECT_HOME>/src/main/wso2mi/resources/connectors`
<a href="{{base_path}}/assets/img/integrate/connectors/import-connector.gif"><img src="{{base_path}}/assets/img/integrate/connectors/import-connector.gif" alt="import connector" width="80%"></a>

<img src="{{base_path}}/assets/img/develop/adding-connector.png">
!!! Note
The imported connector will be stored in the `<PROJECT_HOME>/src/main/wso2mi/resources/connectors` folder location.

#### Method 3: Import connections

1. Navigate to the **Project Overview** page.
2. Click on **Add artifact**.
3. Click **+ View More** under **Create an Integration**.
4. Select **Connections** under **Other Artifacts** to open the **Connector Store** form.
5. Select the relevant option to either import a connection using an **OpenAPI definition** or a **gRPC (Proto) definition**.

<a href="{{base_path}}/assets/img/integrate/connectors/import-connection.png"><img src="{{base_path}}/assets/img/integrate/connectors/import-connection.png" alt="import connection" width="80%"></a>

### Remove connectors

You can manually remove the connectors added to `<PROJECT_HOME>/src/main/wso2mi/resources/connectors` directory by deleting them.
1. Navigate to a sequence.
2. Click the **+** icon.
3. In the mediator palette, scroll down to the chosen connector.
4. Click on the delete icon to delete the connector from the project.

<a href="{{base_path}}/assets/img/integrate/connectors/delete-connector.png"><img src="{{base_path}}/assets/img/integrate/connectors/delete-connector.png" alt="delete connector" width="30%"></a>

!!! Info
In addition to the above methods, you can enable a connector by creating a configuration file in the `<MI_HOME>/repository/deployment/server/synapse-configs/default/imports` directory with the following configurations. Replace the value of the `name` property with the name of your connector, and name the configuration file `{org.wso2.carbon.connector}<CONNECTOR_NAME>.xml` (for example, `{org.wso2.carbon.connector}salesforce.xml`).
```xml
<import xmlns="http://ws.apache.org/ns/synapse"
name="salesforce"
package="org.wso2.carbon.connector"
status="enabled"/>
```