One state to another state if the error occurs


Let’s suppose I am working on the some application and suddenly that’s application stop. How can I go to the next step or Final State. How can I define that exception and how can I use it.
Any help will be appreciated.


You should probabaly run the program in debug mode with step into and step over. This will allow you to know where exactly the error occoured and you can make changes in your workflow accordingly.

1 Like

Hi @anmolk171

I hope you would be already using the Try Catch block, so any exception would go to Catch and in that particular block you can log this exception in a text file and perform further steps/activities after the same.

You can also use Finally block to perform steps that should be performed does not matter there is an error or not.

So you can either call your other state in Catch block also, or in finally block, according to your need.



Thanks @PrankurJoshi. Can you please provide me more detail like How how can I call another state in catch block. It can be achieve by just drag and drop the state activity or any other possible ways to do this.


Use state machines and have bool/some variable in your workflow based on the value in try/catch block your statemachine flow will differ.