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: 
alex_bundschuh
Product and Topic Expert
Product and Topic Expert
0 Kudos

The current blog is part of a blog series where I describe how to implement different asynchronous integration scenarios using the pipeline concept on Cloud Integration. In the previous blog post, I described a point-to-point scenario. In this blog post, I like to describe how to apply the pipeline concept on Cloud Integration for implementing an integration scenario with interface split whereas all split messages are of same message type.

The scenario is like the point-to-point scenario except that the operation mapping splits the message into multiple messages. Here, we have an incoming message with an order and multiple items whereas each item should be sent to one and the same receiver individually. I will first show you how the scenario is configured in SAP Process Orchestration, and then go through the main implementation steps to get the scenario run on Cloud Integration leveraging the pipeline concept.

For an introduction to the pipeline concept, see this intro blog post . If you haven't gone through the basics of the pipeline concept, I strongly recommend to first read the introduction blog post before proceeding

Source Integrated Configuration Object in SAP Process Orchestration

The integrated configuration object example on SAP Process Orchestration has one single receiver with no condition defined.

05_01_ReceiverDetermination.png

On the Receiver Interfaces tab, an interface with a one-to-many operation mapping and no xpath condition is defined.

05_02_InterfaceDetermination.png

Target implementation in Cloud Integration

We would like to model and run the scenario on Cloud Integration applying the pipeline concept. Prerequisite is that you have deployed all generic integration flows as well as the script collection from the integration package provided.

To set up the scenario using the pipeline, the Partner Directory entries need to be created as well as the scenario-specific integration flows. In our case, we assume that no inbound conversion is needed. So, we need to create the scenario-specific inbound processing and outbound processing integration flows as copies from the provided templates.

Like for the point-to-point scenario described in the previous blog post, the XSLT mappings for the receiver determination as well as for the interface determination result into fixed XMLs.

The partner ID to store the receiver determination XSLT mapping in the Partner Directory needs to be set to IFSplit_Sender_7~si_order_async_ob.

The XSLT mapping to determine the list of receivers is defined as follows. In this case, no xpath condition is carried out, as said the resulting XML is then fixed.

 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <ns0:Receivers xmlns:ns0="http://sap.com/xi/XI/System">
      <ReceiverNotDetermined>
        <Type>Ignore</Type>
        <DefaultReceiver/>
      </ReceiverNotDetermined>
      <Receiver>
        <Service>RL_Receiver_1</Service>
      </Receiver>
      <Receiver>
    </ns0:Receivers>
  </xsl:template>
</xsl:stylesheet>

 

For the interface determination XSLT mapping, the partner ID equals IFSplit_Sender_7~si_order_async_ob ~RL_Receiver_1. The XSLT mapping to determine the interfaces is fixed as well. It is defined as follows:

 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <ns0:Interfaces xmlns:ns0="http://sap.com/xi/XI/System">
      <Interface>
        <Index>1</Index>
        <Service>/pip/07/scenario4</Service>
      </Interface>
    </ns0:Interfaces>
  </xsl:template>
</xsl:stylesheet>

 

The scenario-specific inbound integration flow looks as follows. It’s a copy of the template Pipeline Template Step01 - Inbound Processing At Least Once, see Pipeline Steps.

05_01_InboundProcessing.png

The scenario-specific outbound integration flow needs to be modelled as follows. It’s a copy of the template Pipeline Template Step07 - Outbound Processing One-to-Many with One Message Type, see Pipeline Steps.

05_02_OutboundProcessing.png

In an XML Modifier step, you need to remove the XML declaration from the message body.

05_03_Remove XML Declaration.png

In a content modifier step, you need to wrap the body with the nodes required when running multi-mappings.

05_04_Add Messages Nodes.png

In a message mapping step, you run the multi-mapping that you can reuse from the SAP Process Orchestration system.

05_05_Run 1 to many Mapping.png

The mapped message needs to be split using an iterating splitter with expression type XPath and an xpath to split the message on Item level. By intention, we unselect the Parallel Processing flag, see below.

05_06_Split.png

To ensure Exactly Once delivery, we need to assign each split message a unique ID, hence we concatenate the unique ID that we received from the generic parent flow with the Camel split index and store the value into the exchange property SplitMessageID. Since the split was done sequentially, each item always gets its same split index assigned in case that the message is retried.

05_07_UniqueID.png

In an idempotent process call, the actual receiver is called. The beforehand created SplitMessageID property is used to identify duplicates. If the idempotent process was successfully carried out before, a retry with the same ID will be skipped.

05_08_Idempotent Process Call.png

Next, we will cover another interface split scenario, this time with multiple receiver message types, see next blog post.