Hello Integration Community !
In this blog, I shall explain the request-reply pattern of SAP HANA Cloud Integration (HCI-PI) and how you can use it in your integration project.
What is Request-Reply?
In this pattern, a sending system sends a message to an external system or service and then waits for a reply. For example, SOAP messages come in Request-Reply pairs. A SOAP request message indicates a service the sender wishes to invoke on the receiver, whereas a SOAP response message contains the result of the service invocation. The response message either contains a result value or a fault–the SOAP equivalent of an exception.
In HCI, the request-reply flow step sends the request message, waits for the reply message, then processes the reply. This pattern is one of the common patterns used in integration projects.
How can you enable Request-Reply in HCI-PI?
Request-Reply pattern is categorized as a Service Call. You can choose Service Call from the palette and select the Request-reply pattern (By default, the request reply pattern is chosen).
You can use the request-reply pattern in two ways:
1. In the integration pipeline, you send a request message to a 3rd party system.
See the example below. An ERP system is communicating with an HR system. However, we need the data from a SuccessFactors (SFSF) system. In the content modifier step, the request message that is to be sent to the SFSF system is formulated. The response is fed to a mapping step and then sent to an ODATA endpoint in the HR system.
2. You want to send the response back to the requesting sender
This is a frequently-used scenario. In the example below, the reply from the HR system is modified and sent back to the ERP system.
Note:
- I have not configured the channel for the system because it is already configured in the request direction.
- An "End Message" flow-step should be configured to represent the message termination in the process.
Characteristics of the Request-Reply Pattern
- Request call has must be to an external system
- The Quality-of-Service depends on the channel configured (for example, how many times the request attempt should be made)
- Headers and body of the message are available in the Reply side. You can modify any of them.
- Default replies or responses (for example, SOAP responses or SOAP faults) from the receiver are always sent back to the sender. You do not have to configure an explicit request-reply for sending the default responses.