Workflows
Registering a workflow
Step-by-step — create a workflow and its steps.
You register a workflow in the dashboard. A workflow is a name + trigger, and under it an ordered list of steps.
Steps
- New workflow — give it a name, pick a trigger (schedule / data change / heartbeat).
- Add a
liststep — pick the feature (e.g.reservations.list) and write the query that selects your rows. - Add an acting step — pick the feature (e.g.
reservations.update), set For each to the previous step's rows, and fill the values (e.g. status →no_show). Use${item.id}to refer to each selected row. - Activate — set the workflow to active. A heartbeat/cron workflow then
fires on its own; a
dbone fires on the next matching change.
A worked example
workflow: { name: "No-show sweep", trigger: heartbeat }
steps:
- name: find
feature: reservations.list
query: { where: { status: {in: [confirmed]}, starts_at: {lt: "now-30m"} }, limit: 50 }
- name: mark
feature: reservations.update
each: "${steps.find.rows}"
input: { id: "${item.id}", values: { status: "no_show" } }Nullifying
Make sure an acting step moves rows out of the query's condition (here: confirmed → no_show). Otherwise the workflow keeps re-acting on the same rows.
See more in the Cookbook.