Gian, I’m with you but you’re wasting your time. As it is, only a tiny fraction of Bubble apps have backend workflows, and the ones that do usually have a handful of simple processes or API calls. Even @georgecollier, based on his post above, seems not to have too many back-end WFs with complex series of actions.
If you search for issues related to race conditions or queues, the lack of discussion on the topics makes you think Bubble is built on a noSQL DB like Mongo. (I’ve also yet to find a queue dataset or anything similar in over 15k bubble DBs).
And clearly Bubble has decided its only chance of survival is as a front-end/mobile app setup (decided?
or perhaps created the situation with its whole WU costs shenanigans?) and certainly isn’t going to make any significant back-end updates other than those that close the loop on some of its ginormous tech debt (e.g., removing the old WF view).
Be that as it may, just like race conditions, the only way to build an error-proof back-end, given the server timeouts, outages, and random termination of WFs due to recursion (No Bubble, my hourly access token update from FedEx is not an infinite recurring WF!!, it’s an hourly call intentionally planned) is to build in queues or error checks on a series of conditions (and not hold your breath on Bubble creating a solution).
Thankfully, with custom events serving as global states, it’s a lot easier than it used to be.
The basic gist is to do the series of actions (“actions” you need without saving them to the DB (assuming you need prior data if there’s a failure within the actions) and then at the end of the actions, update the record and indicate that the actions successfully completed (very use case specific how you want to go about doing that, whether as a field or within a Q, etc).
Then, using a separate WF, either as part of a Q or just an error check for that single series of actions or an error check for an entire batch of actions (if Bubble goes down for a few mins+, the single error check will probably have been cancelled as it would have run in the past), check if the actions properly completed. If they did, then great, and if they didn’t, rerun the actions…