Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Paul_todd
Product and Topic Expert
Product and Topic Expert


  Over this series of posts we will use the HANA Cloud Integration (HCI) will show how it is possible to build a very simple process flow to get data from REST service, process it into an email and send it to your to your gmail account every morning so you can know what the weather is going to be like that day.


In order to build the iFlow you will need the following:




  1. a task to get the data from a remote server,

  2. a task to process the response,

  3. a task to deliver the parsed output to a receiver.

  4. a receiver is also required. In this case the result will be sent as an email message to a Gmail account, the subject, body and attachment will all be generated by HCI in the iFlow.



For the weather data the weather will be obtained openweathermap.org API. This service that takes a town or city name and returns latest weather for that town or city. More about the API can be found on their website http://openweathermap.org/api. The API seems very inconsistent when requesting current weather without an API key. If the service is disabled then a 404 error will be received. In this case or even without it, you should be able to request a free API key from http://openweathermap.org/appid#get  where the id can be appended to the city name in the following "&APPID={APIKEY}". Your query parameters will look like the following q=walldorf,de&APPID=1122334455.


 


Lets begin


We begin by assuming you have an HCI tenant and locally installed Eclipse Luna and the HANA HCI tooling from https://tools.hana.ondemand.com/#hci. This tooling allows you to connect to the HCI Tenant in order to deploy and manage operations and integration flows on that tenant.



Startup Eclipse, create a new workspace and connect to your tenant. If not already done so, goto the Preferences, expand the SAP HANA Cloud Integration node and select the "Operations Server” node. Enter your tenant URL, SCN username and password. Test the connections and click OK. Eclipse and the HCI Tooling are now connected to the HCI server.




 


Next, create a new Integration project:




It is important to choose an Integration Project and not an Integration Flow. The project will be created with a default iFlow that will then be customized.



Click the “Next" button to continue.





The project will be called “WeatherReport” and it be “Integration Flow” project with a node type of “IFLMAP”. It is important to ensure the Node Type is “IFLMAP” rather than IFL.



Click “Next” to go to the default integration flow.





For this project a Point-to-Point iFlow will be created and put into the integration flow folder in the project.



Now is a good time to click “Finish” and have the project generate artifacts into the workspace





Since the iFlow that was created by default is not what we require, delete the components so that a blank Process Integration box is left.


This stage is to test that the empty Weather Report integration can be deployed successfully. This will verify that project is correctly configured and the iFlow can be deployed and executed on the tenant.





Save the iFlow and then right right click outside the Integration Flow box and choose the “Deploy Integration” option from the context menu.





Click “OK” and the empty iFlow will be deployed...





As suggested, change to the “Integration Operations” perspective and double click on the node with the tenant name in the tree on the right. This will open a new view with the operations status for the tenant.





Select the "Deployed Artifacts" tab and verify that the iFlow has indeed been deployed. If there are any errors then refresh the “Tasks View” view and examine the error by selecting the error. The a later posting in the series I plan to deal with what to do when things do not work as expected.



In the next step the iFlow will be customized to create our WeatherReport iFlow.



3 Comments