Skip to main content

Start and manage workflow runs

This guide shows how to start a workflow run, pass inputs, monitor progress, cancel a run, and delete one that has ended. A run is billed for the compute its tasks hold and for its shared workspace; see How billing works.

Prerequisites​

Your email must be verified, and the account's billing status must be Active, before you can start a run; a status other than Active also ends runs already started. See Billing statuses if runs fail to start with a billing-related error or end with a billing reason.

A start also fails while the account is at its limit on runs in progress, or when the workflow uses a compute type the platform does not offer or needs more tasks running at once than the account may run. The error names the limit; see Limits and quotas.

Start a run​

With the CLI:

swale workflow run start \
--project-name my-project \
--workflow-id <workflow-id>

swale workflow list --project-name my-project shows each workflow's ID. The command prints Workflow run started. Run ID: followed by the new run's ID.

Pass inputs:

swale workflow run start \
--project-name my-project \
--workflow-id <workflow-id> \
--input bucket=my-bucket \
--input mode=fast

Use --input key=value (short: -i key=value) for each input. Inputs you leave out take the workflow's defaults, so a workflow whose inputs all have defaults or are optional starts with no --input at all. swale workflow get lists a workflow's inputs with their defaults. A required input with no default that you leave out is prompted for in a terminal, and fails the start without one, such as in a CI job; see Prompts.

In the UI:

  1. Open the project, go to its Workflows page, and click the workflow.
  2. Click Start New Run. If your email is not verified or billing is not Active, a dialog says what to fix instead of opening the form.
  3. Fill in any inputs in the form.
  4. Click Start. If the account is at its limit on runs in progress, the form stays open and shows the error.

List runs​

In the UI: open the project, go to its Workflows page, and click the workflow. The workflow's page lists its runs.

With the CLI:

swale workflow run list \
--project-name my-project \
--workflow-id <workflow-id>

The list shows each run's ID, status, who started it, its start time and its duration.

List tasks in a run​

swale workflow run task list \
--project-name my-project \
--workflow-id <workflow-id> \
--run-id <run-id>

The list shows each task's ID, its key from your workflow definition, its name and its status.

Monitor run status​

In the UI, open a run. Its Run Details page shows:

  • The run's status, who started it, its start time and duration, its billed time once its billing is final, and the reason a failed or canceled run ended
  • The Workflow Graph, showing each task and its live status, with edges for each task's start_on and terminate_on dependencies
  • The Tasks card, listing every task with its status badge (Pending, Starting, Running, Cancelling, Finishing, Complete, Failed, Canceled), the tasks inside an if or for_each task indented under it

Run and task lifecycle describes each status.

Cancel a run​

In the UI:

  1. Open the run.
  2. Click Cancel Run, then click Yes, Cancel Run to confirm. The button appears only while the run is Pending, Starting or Running.
note

Canceling a run is a UI-only operation. There is no CLI equivalent.

The run shows Cancelling while its tasks are stopped, then Finishing while its resources are released, then Canceled. A task that had already finished keeps its outcome. What canceling does to each task, and to billing, is in Canceling a run.

Delete a run​

A run can be deleted once it has ended Complete, Failed or Canceled. Deleting a run cannot be undone.

  1. Open the run.
  2. Click Delete Run, then click Yes, Delete Run to confirm.
note

Deleting a run is a UI-only operation. There is no CLI equivalent.

Next steps​