Close a Sequence upon a certain condition

Hi guys and gals,

I am running in to some issues when having to close a sequence.

So here is what I have, it is a bot that in order to access a certain Citrix App it first needs to log in to an account in Chrome and then download the app from there.

However the issue is that the account can sometimes have an expired password. What I want to do is to try and log in and if it cannot login then to send me an email and then close the whole Sequence.

The issue I am facing is that it tries to continue with the execution of the Sequence and then throws an error. What I have tried is to wrap the part that throws the error in a try catch and in the catch part I have tried with Terminate Workflow (on which I cannot find anything on the docs) and with the Kill Process however non of these seem to be working.

So guys and gals can you please help me with this as I have already locked the account once :smiley: and I do not want to lock it again, If you have any advice, tips, trick, links that would be of help it will be very much appreciated.

Thank you for your time.

Hi,

My idea is to use Element Exists activity. Choose an UI element that is visible upon a successful login. Element Exists activity checks if that element exists and outputs the result into Boolean variable. Let’s call that variable SuccessfulLogin. Then you can put an If activity with condition SuccessfulLogin = True. In the Then section -> continue with the workflow and in the Else section -> send e-mail for unsuccessful login.

Alternatively, you can use Flowchart and Flow Decision, instead of Sequence and If activity.

Unfortunately it is in a For - Each loop and if I did that it would just start spamming emails I also thought of that but it won’t be reliable in this case. I am wondering if I can just exit out of the whole sequence.

In regards to using Flowchart and Flow Decision I do agree that it might be better however we are building a new sequence that will not need all that structure but it would need to be able to break out of the sequence.

Thank you for the response tho it is very much appreciated!

I do think using the flowchart will work in your case. You will just replace the loop with a variable to which you add +1 for every iteration. If in one of the iterations, the login is unsuccessful, you move to a different activity, instead of looping back, and you exit the workflow.