24
Views
6
Comments
How can we run a BPT as soon as an entry is created in Log Error table?
Application Type
Reactive

Hi,

I want to send an email whenever an exception is raised in the application. For this, I want to run a BPT. As per my knowledge, an entry is created in Log Error table whenever an exception is raised. So, my idea is to launch BPT on the create action of Log Error table so that I can access the current exception and trigger an email. 

Let me know if the logic I am trying to implement is possible by anyway or is there any another method that I can use.

Thank you !

I'd say you'd create a BPT with the starting condition being a creation in that table. But it seems the table is internal. If this is the case you can't do this easily.

You can trigger a BPT manually whenever you have a catch exception, but if you have many places with exception handlers, it will take a while. The Global Exception handler could also be used but to be used in everycase you couldn't handle any exception at all in the code.

So, any other method that can be used for this case?

Hello,

You do have access to the error logs from your apps by using the "Log_Error" entity available in the "PlatformLogs" extension, as shown below. However, it's not possible to trigger a BPT process when a record is created in this table. 

What you could maybe do instead is to create a timer that runs, for instance, every 5 minutes and checks if new records were created in that table in the past 5 minutes. If yes, you can then launch your BPT process or maybe even send the emails from the timer itself.

Thanks, I have already implemented for 5 minutes. I was looking for a way to trigger an email for every entry as soon as it is created.

Hi Ibtesam Shaikh, 

Once you will perform a single action in an automatic activity(send email ) , consider to use LBPT 

Check out here how to use

https://success.outsystems.com/documentation/11/developing_an_application/use_processes_bpt/design_scalable_database_queueing_using_light_processes/

more info about LBPT

https://www.outsystems.com/blog/posts/light-bpt/

Hope that it helps you 

Thanks, will check.

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