127
Views
3
Comments
What are the Best Practices for running business processes within Timers?

I would like to run a business process with withing a timer in order to speed up the automated process. What are the best practices for achieving this? Is it okay for me to run business processes within timers?

2021-10-09 07-57-44
Stefan Weber
 
MVP

Hi,

there are two ways to offload processing into processes. The first one is to use Launch<Process> action provided by the process itself. This instantiates a full process instance.

The second option is to use Light Processes (Light BPT). Light Processes must be activated on the module configuration in service center holding the actual process and must only contain one automatic activity. Light Processes can only be initiated by an entity create event. So to trigger that from a timer you would have to create e.g. a JobQueue entity with all the details to run the process and in your timer you create records for each instance to run. 

If you haven't done already i recommend to take the Asynchronous Capabilities Guided Path from the Learning section to get all the details about processes and Light processes https://www.outsystems.com/training/paths/22/asynchronous-capabilities-in-outsystems/

Best

Stefan

2024-09-12 15-12-50
Munyaradzi Kandoro

Hi Stefan, thank you very much for your assistance.  We implemented something along the lines of what you mentioned. We have a timer and in that timer, we have a table that acts as a "JobQueue" and we are iterating it and launching the business process. However, we are facing timeout issues.

2021-10-09 07-57-44
Stefan Weber
 
MVP

If i read it correctly you should do it the other way around. The timer just fills the jobqueue and the process "listens" to the CreateJobQueue entries.

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