# `Condukt.Workflows.Document`
[🔗](https://github.com/tuist/condukt/blob/1.5.1/lib/condukt/workflows/document.ex#L1)

Loaded representation of a workflow document.

A document is the canonical form executed by `Condukt.Workflows`. It
is produced by loading an HCL workflow or `.exs` workflow generator,
validating the normalized map, and filling in a default `name` from
the file basename when the normalized document omits one.

# `from_map`

Validates a decoded document map without touching the filesystem.
Useful when the document is produced in memory.

# `load`

Loads, normalizes, and validates a workflow document at `path`.

Accepts `.hcl` and `.exs` paths. Returns `{:ok, %Document{}}` when
the file parses and matches the workflow document shape. Otherwise
returns a tagged error suitable for reporting from the CLI.

# `validate_inputs`

Validates a user-provided inputs map against the document's declared
inputs. Inputs without a `default` are required.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
