In Part 1 of this series we created the Camel component. Now we need to wrap that component in a HCI adapter project. We will create the echo adapter using the echo component created in part 1. The outcome of this part is a HCI adapter deployed on a tenant.
Step - Create the adapter project
The first thing todo is to create the adapter project. For this you will need to open Eclipse and select File > New > Other.. Expand the SAP HANA Cloud Integration section and select Adapter Project
fill in required fields and clickFinish
Step - Generate metadata
At this step you should have a project looking similar to:
The project itself contains a few empty folders and a metadata.txt file. Next we want to copy the echo-*.jar from the echo camel component project into the component folder of the echo adapter project. Once done your adapter project should look like:
The next action is to generate the component metadata. You can read all about what component metadata is in the online help. But it is basically the place where you setup the info required by the editor in design time.
Right click on the echo-adapter project and select Generate Component Metadata
Next, right click on the echo-adapter project and select Execute Checks. The output of this step should be:
Step - Modify metadata.xml
Expand the metadata folder and you will see a newly generate file named metadata.xml. Open this file. Notice that the generation tool inspected our echo component and generated appropriate xml content from it. What we will do now is modify it a bit by removing unnecessary elements.
There are only two parameters we want users of our adapter to specify: first part URI and delay. We can remove the others as the adapter will use default values. Once done your metadata.xml should look like:
:!: To ensure all is good run the Execute Checks again.
Step - Deploy
So at last we can deploy our adapter to a HCI tenant. Right click on the echo-adapter project and select Deploy Adapter Project
In the Deploy Integration Content dialog select the Tenant you want to deploy to and click OK
Where after you should see the confirmation as below
Test - Validate successful deployment
Double click on the tenant in the Node Explorer view and then open the Deployed Artifacts view. You might need to refresh the view by clicking on the yellow arrows and if the deployment was a success the adapter will display as follows.
Also, lets ensure it started on the worker node by first selecting the node in the Node Explorer and then opening the Component Status View
In Part 2 we have created a HCI adapter and deployed it to a HCI tenant. At this point the echo adapter is available for use. In the final part we will create an integration flow to use the adapter and ensure the endpoints are working.