Exit RPA program flow

Hi,
In my RPA program, I have inserted 3 input dialog boxes to scan and capture data. My query is,
How can I exit from the RPA program if I closed the input dialog box while the program is running?
Currently, when I close the input dialog box, the program is moving to the next activity.

Please guide me on this scenario.
Thanks in advance.

Usually inout dialog box will be used in attended mode
So If you are running the bot from UiPath assistant and if the process is using input dialog box once the input is given the bot will resume with its next activity or will automatically close in its own
We don’t need to exit explicitly

Only if you running from studio we need to exit studio which has to be done manually obviously

If we are running from robot agent or UiPath assistant then it will exit automatically

Hope this clarifies your query

Cheers @Christin_John