Transition skip

Hi, I have a state machine project with the try catch block after every page of a website that needs filling the data and if there is a problem, that the process doesn’t move to next page it should throw error and move to the next iteration of the process.

Can I create something like a skip to the transition in the catch phase that would move to the next iteration without stopping the whole process

Hi @Gabriel_Toth

There are few options here.

  1. You could use a Log Field activity to log the error without using the Throw activity which will actually throw an error.
  2. The best option in this case would be to use the Global Handler which can be found under new
    image

It is specifically designed for these types of situations. This will actually create a separate workflow file to handle errors in the entire solution. So for all the xaml files you have in your automation solution, you only need one Global Handler. How to call it? well that happens automatically when an error occurs :slight_smile:

In this, there are few options you can try. You can retry the execution of the same activity that ran into the error, you can abort the process, or you can continue to the next activity. I guess this is what you are looking for :slight_smile:

I’m attaching a sample file which I have created so you can have a look. In this file, If an activity runs into an error, I retry the execution of that activity for three times. If it fails, I abort the process. It also captures the activity name which runs into the error. You can change it as required…

GlobalExceptionHandler.xaml (10.9 KB)

If this works for you, please make sure to mark the answer as the solution too :slight_smile:

Let know how it goes

1 Like

Hi,

thank you very much for the answer but I have quite complicated state machine set up already that needs to log the same error in different sequences with different results. I tried to make this work but I dont think this is the way for me.

Is there any other way I could tackle this? It doesnt even need to be error based but for example if some value equals something go to the end of this state machine. I would do it with if but this one state has 17 sequences and that would be one large nested if.

Maybe im missing something very basic that could help.

Thanks for help