Skip to content

Commit

Permalink
Merge pull request #1126 from wso2/4.3.0
Browse files Browse the repository at this point in the history
Sync main branch with 4.3.0 branch
  • Loading branch information
DinithiDiaz authored Nov 22, 2024
2 parents 3e3c55b + 98557c6 commit ac4f2a9
Show file tree
Hide file tree
Showing 26 changed files with 261 additions and 182 deletions.
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.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file modified en/docs/assets/img/develop/mi-for-vscode/qsg/design-api.gif
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified en/docs/assets/img/develop/mi-for-vscode/qsg/test-api.gif
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions en/docs/develop/creating-artifacts/creating-registry-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,13 @@ Specify the location to save the registry resource and click **Create**.
<td>Specify where the registry resource should be saved at the time of deployment.</td>
</tr>
</table>

## Edit a registry resource

There may be instances where you need to change the details you entered such as media type, properties, or other information for a registry resource. You can edit such information using the **Edit Registry Metadata** option. To open this edit view, go to the **Registry Explorer** and click on the pen icon of the resource that needs to be updated.

<img src="{{base_path}}/assets/img/integrate/create_artifacts/new_resource/registry-explorer.png" width="300">

Click on the **Update** button after making the necessary changes.

<img src="{{base_path}}/assets/img/integrate/create_artifacts/new_resource/edit-registry.png" width="800">
101 changes: 67 additions & 34 deletions en/docs/get-started/quick-start-guide.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
# Quick Start Guide

Welcome to the WSO2 Micro Integrator Quick Start Guide, your step-by-step tutorial for getting started with WSO2 Micro Integrator. WSO2 MI enables you to build, deploy, and manage integration solutions with ease, providing flexibility and scalability to connect applications, services, and systems.
Welcome to the WSO2 Micro Integrator Quick Start Guide, your step-by-step tutorial for getting started with WSO2 Micro Integrator (MI). WSO2 MI enables you to build, deploy, and manage integration solutions with ease, providing flexibility and scalability to connect applications, services, and systems.

In this guide, you'll learn the basics of setting up and using WSO2 MI to create and deploy a basic integration flow with minimal hassle.

## Prerequisites

The following software and configurations are required to proceed with this tutorial:

- **Java Development Kit (JDK):** Version 11 or 17 is required. Set up a [JDK that is compatible]({{base_path}}/install-and-setup/setup/reference/product-compatibility/#tested-jdks). Ensure the JDK is properly configured in your [system's PATH environment variable](({{base_path}}/install-and-setup/install/installing-mi)).
- **Java Development Kit (JDK):** Version 11 or 17 is required. Set up a [compatible JDK]({{base_path}}/install-and-setup/setup/reference/product-compatibility/#tested-jdks). Ensure the JDK is properly configured in your [system's PATH environment variable]({{base_path}}/install-and-setup/install/installing-mi).

!!! Info
For more information on setting the `JAVA_HOME` environment variable for different operating systems, see the [Install and Setup]({{base_path}}/install-and-setup/install/installing-mi) documentation.

- **Apache Maven:** Ensure [Apache Maven](https://maven.apache.org/download.cgi) is installed (version 3.6.0 onwards) and its path is correctly set within the [system's PATH environment variable](https://maven.apache.org/install.html).
- **Apache Maven:** Ensure <a target="_blank" href="https://maven.apache.org/download.cgi">Apache Maven</a> is installed (version 3.6.0 onwards) and its path is correctly set within the <a target="_blank" href="https://maven.apache.org/install.html">system's PATH environment variable</a>.

!!! info
For more information on installing Apache Maven, see the [Apache Maven documentation](https://maven.apache.org/install.html).
For more information on installing Apache Maven, see the <a target="_blank" href="https://maven.apache.org/install.html">Apache Maven documentation</a>.

- **WSO2 Micro Integrator 4.3.0 Runtime:** Set up WSO2 Micro Integrator 4.3.0 runtime on your machine.
1. Download the Micro Integrator 4.3.0 distribution as a ZIP file from [here](https://github.com/wso2/micro-integrator/releases/download/v4.3.0/wso2mi-4.3.0.zip).
1. Download the Micro Integrator 4.3.0 distribution as a ZIP file from <a target="_blank" href="https://github.com/wso2/micro-integrator/releases/download/v4.3.0/wso2mi-4.3.0.zip">here</a>.
2. Extract the ZIP file. Hereafter, this extracted folder will be referred to as the `<MI_HOME>` folder.
- **Visual Studio Code (VS Code):** with the [Micro Integrator for VS Code](https://marketplace.visualstudio.com/items?itemName=WSO2.micro-integrator) extension installed.

- **Visual Studio Code (VS Code):** with the <a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=WSO2.micro-integrator">Micro Integrator for VS Code</a> extension installed.

After completing the steps above, follow the instructions below to create your first integration solution:
!!! Info
Follow the [Install Micro Integrator for VS Code]({{base_path}}/develop/mi-for-vscode/install-wso2-mi-for-vscode) documentation for a complete installation guide.

After completing the step above, follow the instructions below to create your first integration solution:

## What you'll build

Expand Down Expand Up @@ -56,37 +60,43 @@ To develop the above scenario, let's get started with creating an integration pr

2. Click on the Micro Integrator icon on the Activity Bar of the VS Code editor.

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/mi-vscode-extension.png"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/mi-vscode-extension.png" alt="MI VS Code Extension" width="80%"></a>
<a href="{{base_path}}/assets/img/develop/mi-for-vscode/mi-vscode-extension.png"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/mi-vscode-extension.png" alt="MI VS Code Extension" width="70%"></a>

3. Click **Create New Project** on **Design View**. For more options to create a new integration project, see [Create an Integration Project]({{base_path}}/develop/create-integration-project).

4. In the **Project Creation Form**, enter `HelloWorld` as the **Project Name**.

5. Provide a location under the **Select Project Directory**.

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/new-project.png"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/new-project.png" alt="Create New Project" width="70%"></a>

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/create-new-project.gif"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/create-new-project.gif" alt="Create New Project" width="70%"></a>
6. Click **Create**.

## Step 2 - Create an API

Now the integration project is ready to add an API. In this scenario, the API calls a backend service and responds to the client. First, let's create an API.

1. Go to **Micro Integrator Project Explorer** > **APIs.**

2. Hover over **APIs** and click the **+** icon that appears to open the **Synapse API Artifact** creation form.
2. Hover over **APIs** and click the **+** icon that appears to open the **Create API** form.

3. Enter `HelloWorldAPI` as the API **Name**. The API **Context** field will be automatically populated with the same value.

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/new-api.png"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/new-api.png" alt="Create New API" width="70%"></a>

3. Enter `HelloWorldAPI` as the API **Name** and `hello` as the API **Context**. Once we create the API there will be a default resource created. We will use this resource in this tutorial. See the [Add new resource]({{base_path}}/develop/creating-artifacts/creating-an-api/#add-new-api-resources) documentation to learn how to add a new resource to an API.
4. Click **Create**.

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/create-api.gif"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/create-api.gif" alt="Create New API" width="70%"></a>
Once you create the API, a default resource will be automatically generated. You'll use this resource in this tutorial. To learn how to add a new resource to an API, see the [Add new resource]({{base_path}}/develop/creating-artifacts/creating-an-api/#add-new-api-resources) documentation.

## Step 3 - Design the integration

Now it is time to design your API. This is the underlying logic that executed behind the scenes when an API request is made. In this scenario first we need to call the backend service. For that, you have to add an [endpoint]({{base_path}}/reference/synapse-properties/endpoint-properties).
Now it is time to design your API. This is the underlying logic that is executed behind the scenes when an API request is made. In this scenario first, you need to call the backend service. For that, you have to add an [endpoint]({{base_path}}/reference/synapse-properties/endpoint-properties).

1. Navigate to the **MI Project Explorer** > **Endpoints**.

2. Hover over Endpoints and click the + icon that appears.

3. Select **HTTP Endpoint** from the **Create Endpoint Artifact** interface.
3. Select **HTTP Endpoint** from the **Create Endpoint** interface.

4. Specify the following values to create the HTTP endpoint for the [backend service](#what-youll-build).

Expand Down Expand Up @@ -115,43 +125,66 @@ Now it is time to design your API. This is the underlying logic that executed be
</tr>
</table>

Click **Create**.
5. Click **Create**.

Now you have to add a [Call Mediator]({{base_path}}/reference/mediators/call-mediator) to call the backend service.

5. Open the **Resource View** of the API resource.
6. Open the **Resource View** of the API resource.

6. Click on the **+** icon to open the mediator palette.
1. Go to **MI Project Explorer** > **APIs**.

7. Select **Call Endpoint** mediator under **Mediators** > **Generic**.
2. Under `HelloWorldAPI`, click the default API resource to open the **Resource View** of the API resource.

8. Select the created endpoint for the **Endpoint**.
7. Click on the **+** icon to open the mediator palette.

9. Click **Submit**.
8. Select **Call Endpoint** mediator under **Mediators** > **Generic**.

9. Under **Endpoint**, select the created `HelloWorldEp` endpoint from the dropdown.

10. Click **Submit**.

Now let's add a [Respond Mediator]({{base_path}}/reference/mediators/respond-mediator) to respond the message to the client.

10. Click **+** icon below the call mediator to open the palette.
11. Click on the **+** icon placed just after the Call mediator to open the mediator palette.

11. Select **Respond** mediator under **Mediators** > **Generic**.
12. Select **Respond** mediator under **Mediators** > **Generic**.

12. Click **Submit**.
13. Click **Submit**.

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/design-api.gif"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/design-api.gif" alt="Design API" width="70%"></a>

Following is what you'll see in the **Source View** of the VS Code.

!!! info
You can view the source view by clicking on the **Show Source** (`</>`) icon located in the top right corner of the VS Code.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<api context="/helloworldapi" name="HelloWorldAPI" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET" uri-template="/">
<inSequence>
<call>
<endpoint key="HelloWorldEp"/>
</call>
<respond/>
</inSequence>
<faultSequence>
</faultSequence>
</resource>
</api>
```

## Step 4 - Add MI server to run integration

You need to [configure]({{base_path}}/develop/using-remote-micro-integrator) the downloaded and extracted WSO2 MI server in the Micro Integrator extension installed VS Code to run the integration solution. Let's proceed with the following steps.

1. Click on the **Command Palette** on the top of the VS Code.

2. Type `>` to show the available commands. Alternatively, you can open the command palette in VS Code by entering `Command`+`Shift`+`P` on macOS and `Ctrl`+`Shift`+`P` on Windows.
1. Open the VS Code **Command Palette** by selecting **View** > **Command Palette** from the menu, or by using the shortcut `Command`+`Shift`+`P` on macOS or `Ctrl`+`Shift`+`P` on Windows.

3. Select **MI: Add MI server** from the list of available commands.
2. Select **MI: Add MI server** from the list of available commands.

4. Click **Add MI server** to add a Micro Integrator server.
3. Click **Add MI server** to add a Micro Integrator server.

5. Select the folder where `<MI_HOME>` is located. This will be set as the **current server path**.
4. Select the folder where `<MI_HOME>` is located. This will be set as the **current server path**.

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/configure-mi-server.gif"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/configure-mi-server.gif" alt="Configure MI Server" width="70%"></a>

Expand All @@ -161,17 +194,17 @@ Now that you have developed an integration using the Micro Integrator Visual Stu

Click the **Build and Run** icon located in the top right corner of VS Code.

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/build-and-run.gif"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/build-and-run.gif" alt="Build and run" width="70%"></a>
<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/build-and-run-project.png"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/build-and-run-project.png" alt="Build and run" width="70%"></a>

## Step 6 - Test the integration service

Now, let's test the integration service. For that you can use the inbuilt try-it functionality in the Micro Integrator for VS Code.
Now, let's test the integration service. For that, you can use the inbuilt try-it functionality in the MI for VS Code extension.

1. When you run the integration artifact as in [Step 5](#step-5---run-the-integration-artifacts), **Runtime Services** interface is opened up. You can see all the available services.
When you run the integration artifact as in [Step 5](#step-5-run-the-integration-artifacts), the **Runtime Services** interface is opened up. You can see all the available services.

2. Select the API that you have developed and test the resource.
Select `HelloWorldAPI` that you have developed and test the resource.

<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/test-api.gif"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/test-api.gif" alt="Test API" width="70%"></a>
<a href="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/test-api.gif"><img src="{{base_path}}/assets/img/develop/mi-for-vscode/qsg/test-api.gif" alt="Test API" width="70%"></a>

Congratulations!
Now, you have created your first integration service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ See the instructions on how to [build and run](#build-and-run) this example.
<log level="custom">
<property name="Message Received" expression="//Message"/>
</log>
<call>
<endpoint>
<http uri-template="http://localhost:8280/employees" method="post"/>
</endpoint>
</call>
</inSequence>
</target>
<parameter name="rabbitmq.queue.name">queue1</parameter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ See the instructions on how to [build and run](#build-and-run) this example.
<http method="POST" uri-template="http://localhost:8290/orders"/>
</endpoint>
</call>
<log level="custom">
<log level="full">
<property name="Info" value="Your order has been placed successfully."/>
</log>
<respond/>
Expand Down
Loading

0 comments on commit ac4f2a9

Please sign in to comment.