I’m new to bubble and the fact that the actions in workflow don’t run in order is a bit annoying for me. Can someone verify if this would work or not?
Theory:
Say for example you wanted action 4 to run after action 3, you could use an "Only when: Result of step 3’s [insert any piece of data used in step 3] is empty :find and replace (replace both the yes and no value with the same value e.g. abc so that it will always equal abc) is abc
This will mean that step 4 would have to wait for step 3 to occur but the only when will always be true so the step will always run.
Note: it would only work when “Result of step 3” is available as an option
It is my understanding that actions within a workflow will run in order much the same as a procedural language (Step 1, 2, 3 etc.). Notwithstanding APIs & scheduled workflows which run asynchronously.
Triggered custom workflows behave like a procedural “GoSub” and execute step by step also. Hence the action after the Trigger will not execute until all the actions within the “called” workflow complete. BUT, actions in different workflows can be asynchronous. Such is the case if you have two events that both trigger. Hence you have to be careful about avoiding interdependencies in such cases.
I have found, if you are running the debugger in single step mode, the actions likely have already been executed, unlike other debuggers that are actually truly “single-step”. This gives the illusion that they are not processing sequentially, but they are. (at least this is my understanding).
FYI: I have programmed for 40 years or so using procedural languages so it did take some time to get my head wrapped around the asynchronous nature of Bubble and I still get caught at times. But, it is actually very useful.
You can get lucky with the order of operations, but you should keep doing the “result of step _” trick (“result of previous step is not empty” should work most of the time, as long as it is a step that always runs) or break your workflow into different custom events to be safest.