Retry Database conenction

How To retry Database Connection Using Connect activity if RPA is failed to connect in 1st time. I want to retry if connection failed, sometimes our database is slow so need to retry 2 times and then it will connect.

@PALKUMARI_PATEL You can use retry scope activity

Hey @indra I know retry scope but what condition should I put? SQL output = false ?

@PALKUMARI_PATEL

  1. In the Action block add the action what ever you want

  2. In condition block after connection success use element exists and indicate on screen which gives you Boolean result. So If connection is success it will continue with next activity if it fails it will retry from action block.

  3. In the retry scope properties add number of retries and time interval

image

Thanks for explanation @indra . I am not using any Ui Element for this bot so what should I use as element exist ? I just need to setup condition for connection fails. But bit confuse that the condition is right or no.

@PALKUMARI_PATEL

Yes you needs to use element exists if you are using retry scope activity

@PALKUMARI_PATEL You can use while loop to retry 2 times

Please check the sample workflow below

Example.zip (2.8 KB)

Thanks but it says . Do I need to download any package?
image

@PALKUMARI_PATEL Try to install UiPath.Database.Activities

1 Like

Hi @PALKUMARI_PATEL

You can have a Try Catch Block , and in Catch block you have Again use “Connect” activity if it fails in the Try Block

Thanks.

I want to retry for 3 times… Can you just give me an idea of flow ?

Hi @PALKUMARI_PATEL

please check the xaml below,please change the exception in Catch block accordingly.

Hope that helps.

BlankProcess16.zip (2.3 KB)

1 Like

@PALKUMARI_PATEL Did you go through the workflow. Didn’t it work

1 Like

Thank You. I will try that.

@PALKUMARI_PATEL No worries! Just want to know. We are happy to help you out

1 Like

Thank you Suraj . It’s working.

1 Like

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