Skip to content

Using the Embedded Micro Integrator

WSO2 Integration Studio contains an embedded Micro Integrator instance, which you can use for testing your integration solutions during the development process.

Deploy and run artifacts in the (embedded) server

Once you have the integration artifacts packaged in a composite application, you can deploy and run them in the embedded Micro Integrator using a single click.

  1. Select the composite application in the project explorer.
  2. Click the icon in the menu palette to open the Run As dialog box.

  3. Select Run on Micro Integrator and click OK.

  4. Select the artifacts from the composite application that you want to deploy.

  5. Click Finish. The artifacts will be deployed in the WSO2 Micro Integrator and the server will start. See the startup log in the Console tab:

  6. If you find errors in your mediation sequence, use the debugging features to troubleshoot.

View deployed endpoints in the (embedded) server

Use the Deployed Endpoints tab in WSO2 Integration Studio to view the endpoint URLs of the artifacts deployed in the embedded Micro Integrator.

When you deploy tha artifacts and start the embedded Micro Integrator, the Console tab prints the server startup logs and the Deployed Endpoints tab will open as shown below.

If you have closed the tab and you want to open it again, go to Window -> Show View -> Other and select Deployed Endpoints.

Update (embedded) server configs and libraries

For some integrations, it is necessary to update the server configurations. For example, if you are integrating with an external broker, you need to update broker connection details and also add the broker's connection JARs to the server's /lib folder.

Click the icon to open the Embedded Micro Integrator Configuration dialog box shown below.

Note

You can also paramterize configurations as environment variables and later inject environment variables to the embedded Micro Integrator.

In the upper section, update the server configuration file (deployment.toml file). In the lower section, add any requried third-party libraries to the /lib folder of the server.

Encrypt static (embedded) server secrets

If you have secrets in the deployment.toml file, you can encrypt them using the Cipher Tool.

  1. Open the Embedded Micro Integrator Configuration dialog box.
  2. Update the static secrets in the deployment.toml file as explained in encrypting server secrets.
  3. Click Encrypt Secrets.

This will run the Cipher Tool internally and encrypt the secrets. The plain-text values you entered are now replaced with the encrypted values.

Redeploy integration artifacts

Hot deployment is enabled in the Micro Integrator by default. This allows you to redeploy artifacts without restarting the server. However, if you have applied changes to the server configurations and libraries, the server will restart.

  1. Select the composite application that contains your artifacts.
  2. Click the icon in the menu palette.

Injecting environment variables to embedded Micro Integrator

WSO2 Micro Integrator supports environment variables for server configurations as well as synapse configurations (integration artifacts).

Note

To be able to dynamically inject parameters to the embedded Micro Integrator, you must first define the relevant configurations as environment variables. See the following topics for instructions:

Follow the steps given below.

  1. Deploy and run the artifacts in the embedded Micro Integrator.

    Tip

    Note that you need to run the embedded Micro Integrator at least once before proceeding to specify environment variables.

  2. You can now go to Run -> Run Configurations in the upper menu bar of your computer:

    run configurations menu

  3. In the Run Configurations dialog box that opens, select Micro Integrator Server 1.2.0 that is listed under Generic Server in the navigator:

    run configurations dialog box

  4. In the Server tab, select Micro Integrator 1.2.0 from the list if it is not already selected.

  5. Go to the Environment tab and click New to add an environment variable:

    run configurations environments

  6. Enter the variable name and value as a key-value pair and click OK. In this example, let's use the server offset:

    Tip

    The offset parameter in the deployment.toml file of the embedded Micro Integrator should be specified as follows:

    [server]
    offset="$env{offset}"

    run configurations environments

  7. Click Apply to apply the new environment variable.

    run configurations environments

Top