Running a workflow while 1st workflow still running

What happens when a user clicks a button which runs a workflow while a previous workflow is still running?

Does bubble wait for the 1st workflow to finish before starting the 2nd workflow, or it lets the 2nd workflow run while the 1st continues?

This has an important implication on my architecture, because i have a workflow B which depends on the results of a workflow A, (2 separate buttons on the page), but workflow A takes a few seconds to complete since it has a lot of actions, and a user might hit workflow B meanwhile.

I think it will run the workflows sequentially, but I’m not 100% positive. If it’s a big concern, you could have the button for Workflow B disabled until the final step of Workflow A as an added precaution.

how do i express “disable while workflow x runs” in bubble language?

I would do this:

  1. In Workflow A, the first action is to disable Button B
  2. In Workflow A, the last action is to enable Button B

That way, whenever someone tries to click Button B, they can only do so if Workflow A has finished

Nice!

there’s no action to disable a button, i guess you meant creating a custom state etc.

Right, using the custom state.