Skip to main content

Flow editor

Windmill's Flow editor allows you to build flows with a low-code builder.

Workflows are graphs (DAG) that represent job specifications. A workflow engine is a distributed system that takes a workflow and orchestrates it to completion on workers while respecting among others all the dependency constraints of each job. There exists a great variety of workflows and many software are domain-specific workflow engines and workflow specs (if you are a software engineer, you probably already wrote one without realizing it).

The goal of an orchestrator or workflow engine is to execute the steps on different workers that respect that graph's dependencies, and pass the required data defined in the steps' inputs while applying parallelism when possible.

In Windmill, each step is code with a main function in TypeScript, Python, Go, PHP, Bash or raw queries to databases. The result of a flow is the result of the last step executed, unless error was returned before or Early return is set.


Another approach is to write a program that defines the jobs and their dependencies, and then execute that program. This is known as workflows as code.

The Flow editor has the following features which are the subject of specific pages:

Triggering flows
Trigger flows on-demand, by schedule or on external events.
Testing flows
Iterate quickly and get control on your flow testing.
Flow editor components
Details on the flow editor's major components.
AI-generated flows
Generate flows from prompts.
Error handling in flows
There are four ways to handle errors in Windmill flows.
Branches
Split the execution of the flow based on a condition.
For loops
Iterate a series of tasks.
While loops
While loops execute a sequence of code indefinitely until the user cancels or a step set to Early Stop stops.
Error handler
Configure a script to handle errors.
Trigger scripts
Trigger scripts are designed to pull data from an external source and return all of the new items since the last run, without resorting to external webhooks.
Retries
Re-try a step in case of error.
Concurrency limits
The Concurrency limit feature allows you to define concurrency limits for scripts and inline scripts within flows.
Custom timeout for step
If the execution takes longer than the time limit, the execution of the step will be interrupted.
Priority for steps
Prioritize a flow step in the execution queue.
Lifetime / Delete after use
The logs, arguments and results of this flow step will be completely deleted from Windmill once the flow is complete.
Cache for steps
Re-use a step's previous results.
Early stop / Break
Stop early a flow based on a step's result.
Early return
Define a node at which the flow will return at for sync endpoints. The rest of the flow will continue asynchronously.
Suspend & Approval / Prompts
Suspend a flow until specific event(s) are received, such as approvals or cancellations.
Sleep / Delays in flows
Executions within a flow can be suspended for a given time.
Step mocking
When a step is mocked, it will immediately return the mocked value without performing any computation.

Example of a flow

Example of a flow in Windmill.