Why we need retry logic: Suppose we have an API (any ftp call or service call) which we are calling from OIC. During the invoke, sometimes we are getting timed out or other errors. In this case, we may need retry logic to retry the call for a business limited attempts after specific time of intervals.
Logic steps:
- Take an assign with 2 variables. runiteration="true" and counter=number(1)
- Take a while activity and use the condition runiteration="true"
- Take a scope
- Call the API which can fail
- Go to fault handler >> default handlet
- Take a switch and use condition counter <4
- Add a wait for 59 sec
- Increase counter = counter +1
- Otherwise add runiteration = "false"
Detailed steps with POC screenshots:
This will retry 4 times to read file from a ftp locarion.