ConditionRef

A condition registered with a Dag: name the task each outcome runs.

dag.If(HasRows.class).Then(load).Else(reportEmpty);

A named task runs after the condition, so naming it records that edge, as Deps.Flow.before would. The condition skips only the side not taken; what runs after both sides needs a trigger rule that tolerates one skipped upstream, such as none_failed_min_one_success.

See also

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val id: String

Airflow task ID of the deciding task.

Functions

Link copied to clipboard
open override fun after(vararg previous: Deps.Flow): ConditionRef

Runs the tasks here after each of previous, carrying no value.

Link copied to clipboard
open override fun before(vararg next: Deps.Flow): ConditionRef

Runs the tasks here before each of next, carrying no value.

Link copied to clipboard
fun config(key: String, value: Any?): ConditionRef

Sets one task-level configuration value on the deciding task.

Link copied to clipboard
fun Else(task: TaskRef<*>): ConditionRef

Names the task that runs when the condition does not hold. A condition needs no Else; without one, nothing is skipped when it holds.

Link copied to clipboard
open fun endpoints(): List<Endpoint>

The ends an edge drawn here attaches to. A task stands for itself, so the default is nodes; a task group stands for the group rather than for the tasks it holds today.

Link copied to clipboard
open override fun nodes(): List<TaskDef>

The tasks at this point in the flow.

Link copied to clipboard
fun Then(task: TaskRef<*>): ConditionRef

Names the task that runs when the condition holds.