Case

fun Case(task: TaskRef<*>): SwitchRef

Adds a task this switch can choose. Every other case is skipped when the switch chooses this one.

Return

This switch, for chaining.

Parameters

task

Task of the same Dag.

Throws

if the task belongs to another Dag, is already a case of this switch, triggers a Dag run, or runs the same class as one.