25
Views
2
Comments
Solved
Catching an error within the BPT
Question

Hello everyone,

I have a BPT where I execute an SQL query and pass the records to an Excel file, which is later saved in the database.However, when the SQL query returns too many records, the ListToExcel action takes too much time, causing the BPT to exceed the 5-minute timeout limit. In these cases, I would like to catch the error and terminate my process. This is a screenshot of my automatic activity.

My issue is that I am unable to catch the error. I do have an AllExceptions handler inside the automatic activity, but it doesn’t seem to catch the error. I suspect that the timeout error is leaving the scope of the automatic activity?

Does anyone have any ideas on how to catch this timeout error?


Best Regards.

2024-12-18 16-06-42
Junaid Syed
Solution

 Hi Paulo,

There is no built in way to catch timeout error! Ideally if you expect your process records which takes longer than 5 minutes, then there are two options:

1. Restructure your logic to process entire file in smaller chunks where each chunk is big enough to be processed within five minutes.

2. Replace BPT with timer, with timers you have the liberty to set custom timeouts.

3. Keep track of the time in your BPT, as soon as you reach close to 5 minutes probably 4 minutes 30 seconds, stop processing more records.

Hope it helps!

Junaid

2021-01-28 10-02-59
Muhammad Mahmudul Hasan

Hi @Paulo Almeida 

Unfortunately BPT timeout or any timeout is behind code level scope, means it's not possible to catch from code. Only way is to monitor from Service center & act accordingly. 


2024-12-18 16-06-42
Junaid Syed
Solution

 Hi Paulo,

There is no built in way to catch timeout error! Ideally if you expect your process records which takes longer than 5 minutes, then there are two options:

1. Restructure your logic to process entire file in smaller chunks where each chunk is big enough to be processed within five minutes.

2. Replace BPT with timer, with timers you have the liberty to set custom timeouts.

3. Keep track of the time in your BPT, as soon as you reach close to 5 minutes probably 4 minutes 30 seconds, stop processing more records.

Hope it helps!

Junaid

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.