0% found this document useful (0 votes)
41 views38 pages

Multi Cast

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views38 pages

Multi Cast

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Multicast:

 Parallel :
 Sequential
What is business use case

Difference between Gather vs join

 What are external parameters and how did you use it?
 Do you have any idea on PGP keys ?
 Where do you upload the certificates in sap cpi?

SFTP – test connectivity

 How to check whether my file exists in sftp server or not ?


 Know host file ?
 Dynamic file name – timestamp only date i need

On Premise and internet --- on Premise (cloud connector )- location ID

Exception Handling : one scenario need to be explained

Node functions – use cases need to be explained

 UseoneasMany
 Removecontext vs collapse context
 Splitbyvalue
 getHeader
 getProperty
 Exists
 Createif
 FormatbyExample

Genarally

 exists if is used before create if


 after remove context splitbyvalue is used
General splitter vs iterator splitter?

 Breaks down a message into multiple messages keeping the encapsulating elements
 Breaks down a Message into Multiple messages without encapsulating elements

-----------------------------------------------------------------------------------------------------------------------

Sequential Multicast vs Parallel multicast

Sequential Multicast: In sequential multicast, messages are sent to each receiver one after the other.
The next receiver only receives the message after the previous one has been processed.

If one of the branches fails during processing, the sequential multicast will stop further processing of the
remaining branches.

Parallel Multicast: :

In parallel multicast, messages are sent to all receivers simultaneously. Each receiver processes the
message independently and concurrently.

If one branch fails in a parallel multicast, the other branches continue processing. Each branch can
handle its own errors independently,

Summary of Failure Scenarios

 Sequential Multicast: If a branch fails, processing stops for all remaining branches.
 Parallel Multicast: If a branch fails, the other branches continue to process the message
independently.

Gather vs Join:

If you want to combine messages that are transmitted to more than one route by a Multicast step, you
need to place Join step before the Gather step.

If you want to combine messages that are split using a Splitter step, you use only the Gather step.

The Join step is used in combination with the Gather step

----------------------------------------------------------------------------------------------------------------------------------------

Process call - used when we want to call one flow to another iflow ie., (from main flow to subflow) and
from sub flow to main flow using process call we can call local integration process which is the
subflow ..
Process Direct – will send the data from one integration flow to another integrationflow. Ie.,Producer
flow and consumer flow

Producer flow- will provide data to other integration flow within the tenant

Consumer flow- it is used to consume the data from producer flow

 Process call expects an response


 Process direct dosent expect an response

Process Call

 Definition: A process call is used when one iFlow calls another iFlow. It allows you to invoke the
second iFlow and wait for a response.
 Use Case: Typically used for scenarios where you need to execute a sub-process and get results
back to the calling iFlow. For example, this could be useful in complex workflows where
modularization of processes is desired

Process Direct

 Definition: Process direct is a lightweight mechanism to route messages directly to another


iFlow without expecting a response.
 Use Case: Used for simple scenarios where you want to trigger another iFlow, such as logging,
notifications, or decoupling components without needing to wait for a reply.

-------------------------------------------------------------------------------------------------------------------------------------

Are you facing high network latency while establishing inter-communication between integration flows
in SAP Cloud Platform Integration platform?

ProcessDirect adapter is the solution for you. You can use ProcessDirect adapter to provide direct
communication between two integration flows and unlike HTTP/SOAP adapter communication between
two integration flows will not be routed via load balancer.

Terms to keep in mind while working with ProcessDirect adapter:

Producer Integration flow:

When the ProcessDirect adapter is used to send data to other integration flow, we consider the
integration flow as a Producer integration flow. This is when the integration flow has a ProcessDirect
Receiver adapter.

Consumer integration flow:

When the ProcessDirect adapter is used to consume data from other integration flows, we consider the
integration flow as a Consumer integration flows. This is when the integration flow has a ProcessDirect
Sender adapter.
ProcessDirect Adapter Offerings

 Allow multiple integration developers to work on the same integration scenario


 Reuse of integration flows across integration projects
 Decomposition of Integration Flows

XSLT Mapping vs. Other Mapping Techniques


Now, you might be wondering if XSLT Mapping is the only way to achieve data transformation in SAP
CPI. Well, there are other techniques like Message Mapping and Java Mapping. Here's a quick
comparison:

 XSLT Mapping: Ideal for XML transformations, flexible and versatile.


 Message Mapping: Good for XML and non-XML data, has a graphical tool for mapping.
 Java Mapping: Powerful, but requires Java programming skills.

Request Reply- HTTP ,ODATA,JDBC

If we keep the timer in the iflow end point will not be generatqed after successful deployment
Say incoming message if we use splitter palter to split the composite message into individual messages
then Say you have 10 messages after splitting after successful deployment of iflow in Message
processing logs it will show each Message as one Segment so total 10 segments

Iflow:

Sender ->HTTPs adaptor -> Start Message ->Content Modifier ->General Splitter ->Content Modifier

Both Content Modifier -${in.body}

 End
 Content Modifier
 General splitter 1

These three will be repeated 10 times you can observe Segment 3 ..segment 4..Segment
5..Segment 6..Segment 7 ..Segment8..Segment9..Segment10

Basically after splitter what ever you keep in the iflow it will be executed Multiple times depending
on the incoming Message being split to Individual messages.

JMS adaptor : Queue based application ...first in first out

Reliability: Messages are securely delivered even in the face of system failures because to JMS
capabilities like message durability and acknowledgments
Guaranteed Delivery: JMS ensures that messages reach their intended receivers, lowering the possibility
of message loss or inconsistent data.

Asynchronous Communication: Asynchronous communication is made possible via JMS, allowing


systems to send and receive messages without holding up for a prompt reply.

Message Filtering: JMS includes message filtering methods that let users subscribe only to messages
that meet particular requirements

HOW TO USE JMS ADAPTER IN SAP CPI TO RESEND MESSAGE

Scenario

 We send file XML from POSTMAN to 3rd system, but because of any reason, file XML can not go to SFTP.
And we get complain that can not see file in SFTP. In this case we have to push data again. To resolve
this issue, we use JMS adapter.

 Kindly take short look diagram

In this case, message from sender will send to queue is call message queue. And from there, they will
send to SFTP. If any issue of FTP server, message will be hold and resend

Step 1 : Create integration flow for message queue.

For simple, this integration flow we will just include one sender (HTTPS) and one receiver (JMS)
Queue Name : Name of queue in CPI

When we use POSTMAN to run this integration flow We will receive message in Message Queues
Step 2 : Create integration flow consume message queue in step 1

In this step, we create new integration flow to consume message queue. We just add sender adapter is
JMS with name equal name of queue in step 1, and SFTP adapter for receiver. We simulate two case

 Case 1 : Cannot connect to SFTP. We will see that message still in queue. Queue try resend message
every short time
 Case 2 : Connect SFTP ok, so message send from POSTMAN to SFTP ok

This is integration flow which using JMS adapter for sender


Queue Name : Get name of message queue which config in step 1

Step 3 : Test cases

Case 1 : Message send to queue, connect to SFTP error. Message will hold in queue

 POSTMAN to queue
 Queue to SFTP -> Fail

Message hold in queue

Case 2 : Message consumed by queue


[SAP CPI] – HOW TO USE POLL RICH WITH SFTP ADAPTER
Hi guys, in this article I want to discuss about How to use POLL RICH with SFTP adapter in integration
flow CPI. Kindly take a look integration Flow

In this flow, we have two SFTP, one for sender and one for receiver. We also use Poll Rich component,
this is component which will be combine, concatenate or replace XML original message from sender.

In Poll Enrich, we have 3 option for Aggregate Algorithm. Every option SAP have note

If for Aggregation Algorithm you’ve selected Combine XML or Concatenate, headers and properties from
the original message (before the Poll Enrich step) are preserved. That means, after the Poll Enrich step
has been processed, the message contains both the original headers and the headers from the polled
message. If there’s a conflict with a header of the polled message, the latter one replaces the header of
the original message. For example, the value of header CamelFileName is overridden by the one from
the polled message.
If for Aggregation Algorithm you’ve selected Replace, this rule applies for properties only. In this case,
the payload and headers of the original message are removed

So, we have note as

 Concatenate & Combine : Header and Properties no change after Poll Enrich
 Replace : Header and Payload will remove

Ok, here we go with this Scenario

Scenario 1 : Replace payload original with another which get from another file XML in SFTP

 Sender adapter : HTTPS.


 Content Modifier : Define some header and properties. Because of information of SFTP will use one for
all SFTP and because of header will remove after Poll Rich, so we will define information of SFTP in
properties.

In this define, we use externalize parameter. Kindly reference another post for externalize parameter.

 Poll Enrich : with config Aggregation Algorithm is Replace


 SFTP sender for Poll Enrich.

This SFTP configuration, we use dynamic configuration. Data in XML file will send to POLL ENRICH to
replace original payload.

 SFTP for receiver adapter


 OK, It’s done for configuration. We will use POSTMAN to test this Scenarios.
 Before run test, we need to set value for dynamic parameter.

Original payload
Message will replace by POLL ENRICH

Check XML output : OK

Scenario 2 : Combine XML ( Split message)


Scenario 3 : Concatenate ( No Split message)
------------------------------------------------------------------------------------------------------------------------------------
Filters :

 Content based filters


 Header based filters
 Xpath properties

Content-based filtering options allow you to filter messages based on their content. You can specify
conditions that must be met for a message to pass through a filter.

Header-based filters, as the name suggests, focus on message headers. You can use header attributes to
decide whether to continue a message

XPath filters You can define XPath expressions to extract specific elements from the message payload
and use them as filtering criteria.

Implement Filters
Implementing filters in SAP Cloud Integration involves the following steps:
1. Suppose we have an Input Payload in XML that we want to Filter.

2. We will provide this payload into our IFlow, using Postman.


3. Now, our condition is, we want to filter the data from the xml on the basis of the Company they
are working, We want the employees name working in ABT and sort the employees on the basis
of EmployeeID. We will use the Filter to do so.
4. From the pallet, choose the Filter and place it on the Flow.
5. In the Processing tab of the Filter provide the following code condition.

6. Add the Content Modifier to see the output.


7. Save and Deploy the integration flow.
8. Open the Postman and provide the input XML, Run the endpoint.

9. We can see the XML has been sorted and Filtered on the basis of the Company Name "ABT".

[SAP-CPI] USING PGP SECURITY TO PROTECT DATA EXCHANGE IN SAP CPI


Hi guys, in this article I want to share one more tip in CPI, that is PGP keys. First, kindly take a look
diagram below
As you known in picture, all of thing which we need in scenario are

 Create key pair and save private key (A) by yourself and send public key to partner. Partner will encrypt
data by public key and send to your system (CPI). CPI will use private key to decrypt data.
 Save public key (B) of partner in your system and use it to encrypt data which sent to system partner (B)

In SAP CPI, we will use PGP keys, PGP ENCRYPTOR, PGP DECRYPTOR to do this. OK let’s begin.

I. Create private key and public key

To do this, we will use software KLEOPATRA. you can download it over internet.
Click New Key Pair
Export public key

Export PGP private key


OK, public key and private key will be used in encryption and decryption data.

II. PGP Encryption

Scenario – Data plain text will sent by HTTPS adapter. In IFLOW, data will be encrypt by use component
PGP ENCRYPTOR and send file XML to SFTP folder.

Step II – 1. Import PGP public key into PGP Keys


Step II-2. Design IFLOW with component PGP ENCRYPTOR

Step II-3. TEST by POSTMAN


III. PGP Decryption

Scenario – Receive data which encrypted before to IFLOW, use component PGP DECRYPTOR to decrypt
data and send to backend

Step III-1. Import private key into PGP Keys.


Step III-2. Design IFLOW with component PGP DECRYPTOR

Step III-3. TEST by POSTMAN

This testing, kindly try by your self. Thanks.

IV. How to install many public key/private key in CPI

In PGP Keys of CPI, just allow add only one public key, if we add one more another public key, It will be
overwrite. So, If we need add many public of many provider, how do we will do ?

The answer is very simple, we will add all public key into one file. And after that, add this file into CPI.
This is steps

 Add all public key into file


 Add this file into CPI
NOTE

With private key, we need make sure all key have to the same pass phrase. If not, we will receive error
when import into CPI.
SFTP tips

SFTP Receiver side :

 To Get the Hostkey you need to select the Authentication as None in ssh test connectivity and
then click on send to get the host key details
 You need to copy the hostkey from the SSH test connectivity and then upload it to security
Material
If you are using sftp as an sender On deploying the iflow you will not be able to see the endpoint

JMS tips :

Sender side :

Reciever side – we will provide just the queue name

If you are using JMS adaptor at sender side after successful deployment of iflow end point wil not be
generated
JMS : Retry status in Message Processing

Either you will have data issue or Connectivity issue once you send an message to Queue – after
successful deployment of iflow the the message will be stored in Monitor -> Manage Store->Message
Queues

 If its data issues how many times you retry also it will fail
 If its connecitvity issue then we can do a retry
 Messages will be in Queue for 30 days if the message in the queue is not consumed ..
 After Message has been successfully reached to the reciever the Message from the Queue will
be automatically deleted

If the Message doesn’t reach the Reciever, the Status of the iflow will be retry instead of failed status
untill the Retry time gets exhaused / Max retry interval

once the Message reaches the Reciever the status of the iflow will change from retry to completed

Retry will happen based on Queue configuration at Sender side JMS adaptor

Dead letter Queue: after all the retries the Message will go to Dead Letter Queue

In the Same iflow we can use JMS as Reciever and Sender

Two Integrations Process flows one as JMS Reciever and other as JMS Sender
Message Mapping tips : to start working on Mapping right click on Mapping you will see + icon to create
the Mapping

You need to add source xsd and target xsd


If you want to delete the Mapping ->click on the fx icon and right click to see the delete option

You can also edit the Mapping by clicking on edit button on the top

If you want to work on Mapping click on

Testing :

 To test the Mapping you can click on simulate button and you need to upload the source xml
and click on test button it will show target values
 You can also test the individual node using display queue

------------------------------------------------------------------------------------------------------------------------------------------
if you click on edit icon in Message Mapping this is how it look like
Once you click on edit icon this is what you see

1. createIf

 Description: Creates an element if it doesn't already exist.


 Use Case: When building a payload structure, use createIf to ensure that essential elements
(e.g., an address or a customer ID) are present, even if the source data is missing them.

2. exists

 Description: Checks for the presence of an element or property in the payload.


 Use Case: In conditional routing, use exists to determine if a certain field (e.g., customerID) is
present to decide the next steps in the integration flow.

3. removeContext

 Description: Removes an element from the context.


 Use Case: If certain temporary data (e.g., intermediate calculation results) is no longer needed,
removeContext can be used to clean up and reduce payload size.

4. collapseContext

 Description: Merges elements from the current context into the parent context.
 Use Case: When you have deeply nested structures and want to simplify the data, use
collapseContext to flatten it for easier processing in downstream steps.

5. useOneAsMany

 Description: Converts a single element into a collection.


 Use Case: When the source data may provide a single item (like a single invoice) but the target
requires an array (like multiple invoices), use useOneAsMany to ensure compatibility.

6. mapWithDefault

 Description: Maps a value to a new key, providing a default if the original value is absent.
 Use Case: In cases where certain values might not be present in incoming messages,
mapWithDefault helps avoid null references by providing a default (e.g., mapping shippingCost
to 0 if not found).

7. formatByExample

 Description: Formats data based on an example structure.


 Use Case: When integrating data from different sources with varying formats, use
formatByExample to standardize the output (e.g., ensuring all date formats are consistent).

8. getHeader

 Description: Retrieves a specific header value from the incoming message.


 Use Case: When processing messages that include metadata (like authentication tokens),
getHeader can extract this information for validation or logging.

9. getProperty

 Description: Fetches a property value from the integration flow context.


 Use Case: When you need to access configuration values (like environment-specific settings),
getProperty can retrieve these for use throughout the flow.

10. sortByKey

 Description: Sorts elements based on a specified key.


 Use Case: In scenarios where the order of elements matters (like in billing or reporting), use
sortByKey to ensure they are organized correctly before processing.
11. sort

 Description: Sorts elements in the payload based on a specified criterion.


 Use Case: When dealing with collections that need to be in a specific order (e.g., sorting
transactions by date), use sort to ensure the desired sequence.

12. splitByValue

 Description: Divides a collection into smaller parts based on a specified value.


 Use Case: When processing batch data that needs to be segmented (like splitting orders by
regions), splitByValue can be used to create distinct groups for further handling.

13. replaceValue

 Description: Replaces specified values in the payload with new ones.


 Use Case: For data cleansing, if certain values (like obsolete status codes) need to be
standardized or updated to reflect current definitions, use replaceValue.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy