When condition not applied / empty value of a variable overridden by its previous run

One of my backend workflows has two conditional steps which are meant to be exclusive, based on an input type (option set). I have evidence that the “Only when” conditions are not being applied correctly, with some processes running step 1 when they should be running step 2 and some running both step 1 and 2, which should never happen since they are mutually exclusive.


I’ve converted the workflow in the front-end to debug with the same result:
Even though Step 1 is not supposed to run:

It is still marked as Not empty

Drilling further and after separating the search step (using the FLOW SSA Single plugin) from the Make change one, I see that the workflow rightfully skips the search step specific to Representative when the input type is Holder and the output of this step is empty (correct)

Yet, when trying to return a list of the outputs of Search Representative | Search Holder | Create Account (Representative or Holder), the output of the Search Representative step is magically not empty

I cannot imagine this not being a bug. My hypothesis is that the value is retrieved from the previous run of this sub-workflow (which is called twice by the same parent workflow).

Still waiting for Bubble support to get back to me after sending them a request.

EDIT: I have worked around the issue by adding a filter in the last step that guarantees that the element returned is of the right type. But the bug is still there and probably generating false results in other cases.

For steps one (when type is representative) and two (when type is holder), what respective changes do you make to the account?

I add an element to a list field (which is different depending on the type)

I see you’ve found a workaround so this is all good then. Did you ever get a response from Bubble support?

Yes, I have a workaround that works in this specific case but there might be other cases where there’s no workaround available and, worst of all, I might not even know when the problem is occurring unless I run very advanced tests. Which is why I really wish Bubble would look into it.