Stop the Workflow

Hi All,

Can any one tell me , how to stop the workflow, if any error occurs?

I have a workflow, which has many sequences:
Sequences are Like -
login to SAP
Enter in to QRH
enter the data to Tcode
etc.

So suppose login SAP has prob then i should stop this workflow and no further processing.

Regards,
Sonika

1 Like

Hi @Seem

After Successful login into SAP application you will get a different screen. Use Element Exist activity to identify any unique and stable element which is exist after successful login.

Element Exist activity will give a Bool(True/False) value as output. Use if condition or flow decision to check element exist value is true or not.

If it is true then proceed with Enter in to QRH and in else block raise an exception/send mail as per your requirement.

To capture any Generic Exceptions you can use Try Catch activity where you can put your code inside Try and exceptions will get capture in Catch block.

Hope this will help you.

Regards,
Vijay.

Hi Buddy @Seem

In order to stop the workflow if any error occurs abruptly, try to implement all the workflow that you mentioned inside a Try part of Try Catch block buddy.
and if any error occurs it will go to the catch block where you can use Terminate Workflow activity to stop the workflow buddy
Simple two steps …isn’t it…

for more info on try catch block
here you go

Kindly try this and let know buddy
Cheers @Seem

@Palaniyappan

Thanks for ur reply. yes the steps are simple.

I have added the exception handling. Generic exception(sys.exception ) and the Selector not found, file not found etc.

But what i am facing in real time is different. some times some different types of bugs are coming , they are throwing the different screens or dialog boxes , so i dont no what to be done for this. Well if i get like this then in Prod the BOT will get broken.

So this is what i am asking how to resolve it…

ex:
image
for this error i have to click - OK button. well i have to go for the unattended BOT
ex2:

For this i have to close the window.

So like this the errors are coming(unknown errors)

I am bit afraid, as i have to take it to PROD.
So i am asking the questions.

@Vijay_Kumar_C
I have used the logic given by you. Thanks but the above part is critical

Regards,
Sonika

Buddy @Seem
no worries
May i know why you are using start process
anyhow
if you want to use kindly check whether the file path mentioned in the start process in correctly entered without any typo mistake…

Kindly check this and let know buddy…but why start process …
Cheers @Seem

Hey @Palaniyappan

yes the path is accurate. thats the sap path.
No typo error.