You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d070954
Browse filesBrowse the repository at this point in the historyBrowse files
docs(skills): an approval's decision outputs are enforced at the decision in the automation skill
The decisionOutputs teaching in objectstack-automation's
state-machines-and-approvals reference said a typed declaration renders a
record picker. It now says what the runtime enforces: type and multiple are
judged on approve and reject before any write, a picker kind resolves through
the expression approver's resolvers, multiple: true takes a list of distinct
values, anything else is 400 VALIDATION_FAILED naming outputs.KEY, and the
Console sends a list for a multiple text output. The token ceiling is paid in
place by cutting three restatements whose homes stay in the same file.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAkWdcYL2ftVcWZ2scY
Copy file name to clipboardExpand all lines: skills/objectstack-automation/references/state-machines-and-approvals.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,6 +219,15 @@ reject) — enforced before any write, with no elevation bypass, so the run
219
219
cannot resume past the node with the key a later `expression` approver reads
220
220
still missing.
221
221
222
+
`type` and `multiple` are enforced there too, on approve and reject alike,
223
+
before any write — they are not widget hints. A picker kind must resolve
224
+
through the `expression` approver's resolvers in the request's organization:
225
+
`user`, `department` and `team` by record id, `position` by a held position's
226
+
machine name. `multiple: true` takes a list of distinct values (every kind,
227
+
text and bare keys included); without it, one value. Anything else is
228
+
`400 VALIDATION_FAILED` naming `outputs.KEY`. The Console sends a list for a
229
+
`multiple: true` text output. The `lead_review` node below is the example.
230
+
222
231
### Reading the lock
223
232
224
233
A page over a record under approval must not offer an edit the server then
@@ -245,7 +254,7 @@ an id that does not exist gets.
245
254
|`manager`| The submitter's manager (`sys_user.manager_id`) |
246
255
|`field`| User id read from a record field (`value` = field name). Resolved against the record's **live** state at node entry, so a field written mid-flow routes correctly; a multi-select user field fans out into one approver per user |
247
256
|`queue`| Members of ownership queue `value` at node entry; an empty queue adds nobody |
248
-
|`expression`| A **CEL expression** resolved at node entry (`value` = the expression) — see **Dynamic approvers** below. Only `current.*` / `trigger.*` / `vars.*` roots are available; the optional `resolveAs: 'user'(default) \| 'department' \| 'position' \| 'team'` re-expands each resolved id through the graph |
257
+
|`expression`| A **CEL expression** resolved at node entry (`value` = the expression) — see **Dynamic approvers** below. The optional `resolveAs: 'user'(default) \| 'department' \| 'position' \| 'team'` re-expands each resolved id through the graph |
@@ -362,7 +367,7 @@ Object-hook `ctx` is a different vocabulary — see **objectstack-data**
362
367
|`approvalStatusField`| Business-object field to mirror `pending`/`approved`/`rejected`/`recalled` onto (should be readonly) |
363
368
|`onEmptyApprovers`| What an EMPTY resolved slate does: `admin_rescue` (default — request opens, only a privileged admin can act via Reassign; never waves through, never kills the run), `fail` (node fails — treat an empty slate as a config bug), `auto_approve` (skip the request, continue down `approve` with `output.autoApproved = true` — opt-in because it silently waves the record through), `fallback` (request opens on the sibling `fallbackApprovers` instead — same shape as `approvers`, required by this policy and refused under any other; a fallback that itself resolves to nobody degrades to `admin_rescue`). Declare it explicitly on any node with an `expression` approver (linted) |
364
369
|`excludeSubmitter`|`true` drops the run's submitter (`submitter_id`) from the resolved slate, whatever approver type produced them — segregation of duties; a slate it empties takes the `onEmptyApprovers` route, never a silent pass. `onEmptyApprovers: 'auto_approve'` is **refused** beside it (it would approve exactly the request this exists to stop): use `admin_rescue`, `fail` or `fallback`. Default `false`|
365
-
|`decisionOutputs`| Decision outputs a decision may carry (author declares, approvers fill values). Entries are bare keys (free-text input) **or typed declarations**`{ key, label?, type: 'text'\|'user'\|'department'\|'position'\|'team', multiple?, required? }` — a typed entry renders the matching record picker in the decision dialog (`multiple` collects an id array). Accepted outputs resume the run as `<nodeId>.<key>` variables; undeclared keys reject the decision; `decision`/`requestId` reserved|
370
+
|`decisionOutputs`| Decision outputs a decision may carry: bare keys (free text) **or typed declarations**`{ key, label?, type: 'text'\|'user'\|'department'\|'position'\|'team', multiple?, required? }`, enforced at the decision — see *Recording a decision*|
366
371
|`escalation`| Optional per-node SLA — `{ enabled, timeoutHours, action: reassign\|auto_approve\|auto_reject\|notify, escalateTo?, notifySubmitter }`. `timeoutHours` is **calendar (wall-clock) hours** — nights, weekends and holidays count; the platform ships no business-hours calendar. `escalateTo` is a **position machine name** (expanded to its holders via `sys_user_position`, ADR-0090 D3) or a specific user id — never a membership tier. `reassign` without `escalateTo` degrades to notify (linted) |
367
372
|`maxRevisions`| Send-backs per run before auto-reject (ADR-0044) — see *Send-back for revision* above |
0 commit comments