Skip to main content
Branching in WorkflowDog is data-driven. Conditions produce Boolean values, and control actions either choose a value or emit data along one path.

Choose a value or choose a path

The two basic patterns look similar on the canvas but behave differently:
Choose Value receives If True, If False, and a Boolean Condition, then emits exactly one value through Result.Both candidate inputs are dependencies of the action. Use this when the upstream values are already available and only the selected result matters downstream.
If both branches ultimately feed the same action, choose a value first and connect one result. If the branches perform different work, route the value.

Build conditions

Logic actions turn comparisons and checks into Boolean values: Strict equality makes type conversions important. The number 1 and the string "1" are different values. Convert first when data from an external system represents numbers or booleans as text.

Route by case

Choose Value by Case maps text keys to values. It is useful for statuses, categories, event types, or any branch with more than two outcomes.
1

Connect the case

Connect the text to compare, such as priority or event_type.
2

Add cases

Add one key and value for each recognized case.
3

Set a default

Provide Default for everything not listed. Without a default, an unmatched case returns null.
4

Use the result

Connect Result to the common downstream action.
Case keys are exact and case-sensitive. "High" and "high" are separate cases.
Choose Value by Case selects data; it does not create multiple execution outputs. To run different actions, compare the case and use Route Value, or add a Conditional meta control to each branch.

Supply fallback values

Fallback evaluates candidates in their configured order and returns the first one that qualifies:
  • Non-Null skips null values but keeps other values, including false, 0, and an empty string.
  • Truthy skips every falsy value.
Use Non-Null for optional fields where false or 0 is meaningful. Use Truthy only when those values should also fall through.

Gate one action

When a separate branch node would add noise, enable the Conditional meta control on the action. Connect a Boolean condition to the new Condition input. The action runs only when the value is truthy. This is particularly useful for optional side effects:
If the condition is false, the action is not attempted and its ordinary outputs emit no signal. Downstream nodes that depend on those outputs will also be skipped unless another path supplies their inputs. See Meta Controls for status outputs that report whether a gated action was attempted or succeeded.

Avoid ambiguous branches

  • Name the condition in a nearby Comment, especially when true and false are not self-explanatory.
  • Normalize text before exact comparisons when capitalization or whitespace comes from users.
  • Prefer one clear multi-case mapping over a long chain of nested binary choices.
  • Preserve false and 0 with a non-null fallback when they are valid business values.
  • Test both selected and unselected paths. A skipped node is different from a node that ran and returned null.