Step by Step for Implementing Idempotent Process Call [ SAP Cloud Integration ]
A quick step by step guide to setup new feature Idempotent Process Call in Cloud Integration (Cloud Foundry Environment).
The Idempotent Process call can be used to achieve Exactly once scenario on Cloud integration using a unique identifier set as message ID.
It detects if a message ID(unique Identifier) has already been successfully processed and stores the status of the successful process in the idempotent repository.
We want to achieve exactly once message processing scenario using Idempotent Process call pallete option.
In below use case we are trying to process OrdersStatus from Third-party sender system. We are using the OrderNo coming from the source payload as unique identifier.
So if we try to process the same message(with same Order No) next time message shouldn’t be processed or integration should allow us to handle the scenario in an appropriate manner.
In this case we are checking if the the payload is coming with same order no. If duplication is found we are sending an alert with Order no and updating that we would not be processing the message further. We are using a webhook to demostrate the output of the scneario.
Successfull Process steps [ 1 – 2 – 3 – 4 – 5 – 6 ] : These process steps are executed when the message is received on cloud integration system for the first time.
Duplicate Entry Found Process steps [ 1 – 2 – 3 – 7 – 8 – 9 – 10 ] : These process steps are exectued when the same message is recieved on Cloud Integration for more than once.
|Step 1||Sample message is posted through postman to the source API URL of cloud integration.|
The property orderID is set using xPath expression to fetch it dynamically.
— Pallete option for Idempotent Process Call.
we are using orderID as unique identifier which would be stored in idempotent repository for duplicate check.
|Step 4||Setting Up the processed data. In this case we are just adding an additional line to the payload but in real time we could have multiple steps of processing inside this local integration process.|
Post processing we are posting the message to a webhook where we captured the output.
Instead it could be any system where we want to post the transformed message.
|Step 6 & 7||
When we try to process the same message more than once the message ID/Unique identifier is comapred with the value in idempotent repository and if it matches the CamelDuplicateMessage flag is set to true. We could use the flag to take appropriate action. It could be an alert or we could send the message to any other system.
|Step 8||Calling local integration process to take certain action like sending alerts in case of payload not processed because of duplicate entry found.|
|Step 9 & 10|
So using this scenario we were able to demostrate how to achieve process [Exactly Once] scenario based on a unique identifier and using Idempotent Process call pallete option.
Hope this helps !
thanks and regards,