Kill a transaction if it takes longer than 5 minutes

Hi All,

I am automating a process in SAP application. In some cases, the SAP application hangs and the BOT just gets stuck in that step. The Transaction item is “In Progress” state for 19 hours when the entire process should only take 1 minute per transaction. We searched the forum and found that we could use the “Timeout” property in the “Invoke Workflow File” activity for 3 minutes, but that is not working. Does anyone have any other suggestions?

I want any transaction to run only for a maximum of 3 minutes. If the transaction if still “In Progress” after 3 minutes, the BOT should move on to the next transaction.

Thanks in Advance,
Jegan Chakkravarthy

Hi @Yhtravarkkhc_Nagej

Based on the delay activity please do use it and do a kill process activity

Thanks
Ashwin S

The problem here is that the BOT will not move to the delay activity at all if it is stuck.

The below picture should give you an idea of the issue.

So a delay would not work because, let us say a click activity is not yet completed.

Hi @Yhtravarkkhc_Nagej

Try element exists for each activity and use Click activity and use element exists and then use get text

Thanks
Ashwin S

We have 127 click activities in the process. In many cases, the element is an underlay and the element is always available. So element exists does not always give the expected result. We have tried the common approaches and none of them worked.

Hi @Yhtravarkkhc_Nagej
It all depends on the Selector we redefine it in UIExplorer

Thanks
Ashwin S

Yes Ashwin, We have tried that, but that too does not end the transaction.
We need a way to kill a transaction and move to the next transaction in the queue if a particular time has elapsed.

You can use “Try catch” activity
In “Try” section - place “Invoke workflow file” linked with your sequence in file
In “Catches” section - select exceptions
In “Finally” - “kill process”

Using a Try-Catch will only work if there is an Exception, but my situation does not cause any Exception. So I don’t think this option will help me.

for getText activity - try “FindElementException” & “NullReferenceException”