In my previous blog I wrote about the ‘problems’ I encountered when starting with HCI. I hope that you could bypass those problems, and otherwise found the solution for it!
In this blog I would like to show how to create a simple integration flow, iFlow.

In this example I will show you how to get information out of a SuccessFactors instance, how to send this to a public web service, and how to process the results. I will show you the current weather for a city, which ZIP code we will collect out of SuccessFactors and sent that via email!

The following prerequisite are needed, and will not be further discussed in this post:

  • a HCI tenant
  • a keystore with SuccessFactors certificate
  • an artifact with  SuccessFactors credentials
  • a keystore with an email certificate
  • an artifact with email credentials

Configuring the sender

01-Overview.pngThis is what we are going to create.

First, we create a new integration project in Eclipse and configure the sender. I named the sender SuccessFactors and choose for ‘Basic Authentication’ in properties. The sender channel will be configured like this:

02-AdapterType.png

03-SenderChannel.png
These are the connection settings for the SuccessFactors channel.
Credential Name * is the name of the credentials you deployed earlier to your tenant.

Now we are going to set the operation details. Click on Model Operations and fill out your SF credentials. Because we want the ZIP code of a person we select the entity ‘User’, and go for zipCode.

04-ModelOperations.png

05-ModelOperations2.png

In the demo environment we are using there are a lot of users, with a lot of zip codes. We want to use only one, so we are going to set a filter. I know the ID of the user I want the zip code from is USR-4, so we create a filter like:

06-ModelOperations3.png

That is almost it for configuring the sender channel. We only need to fill in the Scheduler tab. For testing purposes I always choose ‘Run Once’.

Create the WSDL file

So now we have set up the sender from which we will get our input. Next step is to create a WSDL file from the web service. There are several ways to do that, here is what I did.

Search the WSDL page for the service you want to use (in this example: http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl ) and save the page. It will save the page as Weather.asmx.xml. You can select this file and drag it to your Eclipse. Make sure you drop the file in the “src.main.resources.wsdl” map. Now rename the file to Weather.wsdl and double click the file to see the outcome.
We are going to use this file in the mapping and in the SOAP call later on.

Configure the mapping

Now it is time to add some mapping to our iFlow. Create a new message mapping and add it to your flow. When we configured the sender channel the model operation was saved as a file (probably something like UserEntityquerySync0.xsd), which is also in your resources.wsdl map. Choose this file as the source element.

As for the output element, you can select the wsdl file we created earlier and select the global element of your choosing. In this example we go with GetCityWeatherByZip.

07- MessageMapping.png

After setting the source and target go to the Definition tab and map the zipCode we got from SuccessFactors to the ZIP the web service requires.

08-MessageMapping.png

Calling the web service

After we managed to get the zip code form SuccessFactors and map it to the input the web service demands, we can call the web service. For that you need to add a service call to your flow.

09-RequestReply.png

The Request-Reply box is added to your flow and from here out you can add a message flow to a Receiver.

10-RequestReply.png

To configure the channel, double click the message flow and choose SOAP as Adapter Type.

11-SoapChannel.png

On the tab ‘Adapter Specific’ you can enter the details of the SOAP service you want to call. The address is the same address from earlier in this blog, where we downloaded the WSDL. The URL to WSDL can be found by clicking on ‘Browse’, and selecting the WSDL in the resources.wsdl map.

12-SoapChannel.png

13-SoapChannel.png

In this example we go with GetCityWeatherByZip.

Create the converter

To show you how to use the converter we will use a XML to CSV converter in our iFlow.
Select the converter from your pallet and drag it to your flow. Right mouse click on the box and go for ‘Switch to XML to CSV converter’.

14-XMLconverter.png

15-XMLconverter.png

Now we need to point the converter to the incoming flow and tell it how to process the data. Go to the properties tab of the converter and define the parameters.

16-XMLconverter.png

Send the outcome by mail

If everything is setup in the correct way, which we will see in a moment, the outcome will be the weather information of a city. We want to send this information via email. For that we need to create a new receiver and go for the Mail adapter.

17-MailAdapter.png

Under ‘General’ you can configure your mail settings. In the address field you can fill in your smtp-server, and the Credential Name is the name of the artifact you deployed earlier.

If you want to have the data showed in the message body you can enter “${in.body}” in the mail body.

18-MailAdapter.png

If you want an attachment with the data you can set it up by adding the parameters for an attachment.

19-MailAdapter.png

Run it

And now your iFlow should look something like this:

01-Overview.png

Deploy your Integration Content and watch the Message Monitoring of your tenant to see if it deployed correct.

20-RunTest.png

If instead of COMPLETED you see FAILED, there is something wrong (you might had figured that out already). This is a great moment to use the Trace feature (if you don’t know how to activate your tracing, check my previous blog here).

21-RunTest.png

Your iFlow will be decorated with envelopes. These envelopes can be selected and the content can be seen in the ‘Properties’ tab. This is a great way to see what content is moved from one ‘box’ to another and to see where it goes wrong.

22-RunTest.png

That’s all! You now created a simple integration flow using several adapters, mappings and converters. I hope this blog answered more questions than raised. If not, please do not hesitate to contact me or leave a comment below.

Bob van Rooij

Blog 1: Starting with Hana Cloud Integration? Keep this in mind!
Blog 2: Starting with Hana Cloud Integration? Create a simple integration flow (iFlow)!

Blog 3: Deep dive in Hana Cloud Integration.

Blog 4: Hana Cloud Integration and SuccessFactors Integration Center

Blog 5: Hana Cloud Integration in comparison to Dell’s Boomi.


To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Sunil Mavachee

    A great beginning for the people who are expected to start working with HCI.

    Appreciate your effort for preparing and sharing such info.


    Keep it up.!


    Regards.

    (0) 
    1. B. Van Rooij Post author

      Thank you for your kind words Sunil! I will try to make a blog like this every month. I hope people will get something out of it.

      Regards.

      (0) 
  2. Rathnakar reddy

    Hi,


    A great beginning for the people who want to Start working on HCI

    Appreciate your effort for preparing this such info and Scrn shots.


    Thanks

    Rathnakar.



    (0) 

Leave a Reply