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.
AI-Generated Flows
Generate flows from prompts.
Flow Editor Components
Details on the flow editor's major components.
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.