Is the debugger reliable for showing the order of actions?

Hi there

I have an admin page showing a list of users in an rg:

The rg contains a button ‘Edit user’ which shows an ‘edit user’ popup group (the popup group receives the User data from the current cell of the rg):

My intention is for an admin user to be able to amend the User’s details and click ‘Save changes’ to close the popup and change the edited User’s details in the db:

Clicking ‘Save changes’ triggers a workflow with the following actions:

  1. Change the User’s email [Parent group’s User’s email] to the email input in the ‘edit user’ popup [user email’s value] - ‘Only when’ the email in the popup is different from the User’s email (i.e. user email’s value is not parent group’s User’s email];
  2. Change the User’s first name [Parent group’s User’s first name] to the input in the ‘edit user’ popup [user first name’s value] - ‘Only when’ the first name in the popup is different from the User’s first name (i.e. user first name’s value is not parent group’s User’s first name];
  3. Same as 2, except for last name; and
  4. Close the ‘edit user’ popup.

In the debugger, the behavior I’m expecting upon clicking ‘Save changes’ is: * joe@someone.com [Parent group’s User’s email] is not jane@person.com [user email’s value] and therefore the ‘Only when’ constraint is green.

However, the behavior I’m getting is that as soon as I click ‘Save changes’, [Parent group’s User’s email] is being immediately set to ‘jane@person.com’ [user email’s value] before the ‘Change an email for another user’ action has even been triggered (you can see in the ‘edit user’ popup’s heading that the email has changed):

Then, when moving ahead to the ‘Change an email for another user’ action in the debugger, the ‘Only when’ constraint is showing as red because it is comparing the new ‘jane@person.com’ [Parent group’s User’s email] to ‘jane@person.com’ [user email’s value]:

I’ve read in the bubble.is manual that “When an event is triggered in run mode, it runs a series of actions, as defined in the Workflow Tab of your app for the current page. The execution happens action-by-action.”. I’ve read in the forum that you can’t count on Bubble to run Workflows in the order of actions: Not obvious behavior in the workflow with database operations and Actions in workflow running out of order.

Is my workflow working correctly, but showing up in the wrong order in the debugger? Or is there something wrong with my workflow?

Many thanks (I’m about 1 week into Bubble so appreciate all the fantastic forum posts that have gotten me this far).
Travis

I have seen the same behavior often: The conditions for the individuel steps are shown as if the whole workflow has already been run, but the actions still run correctly.

So as long as your results are as expected, you should be good to go.

Generally speaking, if you want to make sure that action 1 is run after action 2, you have to use “result of action 1” in the conditions of action 2. Otherwise, Bubble tries to speed things up and the order might be another.

1 Like

Thanks @reger-alexander

That’s too bad the debugger can be misleading, but glad you’ve seen that behavior before.