What is the exact rules around workflows running in sequence?

From the documentation:

Custom events run in sequence, not parallel. If Workflow 1 triggers a custom event that starts Workflow 2, Workflow 2 will complete before the remaining actions in Workflow 1 run.

I’m wondering if this is absolutely true.

For example, imagine a backend workflow (Custom Event) set up like this:

Custom Event Foo

  1. Step 1: Trigger Custom Event Bar
  2. Step 2: Trigger Custom Event Baz

And let’s assume that Bar triggers three other custom events, which each trigger two events, which each trigger a daisy-chain of three more custom events.

Is it absolutely guaranteed that Bar, as well as all of the custom events triggered by Bar and its descendants will all finish before Baz starts?

Does setting up return values and using “Result of step X’s return value”? Does that depend on whether the return value is conditional or if it simply returns a non-dynamic value unconditionally?

Hey Brenton, here is response from official Bubble support regarding order of operations: Order of Operation - #2 by aschofer

Have you tried to test this?

1 Like

That looks to be a verbatim copy of the documentation I referenced.

No, it’s not.

I’ve had several experiences that proved the opposite. Especially when any of the actions after that custom event are exclusively handled by the backend, such as “Create a Thing.” Many times, this type of action was executed before the completion of the Custom Event that was placed earlier in the main workflow sequence.

The only way I’ve found to ensure the sequential execution of all steps is to condition the execution of the next step on the result of the previous one.

2 Likes

True, this is what I also noticed on the backend..

1 Like