Skip to content

Workflow document

A Workflow document holds Workflows as prose with runnable TypeScript, each a Trigger and the durable body of the Action it starts.

PropertyValue
Pathworkflows/[process]/[workflow].mdx
HoldsWorkflow
Kindfile
Leadersdb-first, git-first
TeamOperations Team
Written byNone.
Compiled byStartupBuilder

Example

workflows/close/open-on-activation.mdx in a Startup repository. Closewise, a sample business, declares a Close Noun.

workflows/close/open-on-activation.mdx
---
stakes: low
---
# Open the month when a client activates

A client who activates gets this month's Close.

```ts
on.Customer.activated(async (customer, $) => $.Close.create({ client: customer.$id, period: new Date().toISOString().slice(0, 7) }))
```

Props

The frontmatter keys the file takes. The body is its prose.

PropTypeRequiredDescription
stakesstringHow much an Action can cost if it goes wrong: low, medium or high.
metricMetricThe Metric it moves.
settingsjsonThe Settings it reads.

Generates

StartupBuilder compiles it into these records, Verbs and routes.

KindWhat
RecordsWorkflow, Trigger, Action
VerbsNone.
RoutesNone.