Skip to main content
The flow components are the steps that give an execution its shape. Every execution begins at one flow.start, ends at a flow.end, and may jump between steps with a flow.goto. They carry no data and take no provider.

flow.start

The entry point of an execution. Each definition holds exactly one. It has no flow input, so nothing leads to it, and it takes its success route as soon as it runs. A definition with no flow.start fails its check, and so does one with several. A flow.start is never reported as unreachable.
  • `flow.start` component is not found. Execution does not have a starting point
  • More than one `flow.start` component is found. Execution does not have a clear starting point

flow.end

A terminal step. When the execution enters a flow.end, it finishes, and nothing after it runs. It has only a flow input, so it has no routes to configure and no Route table. A flow.end needs no outbound connection.

flow.goto

A jump. A flow.goto passes control to another flow.goto that is not at the end of one of its connections, so a flow can loop back or skip ahead without a line drawn across the editor. One flow.goto marks the spot with a self_alias, and another jumps to it with the same name as its goto_alias.

Connection first

A flow.goto with a connection leaving its flow output follows that connection, whatever its goto_alias says. A goto_alias is read only when nothing leaves the step. The flow.goto it names is entered next, as if a connection led to it, and the execution posts a component.output event, Redirecting to alias "<goto_alias>". A flow.goto that has a self_alias and no goto_alias is a landing point. It is entered by a jump, and then follows its own connection to the steps after it. The same flow.goto may carry both aliases.

When a jump cannot land

A flow.goto that has no connection and no goto_alias posts a component.error event, "goto_alias" input is not specified. One whose goto_alias names no flow.goto posts "goto_alias" value leads nowhere. Either takes the step’s failure route. A flow.goto has no failure route, so the execution fails with Desired route ("failure") is not satisfied in the workflow definition. A flow.goto with neither a goto_alias nor a self_alias fails the definition’s check with Either one of `goto_alias` or `self_alias` must be specified. A flow.goto is never reported for having nowhere to proceed, or for being unreachable, since a jump is how it is reached and left.

Example: retry a step

Corvel Freight books a carrier in a logic.code, which can fail when the carrier’s slot is taken. A flow.goto named Book carrier is the landing point: its self_alias is book_carrier, and its success leads to the booking step. Another flow.goto, Retry booking, has the goto_alias book_carrier and nothing leaving it. The booking step’s failure route leads to Retry booking, which sends the execution back to the landing point. The booking step’s code counts attempts in a data.integer, so the loop ends when it takes success or gives up.
Retry booking has no connection, so it reads its goto_alias. Add a connection to it and the jump is never made.