Multi Cast
Multi Cast
Parallel :
Sequential
What is business use case
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?
UseoneasMany
Removecontext vs collapse context
Splitbyvalue
getHeader
getProperty
Exists
Createif
FormatbyExample
Genarally
Breaks down a message into multiple messages keeping the encapsulating elements
Breaks down a Message into Multiple messages without encapsulating elements
-----------------------------------------------------------------------------------------------------------------------
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,
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.
----------------------------------------------------------------------------------------------------------------------------------------
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
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
-------------------------------------------------------------------------------------------------------------------------------------
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.
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.
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
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
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.
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.
Message Filtering: JMS includes message filtering methods that let users subscribe only to messages
that meet particular requirements
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.
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
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
Case 1 : Message send to queue, connect to SFTP error. Message will hold in queue
POSTMAN to queue
Queue to SFTP -> Fail
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
Concatenate & Combine : Header and Properties no change after Poll Enrich
Replace : Header and Payload will remove
Scenario 1 : Replace payload original with another which get from another file XML in SFTP
In this define, we use externalize parameter. Kindly reference another post for externalize parameter.
This SFTP configuration, we use dynamic configuration. Data in XML file will send to POLL ENRICH to
replace original payload.
Original payload
Message will replace by POLL ENRICH
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.
9. We can see the XML has been sorted and Filtered on the basis of the Company Name "ABT".
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.
To do this, we will use software KLEOPATRA. you can download it over internet.
Click New Key Pair
Export public key
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.
Scenario – Receive data which encrypted before to IFLOW, use component PGP DECRYPTOR to decrypt
data and send to backend
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
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
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 :
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
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 can also edit the Mapping by clicking on edit button on the top
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
2. exists
3. removeContext
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
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
8. getHeader
9. getProperty
10. sortByKey
12. splitByValue
13. replaceValue