How to make an asynchronous scheduled workflow, batching operations

Hi there!

I'm pretty new to retool, and I'm struggling to setting up a scheduled workflow, which have to iterate over a large amount of data and batch operations.

According to the documentation, asynchronous workflows have up to 30h to succeed, while synchronous workflow have up to 15 minutes

So I made a workflow which is getting the count of entities and then pass it to a function which iterate entities by 200 and await the resolution of the current set operations before to pass to the next iteration

I thought it would ends up in an asynchronous workflow, since the execute bloc resolve immediatly and the logic is executed in another process

So to test it, i setted an await promise résolution with a settimeout of ~17 minute in the called function (to check if my worflow would be timedout)

And the worflow is timedout while every blocs were executed quickly as expected

So the workflow isn't considered asynchronous at all

What am i missing in my implementation?

Is it possible to set an asynchronous scheduled workflow?

What I tried:

-Set a responseBloc before the js bloc in the chain, but the workflow is still timedout after 15 minutes while response block is executed immediatly

-Even if it's not adapted to my case, I tried to make a parallel process as explained here for a webhook implementation, but the workflow is still timedout after 15 minutes

Hi Thibault,

Thanks for reaching out! I was able to reproduce the timeout you saw when manually triggering the workflow, but it worked when I triggered it via webhook. I think there is a limitation on how the workflow is run via the IDE that is capped at 15 minutes. I would test via webhook or scheduling, and it should meet the documented asynchronous runtime. Let me know if that works!

Hi @Thibault_Cabanes, just wanted to follow up and see if you got your workflow working.