Ballerina is an open source general purpose programming language and platform designed by WSO2. It is an easy to write programming language that just works, and suitable for cloud-era application programmers.

What is debugging?

Debugging could be known as the process of detecting and removing of existing and potential errors (also called as “bugs”) in a software code that can cause it to behave unexpectedly or crash. To prevent incorrect operation of a software or system, debugging is used to find and resolve the bugs or defects.

Starting a Remote Debug Session

In this article, I will walkthrough on how to remote debug a simple Hello World program…


esb.gmfgen

Let’s move on to esb.gmfgen modeling

  1. Go to the plugin “org.wso2.developerstudio.eclipse.gmf.esb” in the project explorer. Double click on it. Select model → esb.gen

2. Right click on esb.gmfgen and click on “Generate diagram code”


esb.gmfmap

Let’s move on to esb.gmfmap modeling.

  1. Go to the plugin “org.wso2.developerstudio.eclipse.gmf.esb” in the project explorer. Double click on it. Select model → esb.gmfmap.

2. Double click on “esb.gmfmap. Select platform → Mapping → Top Node Reference<server:EsbServer/EsbServer> → Node Mapping<EsbServer/EsbServer> → Child Reference<children:ProxyService/ProxyService> → Node Mapping<ProxyService/ProxyService> → Child Reference<container:ProxyServiceContainer/ProxyServiceContainer> → Node Mapping<ProxyServiceContainer/ProxyServiceContainer> → Child Reference<sequenceAndEndpointContainer:ProxyServiceSequenceAndEndpointContainer/ProxyServiceSequenceAndEndpointContainer> → Node Mapping<ProxyServiceSequenceAndEndpointContainer/ProxyServiceSequenceAndEndpointContainer> → Child Reference<mediatorFlow:MediatorFlow/MediatorFlow> → Node Mapping<MediatorFlow/MediatorFlow>


esb.gmftool

Let’s move on to esb.gmftool modeling.

  1. Go to the plugin “org.wso2.developerstudio.eclipse.gmf.esb” in the project explorer. Double click on it. Select model → esb.gmftool.

2. Double click on “esb.gmftool”. Select platform → Tool Registry → Pallete esbPalette → Tool Group Mediators.


esb.gmfgraph

Let’s move on to esb.gmfgraph modeling. In esb.gmfgraph we have to consider the following three modeling

  • Figure Descriptor
  • Node
  • Label
  1. Go to the plugin “org.wso2.developerstudio.eclipse.gmf.esb” in the project explorer. Double click on it. Select model → esb.gmfgraph.

2. Double click on “esb.gmfgraph”. Select platform → Canvas esb → Figure Gallery Default.


esb.genmodel

Let’s move to “Model code generation” and “Edit code generation”. For Model and Edit code generation we need to use esb.genmodel.

  1. Go to the plugin “org.wso2.developerstudio.eclipse.gmf.esb” in the project explorer. Double click on it. Select model → esb.genmodel

2. Right click on esb.genmodel and click Reload…


A mediator can be added to WSO2 EI Tooling by configuring the following GMF models

  1. esb.ecore
  2. esb.genmodel
  3. esb.gmfgraph
  4. esb.gmftool
  5. esb.gmfmap
  6. esb.gmfgen

This article is a step by step guide to developing the GMF model to add a new mediator in WSO2 EI Tooling.

It is always advisable to take an already developed mediator as a reference(log mediator/property mediator) and start to develop your own mediator. Also, it is recommended to save all the changes instantly to avoid issues.

Let’s have a look at the Log Mediator.

Following screenshot depicts Log mediator ecore model.

We can see the properties view consists…

Praveen Nadarajah

Software Engineer at WSO2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store