How to set this condition for Retry Scope

Hi there,

I made an API connection to a crypto exchange. But sometimes the http request gets timed out and I would like to use a retry scope for that. Like this:


So first I set the string (strJsonString) to nothing. After that I put the HTTP Request (which fills the strJsonString) in a Retry Scope.
I would like that the robot retries the HTTP Request if strJsonString is not filled. How do I do this?
Many thanks in advance!

hi @Bureau_G
add if statment string.IsNullOrEmpty(strJsonString)
then add the retry scope in else without condition

You can add a Check False activity in the condition with strJsonString = “”

It should retry the http request the amount of times you define in the retry scope or until it is false that the string is empty.

Hi @Bureau_G

Use the if condition check strjsonstring=“”
Retry scope Number of retries
Add Http activity

Hope it helps!!

Do you mean like this?
image3

@Bureau_G ,
Before proceeding with the retry scope please increase the timeout of HTTP Request activity . If that also doesn’t help then
You can surround the http request activity by try catch block inside the retry block
IF an error occures then by default it will retry for 3 times and later it will go to catch block and you can handle the exception

image

Regards,

@Bureau_G

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.