Skip to content

Commit 5e32f8c

Browse files
committed
docs(skills): expression approver value is a plain CEL string in the three objectstack-automation fragments
Claude-Session: https://claude.ai/code/session_01Utp6CZmwqAVSYHM1nQUDTq Co-authored-by: Claude <noreply@anthropic.com>
1 parent 98bda0a commit 5e32f8c

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-automation` spells an `expression` approver's `value` as the plain CEL string the schema accepts
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-automation/references/state-machines-and-approvals.md`, *Dynamic approvers*: the three fragments wrote the approver's `value` with the `cel` tag, which builds a `{ dialect, source }` object. `ApprovalNodeApproverSchema.value` is a string, so an approval node copied from them failed validation with `expected string, received object`. They now read `value: 'current.co_review_departments'`, `value: 'vars.lead_review.next_reviewers'` and `value: 'current.picked_departments'`, the spelling the end-to-end flow below them already used. The `expression` row of the approver table says `value` is the expression string. The file is two bytes shorter and its token ceiling is unchanged.

‎skills/objectstack-automation/references/state-machines-and-approvals.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ an id that does not exist gets.
226226
| `manager` | The submitter's manager (`sys_user.manager_id`) |
227227
| `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 |
228228
| `queue` | Members of ownership queue `value` at node entry; an empty queue adds nobody. In a packaged flow, see below |
229-
| `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 |
229+
| `expression` | A **CEL expression** resolved at node entry (`value` = the expression string) — see **Dynamic approvers** below. The optional `resolveAs: 'user'(default) \| 'department' \| 'position' \| 'team'` re-expands each resolved id through the graph |
230230

231231
**A packaged flow's `queue` approver** (ADR-0150 D3) resolves `value` as a
232232
packaged assignment rule does (SKILL.md § Assignment rules), from the package
@@ -260,16 +260,16 @@ slate — guard genuinely-optional inputs explicitly, e.g.
260260

261261
```typescript
262262
// ① Route on a field an EARLIER approver filled in mid-flow (live value):
263-
{ type: 'expression', value: cel`current.co_review_departments`, resolveAs: 'department' }
263+
{ type: 'expression', value: 'current.co_review_departments', resolveAs: 'department' }
264264

265265
// ② The previous approval node's decision outputs pick this node's approvers:
266-
{ type: 'expression', value: cel`vars.lead_review.next_reviewers` }
266+
{ type: 'expression', value: 'vars.lead_review.next_reviewers' }
267267

268268
// ③ Dynamic co-sign: expression yields department ids; resolveAs expands
269269
// each into its members, and with behavior: 'per_group' EACH department is
270270
// its own sign-off group:
271271
{
272-
approvers: [{ type: 'expression', value: cel`current.picked_departments`, resolveAs: 'department' }],
272+
approvers: [{ type: 'expression', value: 'current.picked_departments', resolveAs: 'department' }],
273273
behavior: 'per_group',
274274
onEmptyApprovers: 'fail',
275275
}

0 commit comments

Comments
 (0)