Organisation metadata
Two optional top-level fields on a workflow document carry its organisation metadata. They never touch the graph: the console can edit them from the read view (the metadata dialog PATCHes only these fields), from the editor's inspector when nothing is selected, and at creation time.
name: Analyse Posos
description: Analyse d'interactions à chaque prescription, ciblée sur le médicament prescrit.
labels:
domain: pharmacie
service: reanimation
owner: dupont
| Field | Type | Default | Meaning |
|---|---|---|---|
description |
string | — | What the workflow does, for whom. Free prose, shown in lists and tooltips. |
labels |
map string → string | — | Key/value tags for filtering and governance. Keys are free; see the recommended set below. |
The lifecycle is NOT a spec field
Whether a workflow routes is not written in its YAML. It is the state of its definition in the store: draft, published, unpublished, archived — see Manage workflow storage.
A status field in the spec would be a second source of truth, and a versioned
one: publishing would freeze a status that the active-version pointer contradicts
at the first rollback. So the four states live in one place, and one only.
What this means when authoring:
- Published — the workflow is a candidate for its event type. Among the
candidates, the first whose
trigger.selectoris true receives the event, or the one without a selector if none matched (file order breaks ties). See Route an event to the right workflow. - Unpublished — out of routing, versions kept. This is the platform's pause: one gesture, whatever the trigger. A scheduled workflow is disarmed on the scheduler too, so unpublishing stops a cron as well as an event.
- Draft — never published, or published-then-edited. A draft is never routed
automatically; it stays reachable through pinned dispatch (
__workflowFileplus__allowDraftonPOST /api/events), which is how bench fixtures are run. Files seeded fromworkflows/drafts/land here. - Archived — out of routing durably; the way back is unarchiving, not republication.
A workflow created through the console dialog is published at its first save (v1); to keep one out of routing while it is built, unpublish it or leave its work in the draft.
Recommended label keys
Keys are not enforced (any string parses), but sticking to a shared vocabulary is what makes filtering by label useful. Recommended:
| Key | Example values | Use |
|---|---|---|
domain |
pharmacie, biologie, documents |
Clinical domain of the automation. |
service |
reanimation, cardiologie |
Unit/service the workflow serves. |
owner |
a name or team handle | Who answers for this workflow. |
The console's label editor autocompletes on the keys already present across workflows (with their counts), so an established convention reinforces itself.