I am having a scheduled event microflow which idealy should trigger after 30 min interval. But it is taking 75 mins per each cycle, due to which next cycles goes into pending mode. I dont want to skip any cycle as well. How Task queue can benifit me in this situation

0
I am having a scheduled event microflow which idealy should trigger after 30 min interval. But it is taking 75 mins per each cycle, due to which next cycles goes into pending mode. I don't want to skip any cycle as well.In this MF, I retrieve 1000 lots, then I am having an sub MF where I iterate each lot and then process that lot, it takes too much time to process each lot after iterating. Is there any way where I can have two iterators/loops which can work parallely or can task queue will help. Need a detailed way to implement this.
asked
2 answers
0

A couple of options to explore

- Looking into a queue mechanisme is very useful.

- Try not to loop over the entire amount of lots, but use batches

- Look into other performance improvements

- Use different transactions (community commons)

- In your process store an attribute that holds when the entire process has finished and in your SE microflow check if this is between the currentdatetime and the previous start time. If not, skip this cycle (otherwise it keeps piling up..)

answered
0

you can enhance this by implement these steps, the first one is to use the batches, and the second one to use the task queue on the sub MF.basically if you use the task queue in your MF, the retrieved record (which is 1000 record in your case) will split and each thread in the task queue will hold a number of record, so if we create a task queue with 2 threads, each thread will take 500 record and proceeded it in parallel.

answered