Skip to Content
Technical Articles
Author's profile photo Praveen Tirumareddy

Step by Step for Implementing Idempotent Process Call [ SAP Cloud Integration ]

Introduction:

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.

Business Requirement:

We want to achieve exactly once message processing scenario using Idempotent Process call pallete option.

Scenario:

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.

 

Mail%20Iflow

 Iflow

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.

Step 2

The property orderID is set using xPath expression to fetch it dynamically.

Step 3

 

 

 

 

 

— 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.
Step 5

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

Conclusion:

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.

Testing Tools:

References:

[ https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/84c85d753dcd4400a440fb1915899b72.html ]

Hope this helps !

thanks and regards,

Praveen T

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mastan Vali
      Mastan Vali

      Hi Praveen,

      good blog, thanks for sharing.

      If the webhook used in this scenario is free, then can you guide me how to register , i couldnt see any option for the same in the website.

       

      thanks

      Mastan

       

      Author's profile photo Praveen Tirumareddy
      Praveen Tirumareddy
      Blog Post Author

      Hi Mastan,

      Ya for basic testing its free I guess. Once you click on the  the webhooksite you would see a unique URL generated for your session. You can use the URL mentioned in Your Unique URL section.

      hope that helps !

      regards,

      Praveen T

       

       

      Author's profile photo Mohan Kanaka
      Mohan Kanaka

      Excellent blog Praveen !! To handle QOS(EO) related Scenario's where SAP Cloud Platform Integration Suite  does not support in the standard feature.Might be in the SAPs Road map in the near future.

      Author's profile photo Siba Sundar Das
      Siba Sundar Das

      Hi Praveen,

      Great Blog. Thank you for sharing .

      I have few  questions on this

      1. Where can we see the idempotent repository/  entries for duplicate check.

      2. Is there any way to delete entry

      3. I ran the idempotent process from different  iFlows and observe that the duplicate is  checked on  tenant level. Is there any provision to restrict it to iFlow level like local variable or Data Store .                                      

      Thanks
      Siba

       

      Author's profile photo Raffaele Di Fluri
      Raffaele Di Fluri

      Hi Praveen,

      Thaks for this Step by Step guide. I want to use this feature but I cannot have this option "Idempotent Process Call" in Palette on my Tenant (Europe Regions).

      Is it a new feature upcoming and not yet available in all SPCI tenant?

      My teant is a Standard plan with Build number 6.22.8

      Thanks in advance

      Raffaele

      Author's profile photo Praveen Tirumareddy
      Praveen Tirumareddy
      Blog Post Author

      Hi Raffaele,

      Could you check under Call  ==> Local Process Call  ==> Idempotent Process Call.

      This was part of Jan Update:

      Cloud Integration - Software Version Update
      SAP Cloud Integration: 6.22.*
      Increment: 2112

      Hope this helps !

      thanks and regards,

      Praveen T

      Author's profile photo Raffaele Di Fluri
      Raffaele Di Fluri

      Thanks Praveen,

      I found it!

      I think it's only available on SCPI Standard Plan and above. SCPI with Basic Plan doesn't have this feature.

      Thanks a lot !

      BR

      Raffaele

      Author's profile photo Kapil Rajpurohit
      Kapil Rajpurohit

      Great explanation. Thanks for sharing.

      Author's profile photo Saurabh Kabra
      Saurabh Kabra

      Hi Praveen Tirumareddy ,

      Excellent write-up. I have a couple of questions though.

      • Is it possible to retrieve the idempotent repository from Odata?
      • Additionally, can we delete the entry from the idempotent repo via OData or some header? It could be the case that for some reason business might ask to reprocess the iflow.

      Best

      Saurabh

      Author's profile photo Simon Bredel
      Simon Bredel

      Dear Saurabh,

      I faced the same questions and found this blog with my web search.
      After checking with my SAP contacts, they quickly provided the answer.
      So I will share it here in case somebody else finds this blog:

      There is an API for the message processing logs, in this API there is a functionality built in to check and delete the idempotent repository.

      The MPL API can be found on api.sap.com

      https://api.sap.com/api/MessageProcessingLogs/resource

      Idempotent%20Repository%20API

      Idempotent Repository API

      Best regards,
      Simon

      Author's profile photo Saurabh Kabra
      Saurabh Kabra

      Thanks Simon for the update!

      Author's profile photo Madhukar Govindu
      Madhukar Govindu

      Thaks for this Step by Step guide