Can we get more information about this and examples of the behavior impacted? How it worked before the change and now, after?
For added context, here was the update message:
Workflow engine improvements: when the condition evaluates to no, other properties arenât calculated.
I think this means that if you have a condition on a workflow/step in a workflow, that it evaluates each item in a sequence. (For example, say you have a workflow with the following, two part, condition âWhen current user is logged in is yes and current userâs is_admin is noâ. If the first part of the statement is false (ie. current user is not logged in, then Bubble would not bother with evaluating the second part).
Regardless, Iâd also be interested in hearing more from the @Bubble team. (As well, based on my interpretation, if this only impacts run mode or if this has any impact on step-by-step mode).
What the change means is that before, when you had an action with a condition (âcurrent user is logged inâ), even if the condition was true (the user wasnât logged in), the properties of the action were still evaluated, which was could use some time and capacity.
From now on, the properties used to run the action will only be calculated if the condition evaluates to yes. For most workflows that wonât make a difference, but for long workflows with a lot of condition, things should be faster.
This is nice. @emmanuel it also means that API calls are no longer invoked for the step with a false condition?
There is no difference between regular workflows and API events.
For API events, if the condition on the event isnât met, the workflow wonât run at all, if a specific action in a workflow has a condition that evaluates to no, the actionâs properties wonât be evaluated any more, and execution will go to the next action.
Thanks for the further explanation @emmanuel.
I meant to ask about API Connector calls inside the properties on a workflow step, I assume these are also not run now, with a false step condition?
Yes thatâs right
Does the order of the conditions matter?
I mean, if you have 2 conditions, if the first condition evaluates to No, are the rest of the conditions evaluated at all?
This would be important for performance reasons, as itâd be better to put certain conditions at the beginning in the When clause.
Thanks.
@miguel - Did you get an answer? Pig-pile. We have the same question here: Idea: It'd be helpful to be able to re-order logic within conditions on actions
Hi. Unfortunately I got no response. Looking forward to somebody from @Bubble telling us something about itâŚ
Generally speaking, for an action to pass, all conditions have to evaluate to yes, so order doesnât matter. With that said, when an action condition fails, because some condition within evaluated to no, order might matter, because the rest of the conditions after the no wonât be evaluated, which could save some time and capacity.