task

fun <T> task(id: String, definition: Class<out Task>): TaskRef<T>

Creates a task in this group, registers it with the Dag, and hands back its handle.

Return

The handle representing this task.

Parameters

id

Task ID within this group; the task's ID is <group ID>.<id>.

definition

Class that implements Task. Must have a public no-arg constructor.

Throws

if the Dag already has a task or task group with the resulting ID.


fun task(id: String, trigger: TriggerDagRun): TaskRef<Void>

Declares a task in this group that starts a run of another Dag, as DagDef.task does for the Dag.

Return

The handle representing this task.

Parameters

id

Task ID within this group; the task's ID is <group ID>.<id>.

trigger

What to trigger, and how.

Throws

if the Dag already has a task or task group with the resulting ID.