Forum Academy Marketplace Showcase Pricing Features

API Workflows on a List

Hi!

Apologies in advance if this has obvious answers, but I have two questions about the way Bubble processes the invocation of a workflow on a list:

I understand that the step in a base workflow that schedules the running of an API workflow does not wait for it to complete. (In my mind, I see the step of scheduling a workflow having the same impact that the “&” works at the end of a command line in a Unix shell plus the ability to say when to run it.)

Assume that I have a workflow, let’s call it WF-A, that’s triggered by pressing a submit button. WF-A has a few steps. Step 1 in WF-A schedules another workflow (let’s call it WF-1) to run 10 minutes after the process a list of things. Step 2 in WF-A schedules another workflow (let’s call it WF-2) to run also 10 minutes later.

Q1: When is the list passed to the “background” workflows (WF-1 and WF-2) created? Is it when I schedule the workflow or when it wakes up for execution?

Q2: How “locked” is the list of things passed to a background workflow? Does Bubble take a snapshot of all the records that s/b processed by the workflow and locks them so no one else could be modifying them, or “figures it all out as it goes”? If the latter, if another workflow or a user is changing the values of the things that were selected to be processed by a background workflow, can the results be unpredictable?

Many thanks in advance,

Alex

1 Like

Yes, I too am interested in knowing this. I have a workflow that schedules an API on a list of things. Following that, I have another workflow set to trigger an API on the newly processed data. However what happens is the workflow to trigger the second API call get trigger BEFORE the data is processed.

how can I make it so that the second workflow triggers after the api call on the list has finished processing?

Hello folks,
Can you shed some light on how does this work?

Many thanks,

Alex

We cannot guarantee the timing here, as it’s shown in he property editor. For stability reasons, runs may be spread out. If you need something to happen after something it should be put on the same workflow ideally.

Yes, I understand that this is how the scheduled API workflow works. Can you also take a look into the first post in this thread (April 18) and give me your thoughts?

Many thanks!!!

Yes, the list is created at scheduling time and frozen then.

Excellent. Many thanks!