Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Readme files with the new names #68

Merged
merged 2 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Ballerina Connector SDK for WSO2 Micro Integrator
# WSO2 Micro Integrator Module Generator SDK for Ballerina

## Overview

The Ballerina Connector SDK for the WSO2 Micro Integrator enables the generation of connectors that allow the WSO2 MI to run Ballerina transformations.
The WSO2 Micro Integrator Module Generator SDK for Ballerina enables the generation of modules that allow the WSO2 MI to run Ballerina transformations.
This integration enables you to leverage the powerful transformation capabilities of Ballerina within
poorna2152 marked this conversation as resolved.
Show resolved Hide resolved
the environment of WSO2 Micro Integrator.

## Steps to Create Ballerina Connector
## Steps to Create Module for WSO2 MI from Ballerina

### Pull `mi` Tool
### Pull `mi-module-gen` Tool

First, you need to pull the `mi` tool which is used to create the Ballerina connector.
First, you need to pull the `mi-module-gen` tool which is used to create the WSO2 MI module.

```bash
bal tool pull mi
bal tool pull mi-module-gen
```

### Write Ballerina Transformation
Expand All @@ -31,21 +31,21 @@ public function gpa(xml rawMarks, xml credits) returns xml {

Ballerina function that contains `@mi:ConnectorInfo` annotation maps with a component in Ballerina connector.

### Generate the connector
### Generate the module

Finally, use the `bal mi` command to generate the Ballerina connector for the WSO2 Micro Integrator.
Finally, use the `bal mi-module-gen` command to generate the WSO2 Micro Integrator module from Ballerina project.

```bash
bal mi -i <path_to_ballerina_project>
bal mi-module-gen <path_to_ballerina_project>
```

Above command generates the connector zip in the same location.
Above command generates the module zip in the same location.

To add this generated connector to a WSO2 Micro Integrator project follow the instruction specified [here](https://mi.docs.wso2.com/en/latest/develop/creating-artifacts/adding-connectors/).
To add this generated module to a WSO2 Micro Integrator project follow the instruction specified [here](https://mi.docs.wso2.com/en/latest/develop/creating-artifacts/adding-connectors/).

## Local Build

1. Clone the repository [module-ballerinax-wso2.mi](https://github.com/ballerina-platform/module-ballerinax-wso2.mi.git)
1. Clone the repository [ballerina-module-wso2-mi](https://github.com/wso2-extensions/ballerina-module-wso2-mi.git)

2. Build the compiler plugin and publish locally:

Expand All @@ -65,11 +65,11 @@ To add this generated connector to a WSO2 Micro Integrator project follow the in
./gradlew test
```

## Performance Test Description for WSO2 MI Connector
## Performance Test Description for WSO2 MI Module

### Overview

The performance test for the WSO2 MI connector was conducted using JMeter with 60 users.
The performance test for the WSO2 MI module was conducted using JMeter with 60 users.
The aim was to evaluate the throughput per second for different payload sizes using
three different transformation methods: Ballerina JSON transformation, Ballerina record transformation,
and Java class mediator.
Expand Down
14 changes: 7 additions & 7 deletions examples/price-calculation/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Overview

This sample demonstrates the use of a connector generated by the Ballerina MI SDK to perform price related calculation of an order.
This sample demonstrates the use of a module generated by the Ballerina MI SDK to perform price related calculation of an order.
In this example, the resource `price-calculation` accepts an XML payload containing item details and calculates the total invoice value.
This calculation is done by a function implemented in Ballerina, which processes an input payload of the following format:

Expand All @@ -22,17 +22,17 @@ This would output a result in the following format.

## Steps to Invoke the Sample

Follow these steps to invoke the sample using the connector:
Follow these steps to invoke the sample using the module:

1. The `bal-price-calculation` folder contains the Ballerina code for the connector. Invoke the following command to generate the connector:
1. The `bal-price-calculation` folder contains the Ballerina code for the module. Invoke the following command to generate the module:

```bash
bal mi -i <ballerina-project>
bal mi-module-gen <ballerina-project>
```

2. A ZIP file of the connector will be generated. Add this ZIP file to the MI project inside the folder `mi-price-calculation` following the approach described [here](https://mi.docs.wso2.com/en/latest/develop/creating-artifacts/adding-connectors/).
2. A ZIP file of the module will be generated. Add this ZIP file to the MI project inside the folder `mi-price-calculation` following the approach described [here](https://mi.docs.wso2.com/en/latest/develop/creating-artifacts/adding-connectors/).

3. Once the connector is added, run the MI project.
3. Once the module is added, run the MI project.

4. Send an HTTP POST request to the following resource with a payload as specified:

Expand All @@ -52,7 +52,7 @@ Follow these steps to invoke the sample using the connector:
<name>pencil</name>
<price>12</price>
</item>
</items>`'
</items>'
```

Output:
Expand Down
Loading