How to Stop Process in UiPath Re-framework depending on a variable

hi Team,

There is a downtime of an Application in our automation in that situation if we start the BOT then the BOT need to check weather the application is down depending on a screen/image and if we find that then we need to stop the Automation and if any case is already been touched by the BOT, that must be added as a Retry Case for further Processing.
Tried with Terminate and Stop Job, but that didn’t go well.

So requesting team to tell any suggestion for this issue.

First, create a boolean variable AppDown (name it whatever fits your process) with a default value of False. Then when you check if the application is down during the process, if you find that it is down, set AppDown to True and raise a business exception.

Next, you’ll need to modify the Get Transaction state of the REFramework. Have the if statement check for the OrchestratorStop OrElse AppDown. That way your process will stop if the app is down as well.

Feel free to make further modifications as needed. This model will treat the application down as an Orchestrator stop and end the process.

thank u @Anthony_Humphries for a quick reply.

I am using an Application Exception with a specific text as “XYZ is down”, so that the existing case gets added to the Orchestrator once again. I am able to handle the exception in Set Transaction State but my main piece of interest is how to stop the Job completely.

Please let me know if i have missed something.
It would be very helpful if u can provide me the activity name or Sample xaml to check.

You have to change the condition in the If statement of the Get Transaction state. In other words, you’re creating a second variable to check for a process stop (see my 2nd paragraph).

ok Sure Thanks will try the same, but i guess in that state it gives out the message as a No Inventory, but will try to make some changes.

Yeah, the message will indicate something else, so you might need to adjust the log messages depending on which variable triggered the stop.