on
Labels each edge that a call to Deps.Flow.before or Deps.Flow.after draws between the call's receiver and first or one of rest.
Each edge of a fan-out can therefore carry its own label, and one label can go on several edges:
checked.before(Label.of("rows found").on(processed), Label.of("no rows").on(reportEmpty));
// load >> Label("forks") >> [report_empty, report_suspicious]
loaded.before(Label.of("forks").on(reportEmpty, reportSuspicious));Passing a task's handle into another task's arguments declares an edge. Calling Then, Else or Case also declares an edge. To label one of those edges, declare it again with a label. Declaring an edge again only applies the label. A new label replaces the label the edge had, as Python's DAG.set_edge_info does. Declaring the edge again without a label keeps its label.
When an edge goes to or from a task group, the UI draws it to or from the group's own node and shows the label there. A label never changes which tasks an edge connects. Python's Label can change those tasks. It does so when the end written to the left of the Label is in a task group and the other end is not in that same group. Python then replaces the left end with the group that contains it. For example, if v is in group g and n is in no group, v >> Label("x") >> n draws edges from the last tasks in g instead of from v. In Java, the end that matches this left end is the receiver of Deps.Flow.before or Deps.Flow.after.
Return
A point in the flow to pass to Deps.Flow.before or Deps.Flow.after. Calling Deps.Flow.before or Deps.Flow.after on this point fails, because the label goes on the edges between the receiver of that call and the flows passed to this method.
Parameters
The task, task group, or set of tasks and groups at one end of each edge that gets the label.
More tasks, task groups, or sets, labeled the same way as first.