How can I repeat a step until no error?

:bullseye: What is your goal?

Ideally what I want is:
If onedrive module fails, wait 5 seconds and try again, if fails again, wait another 5 seconds and try again.
I want this loop to be continous for 5 attempts

:thinking: What is the problem?

I have a onedrive module in my scenario that moves a folder into a location in sharepoint, but I am having a problem that sometimes the onedrive module throws an error stating that the location is not accessible. This is a share point issue, and if I try again after a few seconds it will become accessible and the sceanrio works.

Is there a way where I can set the onedrive module to try again in a few seconds if it originally throws an error?
I cant use the “break” module as the minimum amount of wait time until it tries again is one minute, and that is too long. I only need to wait 5 seconds or so.

Ideally what I want is:
Onedrive = FAIL, then wait 5 seconds and try again, and if FAIL again, wait 5 seconds and try again, and keep running that until the onedrive module succeeds, or it has tried 5 times with still no success.
See the screenshot. The circled module is the one causing the problem

Can anyone help? I can find a bunch of similar topics but they all use the break command.

Thanks

:test_tube: What have you tried so far?

I tried using the break, but the wait time is too long (minimum 1 minute)

:camera_with_flash: Screenshots: scenario setup, module configuration, errors

1 Like

Hey Lee,

that would be the Break error handler.

2 Likes

Hi Stoyan, like I said in the post, the break error handler is no good, as the minimum wait time for the break is 1 minute, and one minute is too long. I only need it to wait a 5 seconds or so.

Any ideas?

Build the same logic manually - add the same module in the error handling route after a sleep module so it gets retried. Then copy paste the same a couple of times so you get like 5 retries.

2 Likes

I understand what you mean, but Isnt that a very convoluted way to get round this problem? (no offence). Is there not another way that does exactly this without having countless routers and end points? If not, then I may just have to use this method.

1 Like

Oh yeah, I agree. But there isn’t a better way to simulate a Break module but have it trigger faster.

You can upvote the post here and hopefully we will get an option to configure it in seconds as well as minutes.

4 Likes