Workflow Engine
The Fontana Workflow Engine
How a data process defined as a graph is executed on the server, how the engine re-runs only what a change affects, and how every published row is traced to its sources.
Technical whitepaper
Iain Craig · November 2026
Executive summary
The Fontana Workflow Engine runs data processes. A workflow is a graph of steps designed in the browser: load a file, clean the columns, check each row, look a value up, total, and write the result out. The engine executes that graph on the server. It determines which steps a change affects and runs only those. It publishes the rows of every step, together with a record of where each value came from and a ticket for each row that failed a check.
The engine is the execution component of Workspaces, the part of Fontana in which a team defines a process once and runs it again whenever the data changes. Fontana is an AI platform with three parts: the Knowledge Graph holds what an organisation knows, the Agent Harness is the runtime in which AI agents work, and Workspaces is where data processes run. This paper describes how a process is executed.
Runs execute on the server
Files, API calls, and document parsing execute on the engine. Closing the page does not stop a run, and a restart restores the rows the last run published.
Execution is incremental
Each step is fingerprinted with its configuration and its inputs. A step whose fingerprint matches reuses its last output. Independent branches run in parallel.
Each step has its own trigger
Off, automatically, or on a schedule, with a cooldown and a condition. An export waits by default while a check upstream has raised a warning or an error.
Every output is traceable
A cell records the cells it was calculated from. A row that fails a check becomes a ticket that keeps its history from one run to the next.
The sections that follow trace one run from the arrival of its data to the records it produces.
Docs:Workflows overview
Introduction
Operational work depends on processes that must run identically every time: take the morning's file, check the rows, look a value up in a reference list, hold back the rows that fail, and write the result out. Such a process is useful only if a reviewer can later establish which rows passed, which were held, and which input a figure came from.
A script can perform the transformation, and it leaves those questions open. It does not record when it last ran, and it recalculates everything when one line changes. It keeps no link from an output cell to the cells that produced it, and a row it rejects becomes a log entry with no owner. A scheduler adds timing and leaves the other gaps in place.
Fontana separates the definition of a process from its execution. A workflow is built on a canvas in Flow, the Fontana web application. The engine runs it on the server, determines what needs to run, and stores the rows, the lineage, and the exceptions as files that people, dashboards, and AI agents all read.
Where the engine sits
Each step of a workflow is written in Formula, a small language in which every statement has an equivalent English sentence. The Formula whitepaper describes it. Agents can build a workflow, run it, and act on its findings, as the Agent Harness whitepaper describes. This paper can be read independently of both.
Who this paper is for
This paper is written for architects, engineers, and the operations and risk teams who review how a data process runs, recovers, and leaves evidence. It assumes no prior knowledge of Fontana.
How this paper is organised
The paper begins with what a workflow is and how data reaches it. It then follows a run: how the engine executes it, what a change re-runs, and what triggers a step. The later sections cover what a run produces: published rows, lineage, exceptions, and the ways people and agents read them. The paper closes with storage, recovery, and the limits.
Key terms
These terms recur throughout the paper.
| Term | Meaning |
|---|---|
| Workflow | A data process defined as a graph of steps that moves data from a source to an outcome. It is designed in the browser and executed by the engine on the server. |
| Node | One step in a workflow. Its behaviour is a short file of statements that runs top to bottom. |
| Wire | A connection that carries one node's output rows to the next node's input. |
| Run | One execution of a workflow, also called a build. It ends by publishing each node's rows. |
| Workflow engine | The server component that executes runs, and the subject of this paper. |
| Flow | The Fontana web application. It includes the canvas on which a workflow is designed. |
| Workspace | A folder of related work: workflows, their input and output files, and the dashboards and agents that belong with them. Access is granted for a whole Workspace. |
| Formula | The language in which a node's file is written. The Formula whitepaper describes it. |
| Hash | A fingerprint of a node's configuration and inputs. If the fingerprint has not changed, the node's last output is still correct. |
| Lineage | The record of which cells a value was calculated from, so that an output can be traced to its sources. |
| Exception | A ticket raised on a row that failed a check, with a message and a severity, for a person or an agent to resolve. |
| Agent | An AI that works on a person's behalf. Agents can build workflows, run them, and read their results. |
What a workflow is
A workflow is a directed graph. Nodes are the steps, and wires carry rows from one step to the next. The graph on the canvas is the definition the engine executes, and no other definition exists.
Every step that handles data is the same kind of node. Its behaviour is a node file: a list of statements, stored beside the workflow, that runs from top to bottom. One statement loads a file, the next renames a column, a check raises an exception on a bad row, and the last one saves the result. Because every step is written the same way, the engine provides the same guarantees for every step.
- One wire into a node is that node's rows. Several wires are named tables, each read by the name on its wire. They are combined only as the node's file specifies, for example by looking a value up in one from the other.
- A workflow is stored as a file in a Workspace. Everyone who can read the Workspace sees the same run data. Anyone who can edit it can run its workflows.
- A canvas can also hold panels, notes, and drawings. These do not process rows.
- A reusable part of a workflow can be kept as a subgraph and placed into a larger one, and a whole Workspace can be cloned from a catalogue of templates.
Data in and data out
A run begins when data arrives and ends when data leaves. Both are statements in a node's file, so the way a file is loaded or an API is called is part of the readable workflow definition.
How data arrives
| Mechanism | Statement | Behaviour |
|---|---|---|
| Load a file | fromFile | Reads a file in the Workspace that a person uploaded or another process wrote. |
| Receive a request | fromRequest | Starts a run when an external system posts JSON to the workflow, and reads the request as rows. |
| Receive an email | fromEmail | Starts a run for each email sent to the node's address, and reads one row per message. |
| Call an API | fromApi, fromGraphql | Fetches from an HTTPS or GraphQL API when the node runs, and follows every page of an API that returns its records in pages. |
| Sync a source | Connector catalog | Reads from the Airbyte connector catalog, which covers Notion, Postgres, S3, and hundreds more sources, with no separate Airbyte server to run. |
Supported file formats
| Kind | Extensions | How it loads |
|---|---|---|
| Tables and spreadsheets | .csv, .tsv, .psv, .xls, .xlsx | One row per line or spreadsheet row. A workbook with several sheets loads with each sheet under its own name, or one sheet at a time. |
| Structured data | .json, .xml | Records load as rows. Repeating XML elements become one row each, with nested fields as dotted names. |
| Financial messages | .fix, .swift, .mt940, .ofx, .qfx | FIX, SWIFT MT, and OFX messages load as one row per message, with the fields of the message as columns. |
| Documents | .pdf, .docx, .pptx | Structure, tables, and text are extracted on the engine. Loading uses no AI model. |
| Text and markup | .txt, .md, .html, and others | Read as text for later steps to work on. |
| Images | .png, .jpg, .tif, and others | Read through the same document extraction, with optical character recognition. |
How data leaves
| Mechanism | Statement | Behaviour |
|---|---|---|
| Save to a file | toFile | Writes the rows to a file in the Workspace. The extension picks the format: CSV, TSV, PSV, XLS, XLSX, JSON, XML, TXT, or FIX. |
| Send an email | toEmail | Sends the rows as an email to the address the statement names. |
| Call an API | toApi, toGraphql | Sends the rows to an HTTPS API, as one request per row or as batched values, or to a GraphQL endpoint. |
- A credential is never written into a workflow. A node names a secret, and the engine reads the value from Vault, the store for keys and passwords, when the step runs. If a credential field holds a plain value where a secret belongs, the node fails and names the field.
- A step can ask the deployment's AI model a question about each row, and return the answer as typed columns that later statements check like any other data.
How a run executes
A run is one execution of the graph. It can be started by a person, by a change, by a schedule, by an agent, or by an email. In every case, the engine applies the same four rules.
- It runs on the server. Large files, document parsing, API calls, and downloads execute on the engine. Nothing depends on a browser staying open.
- It runs branches in parallel. Steps that do not depend on each other execute at the same time.
- It runs one build of a workflow at a time. A run requested while another is in progress is queued as a single waiting request. Cancelling covers both the run in progress and the queued one. Other workflows continue to run alongside.
- It publishes at the end. While a build is in progress, views state that rows publish when the run finishes, so no reader sees a partially updated table.
What starts a run
| Reason | Cause |
|---|---|
manual | A person started the run from the canvas. |
auto | Auto-build detected a change: an edit to the workflow, a new version of a file a node reads, or a correction to a cell. |
cron | A node's own schedule came due. |
agent | An agent requested a run. |
email | An email arrived at a node's address. |
The reason is available to the workflow itself, so a step can behave differently on a scheduled run than on a manual one.
Auto-build
Auto-build determines what happens when a change occurs. It is a setting of the Workspace, shared by everyone who can edit it, and it is on by default. When it is on, a change starts a build. When it is off, the change is recorded, the Workspace is marked as stale, and nothing runs until a person starts a run, a schedule comes due, an agent requests a run, or an email arrives.
Docs:Workflows
Incremental execution
Most runs follow a small change, such as one edited formula or one new file. Recalculating the whole graph in response would be slow, and it would repeat every API call and every AI step. The engine re-runs the step that changed and the steps downstream of it, and reuses everything else.
The decision rests on a hash, a fingerprint calculated for each node. A node whose hash matches its last successful run has, by construction, the same output, so that output is reused.
| The hash covers | Detail |
|---|---|
| The node's configuration | Including the text of every formula, query, or script the node points at. Editing a shared file counts as a change to each node that uses it. |
| Its incoming wires | Which nodes feed it, and through which named input. |
| Its input data | The rows that arrive, and the version of any file it loads. |
- The same reasoning applies inside a node. Editing one operation re-runs that operation and the ones after it, and leaves the earlier ones alone.
- A file that has not changed is not read again.
- A frozen node keeps its last output until it is unfrozen, whatever changes upstream. Freezing pins an expensive result while the steps after it are being developed.
- If a hash cannot be calculated, that node fails the run with an error. The engine does not treat an unknown state as up to date.
Triggers
Each node carries its own trigger, and the trigger has three parts: what wakes the node (off, automatically, or on a schedule), a cooldown that limits how often it runs, and a condition that decides whether it runs in a given build. The node displays its trigger as one sentence on the canvas, so the setting is visible without opening the node.
| Wake | Behaviour |
|---|---|
| Off | The node never executes. |
| Automatically | The node runs when its own configuration or its inputs change. A schedule saved earlier is retained, and is restored if the node is switched back to a schedule. |
| Every… | The node wakes on its own schedule, in UTC: every few minutes, every few hours, daily, on chosen weekdays, or monthly. Input changes no longer trigger it. |
Schedules
- When a schedule comes due, the engine builds the whole workflow and marks that node to run again. The node and everything downstream refresh, and unchanged branches reuse their output.
- Schedules that come due together produce one build.
- If Fontana was unavailable when a time came round, the node fires once when it is back and reports how many times it missed, so one run brings the workflow up to date.
- Saving a schedule records who set it, and each fire is linked to the build it started. A scheduled run is therefore attributable to a person.
Cooldown
A cooldown sets a minimum interval between executions of an expensive node when fast-changing data upstream keeps waking it. A change is deferred and never dropped: a change inside the window waits for the end of the window, and several changes become one execution. Downstream nodes continue to read the previous rows in the meantime. The interval ranges from one minute to 24 hours.
Condition
A condition is one Formula expression that is true or false. It can look at the rows that arrived, at what started the build, and at the exceptions raised upstream.
# Run only when rows arrived
input().rows().count() > 0
# Run only when a BUY row arrived
input().rows().some(current.prop("SIDE").test("BUY"))
# Run only when a schedule started this build
context().prop("triggerReason") == "cron"
# Run only when nothing upstream raised a warning or an error
input().exceptions().prop("warning") == 0 and input().exceptions().prop("error") == 0
- The condition is checked in every build that reaches the node, before the engine decides whether the node can reuse its last result.
- When it is false, the node does not run, publishes no rows, and is reported as not triggered, together with its condition. The build continues, and the condition is evaluated again in the next build.
- A condition that cannot be read, or that returns something other than true or false, fails the node with the formula's own message.
- A condition gates execution and does not wake a node. It decides whether a node executes in a build that something else started.
Published output
A run ends by publishing. Each output of each node becomes a small set of files in the Workspace. Every reader of a run's data reads those files: the grid on a node, a dashboard tile, a query, and an agent. All of them see the same rows, because one copy exists.
| Content | File | Holds |
|---|---|---|
| Rows | <port>.jsonl | The output rows, one JSON object per line. |
| Columns | <port>.meta.json | The columns and their types, the row count, and the table of style marks. |
| Lineage | <port>.lineage.parquet | Where each cell's value came from. |
| Audit | <port>.audit.jsonl | The warnings, errors, and change records the run wrote for this output. |
| Styles | <port>.styles.jsonl | The marks on each row and cell that show where a value entered. |
Before, during, and after a build
Data exists only once a build has published it, so every view states which of the following states applies.
- Before any build: no run has been published yet.
- During a build: rows publish when the run finishes. Counts on the canvas stay live.
- After a failed build: these rows are from the last run that published.
- When one node fails, the nodes that do not depend on it keep running and publish. The failed node and the nodes after it publish nothing, and each one names the node that stopped it. Once the cause is fixed, the next run executes that node and everything after it.
Editing a published value
A person can correct a cell in the grid. The edit is saved to the Workspace, recorded in the file's history, and marked on the cell. Filters, totals, charts, and downloads read the edited value immediately, and the next build carries it into every step downstream. The node's own output is not overwritten: the correction is stored separately from it.
If the underlying value changes after an edit was made, the edit no longer applies, and the cell indicates this. An edit applies only to the value on which it was made.
Docs:Published data
Lineage
Lineage is the engine's record of how a value was produced. It is kept for each individual cell. For any output value, the record identifies the step that wrote it and the source cells it was calculated from, back to the file or the API through which it entered.
The record is made of pointers. A cell points at the rows and columns it was derived from, and those cells point at theirs. No data is copied, so tracing a cell through a run of millions of rows does not require storing those rows again. Each link carries a usage, which states why that source contributed.
| Usage | Meaning |
|---|---|
loaded | The value came from an external source: a file, a connector, or an API. |
transformation | The source value was changed by a text, date, or number operation. |
lookup | The source was matched in a second table and brought across. |
merge | The source was combined with other inputs. |
reference | The source passed through unchanged. |
computed | The source was used in a function or a script. |
aggregated | The source contributed to a grouped total. |
generated | The source was used to generate new values, by a query or an AI step. |
filtered | The source passed through a filter or a check. |
- The Overview panel in Flow displays the chain behind a selected cell as a tree, as a list of sources, or as a graph that shows the value changing along the chain.
- A cell that was read only to make a decision, such as a filter, is recorded as filtered. Lineage shows which branch a row took as well as what it was calculated from.
- Formula statements keep lineage for each cell. A script receives a whole row, so its output is traced to the row.
- A style set on a source column follows every value calculated from it. A source marked pink where it enters still shows pink on a cell calculated from it three steps later.
OpenLineage
OpenLineage is an open standard for describing runs, jobs, and datasets across data pipelines. When a workflow run finishes, Fontana can report it to a configured OpenLineage backend, so a data catalogue shows Fontana jobs alongside the organisation's other pipelines, with the lineage of each column where Fontana recorded it.
Docs:Data lineage
Exceptions
A row that fails a check neither stops the run nor leaves the output. It becomes an exception: a ticket that names the row, the column, the step, and the reason, with a severity. The run continues, the row stays in the output, and the ticket goes to the person or agent responsible for resolving it.
| Level | Severity | Effect |
|---|---|---|
| 1 and 2 | Info | Recorded. Nothing waits for it. |
| 3 | Warning | Holds back an exporting node by default. |
| 4 and 5 | Error | Holds back an exporting node by default. |
Holding an export back
Raising an exception never stops a node. The step that waits is the one that would send the data out. A node that writes a file or sends an email has a default condition that is true only when nothing upstream raised a warning or an error. The count covers every node upstream, including nodes that are not wired directly to it. The condition can be edited on the node, or set to always run.
Tickets across runs
Most checks fail on the same rows from one run to the next. Raising a new ticket on every run would separate each failure from the status and comments already recorded for that row. Fontana therefore matches tickets across runs by a row key: the columns designated as the identity of a row.
| In a build | Effect on the ticket |
|---|---|
| A new key fails a check | A ticket is created, with a snapshot of the row. |
| The same key fails again | The same ticket is updated. The status, assignee, and comments a person set stay. |
| The key no longer fails | The ticket becomes inactive and keeps its status. A resolved ticket stays resolved. |
| The key fails again later | The same ticket becomes active again, with its history. |
- A ticket has two separate states. Fontana sets whether it is active, from the latest build. A person or an agent sets its status: raised, investigating, awaiting review, resolved, or closed.
- Tickets are triaged in named views: table, board, list, calendar, timeline, and chart.
- Comments and history are append-only, and exception changes appear in the activity log beside every other tracked change.
- Tickets are files in the Workspace. A copy or a restore of the Workspace carries its exceptions with it.
Reading results
Published rows are files, so a question about them is the same query wherever it is asked. The grid on a node, a tile on a dashboard, and a line of text in a node's description all read the run in the same way.
Explore
Each node has an Explore tab that lists its output as named views: table, board, list, JSON, details, and a chart. Filters and sorts run on the server over the published rows. Markers on a cell distinguish a value this node changed, a cell a person edited, and an exception this node raised.
Query blocks
A dashboard tile or a node description can hold a query over the published rows, written in SQL, JSONata, or JSONPath, and use the result in a sentence, a table, or a single figure.
{% query late %}
SELECT region, COUNT(*)::INTEGER AS n
FROM ref('Clean orders')
WHERE "Order status" = 'late'
GROUP BY 1 ORDER BY n DESC
{% endquery %}
{{ late.table }}| Function | Returns |
|---|---|
ref('<node>') | That node's published rows. |
audit('<node>') | The audit items on that node's output. |
lineage('<node>') | The lineage items on that node's output. |
meta('<node>') | The columns that node published. |
run() | The run record: status, timings, and each output's row count and audit counts. |
- A total on a dashboard agrees with the total in the grid, including a value a person edited, because both read the same file.
- A view of an earlier run reads that run's own published output, with no later edits applied.
- A dashboard can also read its workflow's exception tickets, so the figure and the caveats sit on one page.
Agents and workflows
A workflow, its results, and its exceptions are all files. An AI agent can therefore work with every part of a workflow, within the permissions of the person on whose behalf it acts.
- Building. An agent edits a draft of the workflow that belongs to the conversation, and the saved workflow is unchanged. Flow shows the draft beside the saved version, and nothing reaches the live canvas until a person accepts it.
- Running. An agent can start a run and wait for it to finish. A run started by an agent records this in its trigger reason.
- Reading. An agent queries the same published rows a dashboard reads, with the same edits applied, so it sees the figures a person sees.
- Resolving. An agent can list exception tickets, read one with its history, comment on it, and change its status. An agent can be started automatically when a run fails or when an exception is raised. A build that raises many tickets starts one agent turn.
- Inside a step. A node can ask an AI model about each row, and the answer comes back as typed columns that the following statements check.
A build that fails repeatedly is locked, and agent runs skip it, so an agent does not keep retrying a failing workflow. The Agent Harness whitepaper describes how an agent waits, is scheduled, and is approved.
Storage and recovery
The engine stores what a run needs and what a later review requires. Seven principles govern that storage.
| Principle | Description |
|---|---|
| Immutable | Loaded data and node output are never overwritten. A correction a person makes is a separate, audited record. |
| Durable | Run data is kept through restarts, upgrades, and upstream changes, on encrypted storage scoped to the Workspace. |
| Repeatable | Each run is its own snapshot. An earlier run can be opened and compared, and its exports downloaded, without affecting newer runs. |
| Auditable | Checks, transformations, and manual edits are recorded as structured audit items. |
| Transparent | Every node output is captured, so that people and agents can inspect and export it. |
| Queryable | Every output is stored as line-delimited JSON that can be inspected, filtered, and queried. |
| Isolated | Data stays in its Workspace until an export is configured. |
Failure handling
- One heavy workflow does not affect the others. A build that runs out of memory fails that run, and the engine keeps running.
- A build that cannot recover locks its workflow. Auto-build and agent runs skip it, other workflows keep building, and the workflow stays locked until a person unlocks it from the canvas.
- A step that has to hold a whole input in memory has a size cap. Past it, the node fails with a message that gives the input's size, and the rest of the run continues.
- A SQL query that is the first operation of its node reads its input from disk, as does a load of a CSV, TSV, or text file, so an input larger than that cap still runs.
- A Workspace can be given a restore point and returned to it later, with its workflows, files, and exceptions.
Bounds
The limits within which a workflow runs are listed below.
| Limit | Value |
|---|---|
| Runs of one workflow in flight | One, with one more queued behind it. |
| Schedules | One per node, ten per workflow. |
| Cooldown | From one minute to 24 hours. |
| Earlier runs that keep their rows | 20 by default. A setting of the Workspace. |
| Query blocks in one template | 8 in a Markdown tile, 5 in a Stat tile, 2 in a node description. |
| Rows one query block returns | 200 |
| One query block | 10 seconds and 1 MB of result. Four queries run at a time on a page. |
| Exception severity | 1 to 5 |
Conclusion
The workflow engine executes a data process defined as a graph and keeps a complete record of each result. It runs on the server, re-runs only the steps a change affects, and publishes one copy of the rows, which the grid, the dashboard, and the agent all read.
Each step's trigger is stated on the step itself. Every value carries its lineage. A row that fails a check becomes a ticket that keeps its history, and by default an export waits while a warning or an error is open upstream.
The language those steps are written in, and the plain-English editing of it, is the subject of the Formula whitepaper. The documentation below covers each part of the engine in full.
Further reading
Docs
- WorkflowsRuns, triggers, and published rows
- Formula nodeThe node file and the canvas
- Published dataWhat a run publishes and how it is queried
- Data lineageTracing a cell back to its sources
- Exception managementTickets raised on rows that fail a check
- Storage and processingHow run data is kept
Whitepapers
- The Fontana Knowledge GraphHow documents become a graph an agent can search and cite.
- The Fontana Agent HarnessHow an agent keeps working on a task, across turns, tools, and models.
- The Fontana Workflow EngineHow a workflow runs, and what a run leaves behind.
- The Fontana Formula LanguageHow a step is a file of statements you can read as English.
- Fluid, Fontana's workflow language modelHow plain English becomes checked Formula.