Switch Ref
A switch registered with a Dag: list the tasks it can choose between.
dag.Switch(PickPath.class).Case(handleLong).Case(handleShort);Content copied to clipboard
A case runs after the switch, so naming it records that edge, as Deps.Flow.before would. The switch chooses exactly one case and skips every other, so a task that runs after several cases needs a trigger rule that tolerates a skipped upstream, such as none_failed_min_one_success.