Does the Go to Page action terminate any following actions?

@Bubble

Does the Go to Page action terminate subsequent actions?

I have a 3 “Go to Page” actions in a row each that will conditionally run. If the first “Go to Page” action is TRUE and runs, does bubble still evaluate the conditions on the subsequent “Go to Page” actions?

Currently…
WF: Go To Page # 1 (if X = true) -> Go To Page # 2 (if Y = true) -> Go To Page # 3 (if Z = true)

I’d like navigation to a new page to be snappy, so I’m thinking if bubble still continues to evaluate subsequent actions, it would improve performance to add a “terminate workflow” between the “Go to Page” actions.

Worth doing?..
WF: Go To Page # 1 (if X = true) & Terminate else -> Go To Page # 2 (if Y = true) & Terminate else -> Go To Page # 3 (if Z = true)

I don’t usually do people’s work for them, but I know how confusing bubble is, sometimes.

From bubble’s reference manual: https://bubble.io/reference#Workflow

answer?

1 Like

Yes. Once you navigate, you’re done on the page.

All workflow actions are dependant on remaining on the same page they were started from.

The only exception are those workflow actions that are contained in a scheduled workflow API that will run at the scheduled time no matter what. However, scheduling that very same workflow API action is page dependant.

Hey Whitney…I think Bubble will complain if the go to page action is anything but that last action of workflow, no?

@mebeingken - You’re right bubble complains if Go to Page is not the last action in the WF. This is true, except if there is a condition on the Go to Page action.

I think I have the answer… Say Step1 = False, Step2 = True, bubble isn’t evaluating steps 3 & 4, so adding a “terminate workflow” after each Go to Page action isn’t necessary as it’s already current behavior. (…Dang, always looking for performance hacks these days.)

I built a test and ran the debugger. Step 1 evaluates as false & Step 2 evaluates as true and runs. Step 2 evaluates to True. Steps 3&4 are not evaluated when in debug mode. I’m also assuming Bubble has logic that runs these actions sequentially which may not be true.

1 Like

Not evaluated or not run?

Steps 3&4 are not evaluated (in debug mode at least)

None of this is a surprise, right? WHEN THE USER LEAVES THE PAGE, the page is gone. No more code to execute.

It’s totally dumb that the Bubble Issue Checker forces navigate actions to the end of a workflow. It’s like, “No shit, issue checker. I’m sending the user somewhere else. We get that we are now done with the page, bro. No need to treat me like a ding dong.”

Sorry to insist. Do you mean that even if step 2 condition was evaluated to true the workflow continued running steps 3 and 4 but not executing as their conditions did not evaluate? That is not what I would expect.

Maybe it’s just how we are using terms?

Workflow actions are ran and their conditions are evaluated.

Nope. I’m saying that if Step 2 (a go to page action) is true, that bubble does NOT evaluate the subsequent actions; it evaluates Step 1 (false), evaluates Step 2 (true); then executes Step 2. If Step 3 were also true, it won’t matter because bubble isn’t evaluating Step 3 or 4. The workflow is effectively terminated at Step 2.

In summary, adding “terminate a workflow” action after each step, won’t help speed page transitions because bubble is effectively terminating the workflow when it hits a “Go to page action” that evaluates = TRUE.

Then yes it behaves as expected. I was just getting mixed up with the term evaluate. I use it only to refer to conditions. Thanks for taking the time to clarify :slight_smile:

I don’t know if something changed or not but “Go to page” allows subsequent actions to be run in that same workflow.