Looping Process Call
Looping Process Call
integration process until the condition is met or max iterations allowed is reached which ever comew
first
Idempotent process:Adds a process call step to check for Duplicate Ids and conditionaly execute the
steps defined in local integration process
Request Reply: it’s a call to external system and wait for response synchronous call
Content Enricher :Mechanism to combine the incoming message with additional data received from an
external system
Decryptor:Decrypts the encrypted data contained in the body of incoming message body
General Splitter:Breaks down a Message into individual messages keeping the encapsulating
elements
Iterrating splitter:Breaks down a Message into individual Messages without encapsulating elements
We can specify any number of branches with each branch having a condition
If the incoming message satisfies the condition it will route to the corresponding branch
Aggregator : In the source if you are getting more than one incoming message
Simulate vs simulation
Display queue
Simulate
Trace will be enabled for only 10 mins Once enabled we can see Message logs till 1 hour
Manage Security
RETRY: Status retry is set if an error occurred during message processing, and a retry was automatically
started.
ESCALATED: During message processing an error occurred, and no retry has been triggered. For
synchronous messages, an error message is sent to the sender.
FAILED: Message processing failed, message hasn’t been delivered to receiver, and no retries are
possible. In other words: FAILED is a final status, and message processing ultimately has failed.
CANCELLED: Manual cancellation of entries in the JMS queue - MPL is set to status cancelled.
DISCARDED: For scheduler triggered integration flows, the MPL is shown on the worker node where the
message processing started first. For all subsequent message processing starts, the message status is set
to DISCARDED.
For example, assume that an integration flow is initiated by a Timer event (scheduler) and a worker
node goes into an out of memory state. The system starts the worker node again and synchronizes the
integration flow as soon as the node is active. The message is restarted in that case, and a new message
ID generated. The message with the original ID goes into status DISCARDED.
ABANDONED: Message processing was interrupted or log wasn't updated for an uncommonly long time.
The status can change in case processing is resumed.
, "Failed" indicates a complete inability to process the message, while "Escalated" suggests that the
message encountered an issue that needs further investigation but isn’t outright failed. Both statuses
are crucial for monitoring and maintaining the health of integrations in SAP CPI.
Failed
This status indicates that the message processing encountered a critical error that prevented it from
being processed successfully. Common reasons for a failure might include configuration errors, missing
mappings, or connectivity issues.
In SAP Cloud Platform Integration (CPI), the main difference between a tenant management node and a
runtime node is that a developer can modify the tenant management node, but only check the status of
messages in the runtime node:
Variable :
At iFlow first run, variable not created yet but need to use some initial/default value for processing, how
to handle such chicken-and-egg situation?
A: Use Content Modifier read variable and set default value.
-------------------------------------------------------------------------------------------------------------------------------
Data Store:
Q: After Get or Select from DS, what are the ways to delete the entry?
A: Use 'delete on completion' or DS delete by entry id.
Q: When writing a list of records to DS, if some record processing failed, will the DS operation have
partial success, partial failed?
A: Yes. Now new iflow by default 'transaction handling' is none.
Q: How to select multiple entry from DS, process each entry independently one-by-one, process those
success one, skip those failed one, and further write to different DS in case success or failed?
A: Use combination of DS select, splitter, router, exception sub-process, 'transaction handling' setting, 1
source DS + 2 target DS to achive this. Will show in course lesson.
Looping Process call: In single call we cannot pull the entire data from success factor we go for looping
process call .. it will iterate/recall same local integration multiple times based on the count which we
provided in the looping process call it will work based on the condition which we provided .. you can
select local integration process you want to call
If you are querying SAP SuccessFactors EC using the CompoundEmployee API, how would you query all
the records if the page size is set to 200 and they're a thousand records in EC?
Looping Process Call: Call the Local Integration Process till Condition specified is true.
For example, it can be used to iterate through a list of failed messages present in a datastore for retry.
Similarly, it can also be used for sending a small subset of data at a time, which in turn improves
performance by reducing the memory and processing time for each iteration.
A Looping Process Call involves invoking a subprocess multiple times within a single flow based on a
collection of items or until a certain condition is met.
For each call how many records you want to pull you need to specify
ODATA IS ADAPTOR Specific to call ODAT Service we need to use Odata adaptor
Mandatory Fields
Address
Operation Details
Resource Path
To call Success factor we need to use Success Factor Adaptor which is Adaptor Specific
ABAP language is used
IDOC
RFC
Proxy
SFTP File
Intermediate Document
Idoc Number:
This however means, for each IDOC
Control records – idoc type message type idoc number Sender port reciever port, Reciever
partner,sender partner ..
Data Records
-
Direct 1- outbound
Direct 2 is Inbound
We can also use runtime property SAP_PollEnrichMessageFound to check file exist condition in looping
process call step.
Poll enrich to pull the file from SFTP server using SFTP adapter ..Content Enricher to enrich the XML data
from Odata service using Odata/SF adapter
In real time also we cant Poll more than one file using Poll Enricher in Single run....? Poll enrich will pull
only one file real time too
Poll Enricher :
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.
Iflow:
Sender ->HTTPs adaptor -> Start Message ->Content Modifier ->General Splitter ->Content Modifier
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.
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
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
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
11. sort
12. splitByValue
13. replaceValue
Process call: synchronous call(it will wait till the output is returned to process call from local integration
Process )
- Generally Process call and Local Integration process are interlinked ie.(in programming its
caller and calling method ..here Process call is caller method and Local integration process is
calling method Through Process call we will call the Local Integration Process .. once you add
the Process call into the iflow -> in the configuration it will We need to select the local
integration process that you need to call
- How will you know the gather weather last message was reached?
- What are the different ways in which an Integration Flow can be migrated from one tenant to
another?
- Where are the certificates installed in Cloud Integration?
- Why Value Mapping was provided by SAP when Fixed Value Mapping does the same job?
- Have you worked on sftp adaptor if yes what are pre requisites to use SFTP adaptor
- How are you going to handle exceptions in sap cpi tell me Apache camel expression Name to
hold these exceptions?
- Assume that , In current project we need to pass source data to multiple receivers once message
successfully processed to receiver 1 then only we need to process Reciever 2 can we implement
this type of requirement if yes how to implement
- What is difference between Error End and End message and Escalation end ?
- How to call local integration process/subprocess into main process?
- Did you get chance to work on local integration process if yes what is business case
- In content enricher ,if you use Aggregation method –enrich what are the mandatory parameters
you observed?
- Have you correlate orginal message and lookup message
- What is difference between merge and enrich in content enricher
- Have you worked on mail adaptor if yes,what are pre requisites to use mail adaptor
- How to populate subject line dynamically? In body i want to populate iflow name ,Message ID
and data time ..etc if any integration process fail how to implement this requirement
- How to schedule the interface in sap cpi to run automatically
- By mistake you have deleted integration package from design can we revoke /revert that
integration package
- Did you get any chance to work with rest api?
- How to call the Rest api using OAuth client credentials?
In SFTP configuration File name :* (if you give star it will pick all the files in the folder )Cloud
connector : to send any data to on premise application
We will use only reciever side one more thing action from cpi also we will use at sender side
JDBC – we have to pull the data from database server (sender and Reciever side)
SFTP /FTP- we are pulling the file from SFTP server (sender and Reciever side)
RFC-Both sides
Any action if You want to send the data or pull the data in that case we will use cloud connector
HTTPs- Action from outside we are pushing the data to cpi through post man
IDoc
SOAP
Proxy
Proxy
If cpi initiating pull request then we use sftp, jdbc, odata.. And if cpi initiates push request we use http,
soap, idoc etc we generate ulr and share it with source server team they will consume our cpi url.. Is my
understanding right?- Yes
JMS is for only internal communication.. We can not use JMS for external server
Idoc
RFC
Proxy
SFTP File
Landscape -3 system
- outbound configuration
Idoc type
Control records : Idoc number,Idoc typec,Sender port, sender port type,reciever port,Reciever port
type,Sender partner ,Reciever partner
The IDoc Control Record parameters that need to be populated are,
o IDOCTYP - IDoc Type
o MESTYP - Message Type
o SNDPOR - Sender Port
o SNDPRT - Sender Partner Type
o SNDPRN - Sender Partner Name
o RCVPOR - Receiver Port
o RCVPRT - Receiver Partner Type
o RRVPRN - Receiver Partner Name
Data records :
We have developed an interface ..where we will getting the Material data from S4 hana which need to
be sent to third party system ie., SFTP Messaging Mapping ->xml to csv
Public Key: You need to import the recipient's public key to encrypt messages. This key is usually
provided by the recipient.
Private Key: For decrypting messages, you need to import your own private key. This is the key
that corresponds to the public key used by the sender.
Signing: Select including option it will ask for private key We need to generate private key and public
key has to be given to recipient
Which ever you have generated in Monitor ->Manage security->PGP Keys -> you might have uploaded
the public key and that name has to provided in Encryption Key User ID
Signing: Select including option it will ask for private key We need to generate private key and public
key has to be given to recipient
We use SFTP As sender and reciever
How to check whether the file exists in sftp server in sap cpi?
In the process of test connectivity to SFTP server you need to select the Authentication type as User
credentials /Publick key and once you provide the details ..you can click on the checkbox Check
Directory access and provide the Directory Path to see all the files in that directory..below is the
screenshot for the same.
Go to Connectivity Test in SAP CPI monitor
We need to provide the connectivity details to connect SFTP server (Monitor->Connectivity Test-> SSH
tab) once the connection is successful we can able to see the directory details along with files
if the Authentication type is public key Go to Monitor ->Manage Keystore and click on drop
down next to create SSH key
Once you create SSH key you need to download public key and share this with sftp server team
Once you download this public key and send it to sfmc team they will assign one user to this
public key
Sftp team will add user to this public key this is not our responsibility just showing for your
understanding
Once you have done sftp connectivity test now you can use it in iflow sftp adaptor
configuration
Authentication:
User Credentials
Public Key
If the Authentication type is user credentials we need to create it in Manage Security and then provide it
Its successfully reachable to cpi if its not reachable sftp team and firewall team ..please open the
firewall and port enable
To avoid this issue:
Once you download this public key and send it to sftp team they will assign one user to this public key
Sftp team will add user to this public key this is not our responsibility just showing for your
understanding
Now we need to check the connectivity in CPI
Proxy type will decide whether it is Onpremise or cloud (internet)based on the option you select
Don't have option for extention, need to generate new key and have to share with SFTP team
you connect to SFTP receiver side we need to creat SSH key pair and all when ever we create Sender
side SFTP what action we need to take? we need to create Again SSH for sender side ? same we need
add in Cloud connecter level ?
Adaptor level configuration: once the test connectivity is successful we will come back to sftp adaptor
In real time we will Delete the file after Processing
General splitter vs Iterator splitter
Splitter : to Split the composite message into Individual Message we go for splitter
Iterator splitter:breaks down the message into individual messages without encapsulating
elements(without header elment)
General Splitter: breaks down the message into individual messages keeping encapsulating
elements(including header element )
Request reply (http/soap/odata)– it will send request and get the response so two times it will
be called one for request and one for response
Process direct – without load balancer ..Any number producers but only consumer N_-1 Multiple
producers can connect to a single consumer, but the reverse is not possible.
IN Message Monitoring if you want to search the related iflows information we need to use –
correlation ID
Process direct adapter is used for communication between integration artifact/flows in SAP
Cloud Platform Integration platform for the tenant.
Producer flow –
Consumer flow -
Splitter & Gather :
If you want to combine messages that are split using a Splitter step, you use only
the Gather step.
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.
JMS is for only internal communication we cannot use JMS for external server
The OData adapter allows you to communicate with an OData API using OData protocol. You use
messages in ATOM or JSON format for communication.
How do you decide the sender because we have different web services like odata service or soap
based service and Rest service ..
Source – https
Reciever – http
Cfx – soap
Http – http
{exception.message}
{exception.stacktrace}
If you Use End Event – the message status is set to Failed to catch an error in an exeption sub process
to add additional information to the Message processing log
If you use Error End Event : the message status is set to completed you have the option to define a
custom status that allows you to distinguish this error situation from successfully processed message
If you use Escalated end event – the message status is set to escalated
Value Mapping we define conditions if it's Matmas it should go to this receiver and If it's order it
should go to this receiver ani
Suppose I have two integration flows ( IF1,IF2), where IF2 is connected to IF1 via process direct .
Now properties in IF1 cannot be accessed in IF2 because the scope of property is with the iflow (IF1),
but where as headers created in the IF1 can be accessed in IF2 because it as global scope.
Property is with in the flow only but coming to variable if you declare I flow we can use in the I flow
level only but if you declare in the global level where ever you want you can use
Is data store we can store entire message/payload whereas variable stores single value like
timestamp or date
If we are using https at sender side we need to set the url in cpi and provide it to source team so that
they hit the endpoint... Once you deploy in the monitoring you can see the endpoint which need to be
given to source team
Cfx -soap
Http
---------------------------------------------------------------------------------------------------------------------------
SFTP we will use timer to pull the file from directory instead of sender..
We use timer to run the iflow on schedule ..Jdbc we will use content modifier to write select query
and use request reply- call to reciever here reciever is jdbc server.. using jdbc adaptor..
Iflow can have any number of local integration process and integration process..
Process call in main flow is used to call Local integration process/sub flow
A Looping Process Call in Cloud Integration that invokes a Local Integration Process iteratively till the
conditions are met.
The key to the solution is The Process Direct adapter which can be used to establish communication
between integration processes within the same tenant.
How will Gather know that the last split message has reached?
Data store:
Once you successfully read the data from data store it will be deleted if you check the checkbox
delete on completion
Say in your XML you have 30 product IDs 30 products will created in data store..each product ID is
different right you will get different product IDs from source
If you send same message to the data store using write operation it will fail unless you check
overwrite existing message
say you are getting multiple products from source ..you can use Splitter before datastore so that we
will split one large message into individual messages
Select the multiple records from data source using select operation. product ID or invoice id or
employee id as entity id
Fixed Value Mapping: Fixed Value is very useful when you have lots of conditions coming in one
source fields during mapping, then to avoid the IfThenElse or UDF we go for Fixed Value mapping.
Example: if your source field contains 01 or 02 or 03 or.....12 and you want the result as JAN or FEB or
MAR or ......... DEC.
Advantage: Using fixed value table you can see the result immediately in the mapping.
Disadvantage: If you have used the same fixed value mapping at several places in you mapping then in
case of any change in fixed values you have to make the changes at several places. So in short fixed
value mapping is not good from the maintenance point of view.
Value Mapping: Value Mapping also works in the same way as fixed value mapping, only the thing is
you will get the result at run time only. And you have to define the value mapping in Integration
directory.
Advantage: If you have used the same value mapping at several places in you mapping then in case of
any changes in values you don't have to make the changes in you mapping, just make the changes in
in value mapping in Integration Directory, that's it.
Disadvantage: you can't the see the result immediately in mapping. Results can be seen only at run
time
Router will route the message to only one branch based on condition met
But multicast will send message to all branches
Router should have Minimum two branches -- in that one is default route
SFTP will pull only one file for one run.. SFTP will have scheduler at sender side
If it's data issue how many times you retry also it will fail.. If it's connectivity issue then we can do
retry Message will be in Queue for 30days.. Message processing that status will retry.. It has not
failed it went to retry status. You don't see failed status ..you will see retry status
----------------------------------------------------------------------------------------------------------------------------
SFTP :
Mandatory configurations:
How to populate file names dynamically using SFTP adaptor?- time stamp ,Message ID..->
(Camel expression for current date ) , Append time stamp check box
Have you worked on sftp adaptor if yes what are pre requisites to use SFTP adaptor
How do you check whether the file exists or not in sftp server ?- - check the directory Access
check box in connectivity test ->SSH
Interview question :Assume we are getting order details from source system but business wants Order
No in file name on the target system can we implement this requirement in SAP CPI if yes how to
implement it
We need to store the xpath coming from source xml into an property with name as orderNo
Sftp adaptor level connection lo – ${property.orderNo}
SFTP : Monitor->Manage security-> Connectivity test-> SSH
Mandatory configurations:
Address :HOST + post
Proxy type – internet or on premise(location ID)
Authentication- public key
Steps to Follow :
Monitor -> Manage Security-> Manage Keystore -> click Add From Drop down select SSH key
First generate SSH key
Once you Generate SSH key you can download Public key that public key need to be given to
SFTP team so that they will assign one user to the public key
Now go to Connectivity Test-> SSH tab and then Provide the details
Basis team ssh keys they will be creating and they will let you the location ..
Value Mapping Interview question say in source xml we have 1 field that has 100 values so is it
necessary to create 100 fields in values mapping?-i will import all the 100 fields in an csv and then
upload it into value mapping
and different failure options. 1. Use Key 2. Use Default Value 3. Throw exception
Value Mapping – Import: Importing a value mapping comes into picture when you need to move the
objects from one Environment (say Development) to another Environment (say Quality). This will
reduce the efforts and is the ideal way.
40. What are the differences between a Polling and an Event-Driven Process in SAP CPI?
A:
Polling Process: Regularly checks a source (e.g., a directory or a database) for new data.
Event-Driven Process: Triggered by an event, such as the arrival of a message, without the need for
regular polling.