Stop the robot using Cancel button from Message Box

A simple scenario that I have faced:

I have processed many variables and all of them will be added into an e-mail and send them.
Before sending the e-mail I want to check if everything is ok and I added a message box before to check the Body and the Subject.

If it is not ok I’m stopping the robot manually.

With a new property for Cancel button,if it is clicked it should stop the robot and not run the next step in the flow.

I think that is an elegant method to debug a flow or to be used in preproduction with the client.

What you think?
Regards,
Vlad

Hi @VladTof,
It’s a nice idea. But what about debug function where you can check everything and stop at certain activity when something isn’t right?

1 Like

Hi @Pablito,

You are absolutely right but if the project is in testing period at client I can add Message Box activities before some important points (send mails,complete some fields etc) and if the information is correct he will press ok and flow will continue the execution, otherwise he will press Cancel and the robot will be stopped and further he will inform me about that to fix the issue.

It was a thought :slight_smile:

Have a nice day and Happy Birthday UiPath Forum :slight_smile:

Regards,
Vlad

You can do it manually even now. Just chose those two buttons in message box and assign it’s output to variable. Then you can use if statement and for “CANCEL” button assign proper action to stop workflow :slight_smile:
Like this:
image
image

image -> Cancel -> image

2 Likes

Thnak you for your time @Pablito.
I know you can do that but the robot will continue if there are other flows after it. In a state machine is not so easy (maybe just for me) to implement that quick and with not so many changes.

First time I thought that will be helpful for a client with no knowledge about UiPath and just to check if the robot will deliver the right information and if not the robot should be stopped very simple by him (just press a button from a box that will appear on the screen). He will inform further the developer to check.

Regards,
Vlad

1 Like

Sure :slight_smile: I totally understand. Sorry that I might seem to sound inquisitive. I’m only doing it to fully understand your point of view and use case etc.

1 Like

Hi @VladTof,

Why not just do what @Pablito said and then just add a taskkill command to kill the robot? That will stop it for sure.

Hi @rmunro,

You both are right. Thank you for your time :slight_smile: