Workflow document
A Workflow document holds Workflows as prose with runnable TypeScript, each a Trigger and the durable body of the Action it starts.
| Property | Value |
|---|---|
| Path | workflows/ |
| Holds | Workflow |
| Kind | file |
| Leaders | db-first, git-first |
| Team | Operations Team |
| Written by | None. |
| Compiled by | StartupBuilder |
Example
workflows/ in a Startup repository. Closewise, a sample business, declares a Close Noun.
---
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.
| Prop | Type | Required | Description |
|---|---|---|---|
stakes | string | How much an Action can cost if it goes wrong: low, medium or high. | |
metric | Metric | The Metric it moves. | |
settings | json | The Settings it reads. |
Generates
StartupBuilder compiles it into these records, Verbs and routes.