Using the Embedded WSO2 Integrator: MI¶ WSO2 Integration Studio contains an embedded WSO2 Integrator: MI 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 WSO2 Integrator: MI using a single click. Select the composite application in the project explorer. Click the icon in the menu palette to open the Run As dialog box. Select Run on WSO2 Integrator: MI and click OK. Select the artifacts from the composite application that you want to deploy. Click Finish. The artifacts will be deployed in the WSO2 Integrator: MI and the server will start. See the startup log in the Console tab: If you find errors in your mediation sequence, use the debugging features to troubleshoot. View deployed endpoints in the (embedded) server¶ Use the Runtime Services tab in WSO2 Integration Studio to view the endpoint URLs of the artifacts deployed in the embedded WSO2 Integrator: MI. When you deploy the artifacts and start the embedded WSO2 Integrator: MI, the Console tab prints the server startup logs and the Runtime Services 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 Runtime Services. Update (embedded) server configurations 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 WSO2 Integrator: MI Configuration dialog box shown below. Note You can also paramterize configurations as environment variables and later inject environment variables to the embedded WSO2 Integrator: MI. In the upper section, update the server configuration file (deployment.toml file). In the lower section, add any required 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. Open the Embedded WSO2 Integrator: MI Configuration dialog box. Update the static secrets in the deployment.toml file as explained in encrypting server secrets. 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 WSO2 Integrator: MI 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. Select the composite application that contains your artifacts. Click the icon in the menu palette. Injecting environment variables to embedded WSO2 Integrator: MI¶ WSO2 Integrator: MI supports environment variables for server configurations as well as synapse configurations (integration artifacts). Note To be able to dynamically inject parameters to the embedded WSO2 Integrator: MI, you must first define the relevant configurations as environment variables. See the following topics for instructions: Environment variables for server Configurations Environment variables for synapse configurations Follow the steps given below. Deploy and run the artifacts in the embedded WSO2 Integrator: MI. Tip Note that you need to run the embedded WSO2 Integrator: MI at least once before proceeding to specify environment variables. You can now go to Run -> Run Configurations in the upper menu bar of your computer: In the Run Configurations dialog box that opens, select WSO2 Integrator: MI Server 1.2.0 that is listed under Generic Server in the navigator: In the Server tab, select WSO2 Integrator: MI 1.2.0 from the list if it is not already selected. Go to the Environment tab and click New to add an environment variable: 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 WSO2 Integrator: MI should be specified as follows: [server] offset="$env{offset}" Click Apply to apply the new environment variable.