# Model reference The model is the JSON the module writes when PlantUML runs with `--ujn-model` (local build only): every node and arrow of a journey with its meaning worked out, for tools to read (20). The tables below are generated from the model schema, version 5 (`ujn-model-v5.schema.json`); where the schema and the spec's prose differ, the spec wins. ## Top level | Field | Type | Required | What it holds | |---|---|---|---| | `language` | `"ujn-parts-1-4"` | yes | Which parts of the language spec the model follows. | | `journey` | journey | yes | | | `nodes` | array of any | yes | Every node, in the order the statements are written. | | `arrows` | array of arrow | yes | Every arrow, in the order written. A return the renderer draws from `returns` is not listed separately. | | `warnings` | array of warning | yes | The warnings listed under the drawing (section 21; the schema's own text still says 14, an older numbering). | ## The journey | Field | Type | Required | What it holds | |---|---|---|---| | `id` | string | yes | | | `title` | string | yes | | | `description` | text | yes | | | `context` | text | yes | | | `trace` | traceLinks | yes | | | `a11y` | notes | yes | | | `uniqueId` | uniqueId | yes | | | `uniqueIdPending` | boolean | yes | | | `friendlyNamespace` | string | yes | | ## Every node | Field | Type | Required | What it holds | |---|---|---|---| | `key` | handle | yes | | | `title` | string | yes | As written, markup included; the handle when no title is written. | | `id` | string or null | yes | The display id, written or assigned; for viewing only, it may change. | | `idAssigned` | boolean | yes | | | `uniqueId` | uniqueId | yes | | | `uniqueIdPending` | boolean | yes | True while the text still says {{auto}}. | | `friendlyId` | string | yes | namespace.name | | `flags` | flags | yes | Set on this node. | | `inherited` | flags | yes | Delivery flags reaching this node only through flagged nodes or arrows. | | `description` | text | yes | | | `trace` | traceLinks | yes | | | `a11y` | notes | yes | | | `context` | text | yes | | | `style` | object | yes | Colors the text sets after the cascade (node, type block, kind block); colors left to the theme are absent. | | `extra` | extra | | | | `tooltip` | string or null | yes | Hover text the designer adds with the tooltip key (spec 9.3); null without one. | ## View | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"view"` | | | | `type` | `"plain"` or `"modal"` or `"drawer"` or `"popover"` or `"toast"` or `"tabs"` or `"wizard"` or `"embedded"` or `"new-window"` or `"waiting"` | | | | `route` | text | yes | | | `collapsed` | boolean | yes | | | `parent` | string or null | yes | | | `behavior` | object | yes | The type's defaults merged with the view's overrides (spec 11.4). Keys that do not apply to the type are absent. | | `overrides` | array of `"blocks"` or `"dismiss"` or `"focus"` or `"duration"` or `"target"` | yes | | ## Actor | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"actor"` | | | | `type` | `"actor"` | | | | `role` | text | yes | | ## System | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"system"` | | | | `type` | `"internal"` or `"external"` | | | | `host` | text | yes | | ## Action | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"action"` | | | | `type` | `"action"` or `"message"` or `"wait"` or `"event"` or `"auth"` or `"permission"` or `"fork"` or `"join"` | | | | `timeout` | duration | yes | On action, wait, event and auth; the exit guarded "timeout" is taken when it runs out. | | `channel` | text | yes | On a message: SMS, email, push. | ## Handoff | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"handoff"` | | | | `type` | `"returns"` or `"no-return"` | | | | `channel` | text | yes | Where the user goes: SMS, email, identity provider, payment page, bank app, phone. | | `timeout` | duration | yes | How long the link or session out there stays valid. | | `resume` | text | yes | The deep link the user comes back through. | ## Data | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"data"` | | | | `type` | `"file"` or `"folder"` or `"browser-cache"` or `"browser-storage"` or `"server-database"` or `"api"` | | | | `location` | text | yes | A path, a key, a table or an endpoint. | ## Start | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"start"` | | | | `type` | `"plain"` or `"deep-link"` or `"notification"` or `"handoff-return"` | | | | `route` | text | yes | The URL or deep link that opens here. | ## End | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"end"` | | | | `type` | `"success"` or `"failure"` or `"abandoned"` | | | ## Journey reference | Field | Type | Required | What it holds | |---|---|---|---| | `kind` | `"ref"` | | | | `type` | `"ref"` | | | | `journey` | string or null | yes | The id of the journey this node stands for. | ## Arrow | Field | Type | Required | What it holds | |---|---|---|---| | `from` | handle | yes | | | `to` | handle | yes | | | `kind` | `"navigation"` or `"negative"` or `"return"` | yes | | | `negative` | boolean | yes | A failure: true for -x-> (kind negative) and for .x.> (kind return, a failed return); false otherwise. | | `role` | `"exit"` or `"call"` or `"reply"` or `"resume"` or `"write"` or `"read"` | yes | exit by default; call: an action into a system; reply: a system back to the action that calls it; resume: out of a handoff or a journey reference; write: an action into a data store; read: a data store into an action. | | `trigger` | text | yes | | | `guard` | text | yes | | | `payload` | array of string | yes | | | `returns` | boolean | yes | | | `returnLabel` | text | yes | | | `direction` | `"right"` or `"left"` or `"up"` or `"down"` or `null` | yes | | | `flags` | flags | yes | | | `inherited` | flags | yes | | | `trace` | traceLinks | yes | | | `context` | text | yes | | | `a11y` | notes | yes | | | `style` | object | yes | | | `extra` | extra | | | | `tooltip` | string or null | yes | Hover text the designer adds with the tooltip key (spec 9.3); null without one. | ## Warning | Field | Type | Required | What it holds | |---|---|---|---| | `message` | string | yes | | | `handle` | string or null | | | | `line` | integer or null | yes | 1-based line in the diagram source, when known. |