Tuesday 17 May 2016

SAP HANA Cloud Integration (HCI) - A complementary offering to SAP Process Orchestration (PO)


A lot of ambiguity is seen wrt. usage of SAP Process Orchestration and SAP HCI Even heard that HCI is a replacement of PI/PO which is not TRUE. SAP HANA Cloud Integration (HCI) is public since 2013. And we get from time to time, questions on the difference between SAP HANA Cloud Integration and SAP Process Integration/Orchestration. Let us understand on both the offerings:

SAP Process Orchestration provides on-premise middleware platform to design, model, execute and monitor business processes by ensuring connectivity to multiple different business / technical systems and applications (SAP and non-SAP). Along with the options of creating human and/or system centric processes, it offers the following products under one umbrella:

SAP Process Integration (including B2B Add-On and Connectivity Add-On)
SAP Business Process Management
SAP Business Rules Management

SAP HANA Cloud Integration (HCI) is a SAP’s strategic secure cloud-based integration platform with a strong focus on process and data integration across domains (SAP Financial Services Network (FSN), SuccessFactors, Cloud for Customers, Ariba, Business by Design, Travel On Demand etc.). It provides you the Process Integration (HCI-PI) and Data Integration (HCI-DS) capabilities.

HCI enables you to connect your cloud applications quickly and seamlessly to other SAP and non-SAP applications (on-cloud or on-premise) without extensive coding. This integration as a service solution from SAP can help you integrate your business processes and data in a secure and reliable environment. Also, another important point to understand is that HCI is not SAP Process Integration on cloud. It is a new product that runs on SAP HANA Cloud Platform. HCI is designated as IPaaS -- Integration Platform as a Service.

As both the products are from SAP, SAP has provided a way to re-use your existing investments on SAP Process Orchestration wrt. message mappings that can be readily used in SAP HANA Cloud Integration. Both the solutions are complementary and lot of factors decide on which solution to be used:

1. Cloud to cloud integration. There are many use cases that derive integration from one cloud solution to another. E.g. SuccessFactors to SHL or PeopleAnswers or Workforce integration. These cloud solutions can be SAP or non-SAP. Right choice of the solution for this use case would be SAP HANA Cloud Integration as there is no on-premise involvement and most important fact to understand is that customer has invested on cloud to get everything as an hosted/subscription model including integration to avoid capital expenditure and development of technology skill set.

2. On-premise integration: There are use cases when a customer wants to integrate mainly on-premise systems and applications. These can be SAP or non-SAP. As all systems/applications need to be connected reside in customer’s on-premise landscape, the right technology to use is on-premise middleware i.e. SAP Process Orchestration.

3. Cloud to on-premise and vice versa: We also call it as hybrid integration use case. This integration area is causing most of the confusion. Let us see the different factors that need to be considered to decide which solution fits best:
If a customer is already having PO/PI and wants to leverage the same, SAP has introduced the required technical adapters e.g. SuccessFactors adapter, Ariba cXML adapter etc. to connect to the respective cloud applications. So SAP Process Orchestration can be continued as a single middleware in customer’s landscape covering both integration needs.
If customer is not having PI/PO, immediate right choice would be to use SAP HANA Cloud Integration as a minimal up-front investment. HCI is a multi-tenant solution specially built for cloud integration usecases.
There are many usecases that exist when the customer is on PI, but still HCI can be considered for cloud Integration. Few examples:
Customer is thinking to move into the cloud and requires speed integration of new cloud applications for business innovation and Pre-packaged content is only available on HCI, then HCI is the right choice.
From the different LOBs perspective, they want to have integration bundled within cloud application to achieve faster results and keep a bifurcation of different integration use cases. So, customers can have one middleware each for cloud integration and for on-premise integration use cases respectively.
PI is on older release and does not have all the technical adapters available with latest release. Customers do not want to invest on upgrade.

Though HCI is already capable of integrating cloud applications via custom integration, in cloud era, lot of focus is on simplicity, quick configurations and deployments. Pre-packaged content is of utmost importance. As of today (Jan. 2015), lot of pre-packaged integration content is already available on SAP HANA Cloud Integration:

SAP Cloud for Customer (C4C) with SAP ERP
SAP Cloud for Customer (C4C) with SAP CRM
SAP SuccessFactors LMS Curricula with SAP HCM Qualification
SAP SuccessFactors HCM Suite Competency with SAP HCM Qualification
SAP SuccessFactors HCM Suite Talent Management with SAP HCM
SAP SuccessFactors Recruitment Management (RCM) with 3rd party assessment vendor PeopleAnswers
SAP SuccessFactors Recruitment Management (RCM) with 3rd party assessment vendor SHL
SAP SuccessFactors Employee Central (EC) with 3rd party benefits vendor Benefitfocus
eDocument (Electronic Invoicing) solution with government solution in Peru (SUNAT) and Chile (SII)


Lot of other pre-packaged content is under development for Ariba, SAP SuccessFactors (e.g. Employee Central Payroll, Cost Centre, Org integration) and other cloud applications that is s planned to get released during next release cycles.



Creating a Key using Keystore - Refer the document




Exactly Once in SAP Hana Cloud Integration


The Issue


In one of our first proof of concepts with SAP Hana Cloud Integration (HCI) we noticed that, when a message failed in HCI, you couldn’t restart the message in HCI and it had to be restarted/resent at the source system.


When we went one step further and added a second receiver to the scenario with the multicast (in parallel mode) operation, we found out that, when the message to the first receiver went successful and the message to the second receiver failed, the message could not be restarted in HCI or the source system. It was not possible to guarantee the delivery to the second receiver.


We have discussed this with SAP and they confirmed that HCI (version 2.14.6) has no Quality of Service (QoS) Exactly Once (EO) out of the box, but it will be part of the HCI roadmap.


The Solution


Together with SAP we developed an EO pattern in HCI with the help of the HCI Data Store. The iFlow consists of four parts:
The Main Integration Process for the normal processing of the incoming message.
A local Integration Process to send the message to the receiver, including error handling in case of an error.
A second Integration Process to retrieve the message from the data store after the occurrence of an error.
Second local Integration Progress to send the message to the receiver and delete the message on success from the Date Store

Part 1: The Main Integration Process

The main integration process has the normal processing operations, like Content Modifiers and Mappings. The last Content Modifier operation will set the dynamic file name (header variable “CamelFileName”) and will save the payload of the message in a property. The last operation is a Process Call to a local integration process. In this case it is a single receiver; in case of multiple receivers you will need a Multicast operation (in serial mode) with each a call to separate local integration process.


Part 2: The first local Integration Process


The first local Integration Process contains a send operation (“Service Call” operation in “Send” mode) and an Exception SubProcess. The Exception Subprocess will catch a potential error during the send step. The Content Modifier will make sure the message that has failed, is put back in the body of the message using the property set by the last Content Modifier operation in the main process. The Write operation (Data Store Operations in “Write” mode) will persist the body of the message to the HCI Data Store and the file name (as it is dynamic we don’t want to lose it) as Entry ID.


Part 3: The Retry Sending failed message


The third part is the “Retry sending failed messages” Integration Process within the same iFlow. This is a timed event that will trigger every 5 minutes a Select operation (Data Store Operations in “Select” mode).


This operation is configured to retrieve 100 message at the time and the checkbox “Delete After Fetch” is unchecked. The Select Operation will add a small envelop to the message:


/messages/message/

The next step, a Router operation, will check if there are any messages retrieved from the data store with in our case the following Xpath expression:

count(/messages/message/OutputXMLReplicationRequest/DocumentType) > 0

If you don’t do this, you can process an empty message.

As we can retrieve a potential 100 messages at the same time from the data store, we need a Splitter operation to split up the messages and process them one by one.

The Content Modifier sets header variable “CamelFileName” for the dynamic file name. Since we used the file name as the Entry ID in the Data Store we can retrieve it with the following Xpath expression:

/messages/message/@id

The last step before sending the message to the receiver via the local Integration Process is a Filter operation to remove the envelop from the message with in our case the following Xpath expression:

//OutputXMLReplicationRequest


Part 4: The second local Integration Process

The message will be resend from a second local Integration Process. If the message has been sent successfully, the message will be deleted from the data store by the Delete operation (Data Store Operations in “Delete” mode). If the message fails again, The Delete operation will not be executed, the message will stay in the Data Store and will be processed again in the next occurrence of the Retry Integration Process.

Finally
We hope this Exactly Once Pattern will help you to build more robust interfaces in SAP Hana Cloud integration.