Skip to content

Flow builder: pick the target node per branch in the Decision Branches editor #1942

Description

@os-zhuang

Problem

Decision routing is authored in two disconnected places: the Branches editor on the decision node defines each branch (label + CEL expression), while the target (which node a branch routes to) is bound separately on the canvas / in FlowEdgeInspector (the per-edge Branch picker added in #1930). There's no single place to say "branch X → node Y".

Proposal

Add a Target column to the decision Branches editor: for each branch, a node-reference dropdown picking the downstream node. Selecting it creates / updates the matching out-edge with the branch's condition + label (or marks isDefault for a true/empty branch). This mirrors Salesforce Flow Decision Outcomes (each outcome = label + condition + connector), and lets a business user define the whole decision — conditions and destinations — in one table.

Complements #1930 (which made the binding explicit on the edge side); this completes it on the node side, which is the more intuitive entry point.

Acceptance criteria

  • The Decision Branches editor shows a Target column (node picker scoped to this flow's nodes).
  • Choosing a target creates the out-edge if missing, or updates the existing one, carrying the branch's condition/label/default.
  • Stays consistent with the FlowEdgeInspector Branch picker (feat(studio/flow): context-aware Start trigger fields + explicit decision-branch binding #1930) — editing in either place round-trips.
  • Clearing a target detaches (does not silently delete a node).
  • Unit tests for the branch→edge reconciliation.

Pointers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions