How to set condition in a retry scope

Hi peepz
This workflow is working 100% now, but the worflow will keep looping until there is no error.
Can anyone provide an example of the use of retry scope, to restrict the number of retries?

Thanks in advance

Retry Scope condition can be one of the activities that return a boolean.

For example,
Is True or Is False are activities that return boolean.

Then, provide it a condition that will make it true so it continues to retry until the condition becomes false. And you can also adjust the amount of retries.

Hope that helps!

2 Likes

I cannot drag anything to the condition field, can you provide a simple example xml?

Thanks in advance.

Scope Retry works for Activity which returns Boolean, such as “Element Exists”, “Image Exists” etc.,

1 Like

Hi Extinguir,
You’ll want to just get used to using the ones that provide you a boolean result. Go to the Search in activities and search for “exist” or “is” (like all the “is true” “is equal” or “element exists” etc)

You’ll get used to a few that you find comfortable using.
The boolean activities will let you drag it in to condition spot.

Thanks. =)

1 Like

Hi,

We can use a “Is Match” and compare a string.

Regards,
Arun Sharma

I don’t find the “is true” activity. What package should I install to get it?

Install Microsoft.Activities.Extensions

Regards,

2 Likes

Hi Lucas, I still dont find the “is true” activity after installing the mentioned package.

Try Workflow Manager Activities

2 Likes

Try searching for Expressions and it will list all similar activities like Is True.

Also, you might run in the glitch where if you open Studio for the first time after a reboot, the packages don’t load, until you close and reopen Studio a second time… which may or may not be fixed in newer versions of Studio.

The condition must be FALSE to do the retry. If the condition is TRUE, the robot will get out of the retry loop.

3 Likes

Hello Everyone,

I have attached a small demo for using “Retry Scope”.

This workflow tries performing the action “n” times every “t” seconds. Set the default values for n and t in the variables.

The action, if bot fails to perform, then there is an inbuilt try catch implement with Retry Scope. You won’t get an error until it had retried “n” times.

I have mentioned n as 3 and t as 5 seconds, so if you run this workflow in your system, the bot will not throw you an error until it has already retried 3 times.

Cheers!!!

Xaml File: RetryScopeDemo.xaml (9.8 KB)

3 Likes

Try searching “Check True”. Also if you are not able to find “is True” and “is False” activities, try putting a space between is and true and similarly for “is false”.
Hope this helps.

1 Like

Hi @nshrimali, Can you please help in finding IsTrue activity, I am not able to find it.

Thanks!

Harshit Goyal

Hello @harsh497, go to Manage packages, choose All packages and type in search “Workflow Manager Activities”. Install this activity and you will find the IsTrue activity after successful installation of this package.

Cheers!!

1 Like

@nshrimali, I had figured this out. Actually, I had updated my studio version and there, I was not able to find “Workflow Manager Activities” inside Manage Packages because in the studio version 2019.3.0, there is something called “Manage Sources” under “Settings” Tab & I had to select Official, Community and nuget.org from there. Then, I was able to find “Workflow Manager Activities”.

Anyway, Thanks for your help!

Hi,

I tried Path Exists in 2018 version, but the condition does not allow this activity to be used even though it returns a Boolean value. Any restriction on condition in Retry Scope activity ?

Thank you
VJ

Hi @vijayakumarkj
Try using the Is True activity with the condition System.IO.Directory.Exists(folderpath)
or System.IO.File.Exists(filepath)

Regards

Hi @Extinguir

You can check this video for the demonstration of Retry Scope activity

Thanks,
Ula