WSO2 Internship - III

Disclaimer !!!
In this series of posts, I provide some key points and Ideas that I report to my university during my internship. I arrange these posts as a set of reports, where each report provides the summary of tasks I have done during those four weeks of my training and the experience I gained during that period.#### Disclaimer This post is the third post in the series of posts about my internship @WSO2.

These four weeks are I was deep into the HL7 Monitoring Solution project. First, as a continuation to last week, I go on with the design review for the new HL7 Monitoring Solution for DAS, and by the end of the week, I get into the project. As the first part of development, I start working with modifying Existing HL7 Data publishers. For this, I have first look at two repositories Carbon-Analytics and Carbon-Analytics-Common of wso2. Then get a basic idea of how to create an event stream service.

Then as the next step, I build a simple carbon component to know how to create an OSGI component using wso2 carbon. I provide further details of how to make a first Carbon Component in the references Sections. Just go through it If you like to deal with it. Then I got into the project; first, I cloned a carbon-meditation repository where HL7DataPublisher existed and started modifying the HL7EventPublisher Class, which used to publish the data from ESB to DAS.

Then By the end of the 4th Week, I was able to publish the data from ESB to DAS also added up the ACK publishing, which is not previously present in HL7DataPublisher. And at the end of the 4th week, I started looking at designing the HL7 Dashboard, spark queries to get results for HL7 Dashboard, and other related stuff to build a custom HL7 Dashboard.

Problems Encountered

Adding HL7 Transport to ESB.

Problem Description: For this project, I need to deal with SNAPSHOT versions of ESB and Carbon-mediation. Unlike the regular version, here, we need to install the HL7 Feature manually. In the actual release, for a release version, we can add features by adding the relevant repository, whether local or online.

So I couldn’t find how to attach the feature, and I tried something based on my experiences. Like adding patches to installed old version HL7 Feature, this was wrong because it won’t accept the current feature.

Then I locally install HL7 Feature by building the HL7 component and HL7 feature, which will store in local maven /.m2/repositories/. and get the local p2 repo using carbon-features-repository. and Using p2 repo install HL7 feature. This procedure was a pretty long and arduous path. During the end-release, the company will generally carry out this process.

Problem Solutions: Build the component and feature, and Just extract the zip in feature part and copy all files to /repository/components/dropins/ this will add the relevant jar files to /repository/components/plugins/ when we restart the ESB.

Creating first Carbon Component

Since I have already described the issues faced in a separate blog post; I didn’t share it here. Go through that for references 1. It was basically with dependencies and repository definition in the pom.xml file.

Things I Learned

Working with EventStreamService

Just before getting into what it is, just think about a JSON file; it contains a set of details which identifiers, here a stream is defined in JSON format, thus we can pass a collection of data belongs to one object using JSON. That concept is the basis for the stream (it was not the exact definition, just think in that way for ease of understanding), so we are passing a set of data using a formatted JSON file through the publishing service of HL7EventPublisher class. The previous API creates an event with the contents/attributes relevant to the JSON file and publishes using datapublisher class. As a result of this change of new API, we are creating a eventstreamservice and publish Instead.

Working with Tenant ID

Basically, for every PrivilagedCarbonContext there exists a tenant Id, based on the application, it can be predefined or received from the parent. For HL7 it is defined from the parent, so we need to get the parent tenant id and use it for the child. We can’t manually hard code or set the values for tenant ID.

Events I Participated

I participated in Smart@ss quiz under WildBoars Team 1, with Janaka, Anjana, and the other 7 People of WSO2. It was quite a challenging quiz. It contains five rounds with questions from current affairs, sports, entertainment, countries, foods. We got 5 out of 8. Anyway, I enjoyed the events. :smiley: :relaxed:

My Blog Links :

  1. Installing a Developing Feature

  2. Packaging Artifacts as CApp

References

  1. http://wso2.com/library/tutorials/2014/03/how-to-write-a-wso2-carbon-component/
  2. http://alokayasoya.blogspot.com/2015/02/writing-first-carbon-component.html
  3. http://blog.kasunbg.org/2013/04/generating-wso2-p2-repo-for-features.html