Forum Academy Marketplace Showcase Pricing Features

Workflows and sequence of actions

Hello all !

I am struggling on a sequence issue with one of my workflow (see the screenshot attached).

My issue is that whatever I try (events, no events, conditions on events, conditions on actions of the workflow), the event at step 4 is always executed before the event triggered at step 3 and this is messing up my workflow.

I watched a video from bubble officials that said that if there is an event in a workflow, all actions after that event will wait for the event to be finished. But in my case that is not true.

My Workflow is simple, what I want to do is:
IF User is already attached to a specific thing THEN display a message ELSE attach it to this thing.

I tried at the beginning to have both actions in the same linear workflow but somehow the “attach” action was executed before and the “display” message action was always executed… whatever the conditions that were on the actions.

Thank you for your ideas :slight_smile:

the event at step 4 is always executed before the event triggered at step 3 and this is messing up my workflow.

How do you know step 4 is triggering before step 3?

IF User is already attached to a specific thing THEN display a message ELSE attach it to this thing.

Why aren’t you using any only when conditions on the workflow actions for this then?

There’s not a lot of info to go on here. What exactly are the two custom events doing? (some screenshots would be helpful).

Event in step 3 just displays a message in one visual alert, event in step 4 adds a thing (vendor) to another thing list (mandate).

I know that step 4 is triggered before step 3 because I have a text on my app that displays the content of the list dynamically and I see that way before the debugger comes to event 3 the element has already been added to the list so the condition for step 3 is always valid .

At the beginning I had that in the same workflow:

  • Step 3: trigger event when list contains my element vendor
  • Step 4: Trigger event when list doesn’t contains my element vendor

But step 4 was always done before step 3 anyways.

Like Adam said, you need a condition on each custom workflow.

On step 3, only when mandate’s vendor is current user or something along those lines,

And on step 4, only when mandate’s vendor is empty

At the beginning I had all the actions in one workflow with on each either one of those conditions:

  • Lists contains vendor
  • List doesn’t contains vendor

But with all actions serialized the actions on database were always done first so “list contains vendor” was always true.

Then I added the events because in the official Bubble video (Understanding Workflow Execution Rules | Bubble Quick Tip - YouTube) they say “if you run a custom event in step 2 of your workflow, all remaining actions will wait until the entire custom event workflow is completed” → which I thought was perfect for me :slight_smile:

Capture d’écran 2023-05-03 à 15.47.10
Capture d’écran 2023-05-03 à 15.47.14

Furthermore in my history of actions on front end I can see that (below)
which is the direct result of that step

but the other actions before I never see them ! (i added on purpose some fake actions like hiding some random group on the same page)

I am lost

It’s so trivial what I want to do but I don’t get it… I the user you try to add to the mandate already is in the mandate you display an error message. If it’s not in it then you add it.

I also tried to do these steps : 1) display error message if user exists → 2) terminate workflow if user exists → 3) add vendor if user doesn’t exists but it was the same ----> if the user doesn’t exist, it is added then I still get the error message from previous steps in the workflow :scream_cat:

Just saw that this guy describes exactly the same issue with different words :slight_smile:

You can’t really use the debugger for checking the order of workflow actions…

I think the workflow steps are running in the correct order here, you’re just misinterpreting what’s happening.

But without further investigation it’s impossible to say what’s going on just from a few screenshots.

Feel free to share an editor link if you want someone to take a deeper look.

@jerem.keajy I can confirm that I’m noticing some weird sequencing stuff happening in my app (at least according to the debugger).

Did you managed to get any more insights as to what’s happening here, within the last week?

Can you expand on this?

I have a workflow with 10 steps and am having sequencing issues… I used the debugger hoping to force sequence at least to see if my logic was correct and I just needed to address sequencing, but in the debugger I’m paused on Step 3 and I looking at my database I can see Step 10 has already run…

What’s the point of having ‘Run next’ in the debugger if you can’t even use it to isolate and control when each step is run…

I even added 4x 10 second pauses at the places I am having issues, and even then my later steps still seem to be running before the 10 seconds is up (doesn’t matter whether I am in debugger or not…)

The debugger won’t help much here - it doesn’t give a real-time representation of workflow actions - most of the actions seems to trigger in more or less real-time, even when the debugger is in step-by-step mode, so then it just steps through the actions even though most of them have actually already happened - so things like conditions (which have already been evaluated in reality) will show up completely wrong in the debugger.

And pauses only apply to client-side actions, so they are no good for slowing down server side actions in workflows.

1 Like

wow… is there a technical reason why this is or just an underdone feature?

You’d have to ask Bubble about that.

1 Like


Sorry I had my message blocked in my drafts apparently !!

So, I created a support ticket but didn’t get so much help. After copying my app in a local environment, they observed that my guess was correct, second event is triggered before the first event. They recommended me what’s already in the official video, using pause action or try to change my design. I already tested all of those things before going to the support of course. So I removed that part of my feature and I moved to another job.

Even synchronizing through custom states or sequence of events doesn’t change a thing, event 2 always gets triggered first somehow. Unfortunately I encountered the same issue in a different context few weeks later. The way events and workflows are synchronized are somehow not glueing up with the official videos.

Sorry for not being of big help there :confused:

1 Like

Did you ever find a solution to this, @jerem.keajy?