Skip to content

Commit 831311e

Browse files
committed
docs(skills): the pending-delete refusal names the child object's declared cascades
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVUz5oS8fMgmncxU96
1 parent 270a105 commit 831311e

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎.changeset/37713-skills-approval-lock-reach.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Published prose only; no behaviour changes.
1111

1212
`objectstack-automation` `references/state-machines-and-approvals.md`:
1313

14-
- Best practice 2 now says that deleting a record whose approval is pending is not refused: the delete lands, cancels the request and cascades the record's `master_detail` child rows. It is refused whole with `409 RECORD_LOCKED` only where that cascade has no single transaction to run in, or a child row has a second cascading parent.
14+
- Best practice 2 now says that deleting a record whose approval is pending is not refused: the delete lands, cancels the request and cascades the record's `master_detail` child rows. It is refused with `409 RECORD_LOCKED` only where that cascade has no single transaction to run in, or the child object declares a second cascading relation (another `master_detail`, or any field declaring `deleteBehavior: 'cascade'`).
1515
- The `lockRecord` config row states its bound again: it locks the record from edits.
1616
- Best practice 2 no longer names a parent field group as a way a `lookup` child is shown in the record's details: a group places a `lookup` child only when it already declares `relatedList: 'primary'`.
1717

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ Object-hook `ctx` is a different vocabulary — see **objectstack-data**
334334
| Field | Purpose |
335335
|:------|:--------|
336336
| `approvers` | Who may act (≥ 1 — see Approver Types above). Each approver may carry an optional **`group`** label (e.g. `{ type: 'position', value: 'crm_auditor', group: 'finance' }`) — with `behavior: 'per_group'`, approvers sharing a label form one group; unlabelled approvers each form their own |
337-
| `behavior` | `first_response` (first approver decides), `unanimous` (all must approve), `quorum` (`minApprovals` of N — M-of-N collective sign-off), or `per_group` (EACH approver `group` must reach `minApprovals` — one-from-each-group sign-off). In every mode a single rejection finalizes the node as `rejected`. Default `first_response` |
337+
| `behavior` | `first_response` (first approver decides), `unanimous` (all must approve), `quorum` (`minApprovals` of N), or `per_group` (EACH approver `group` must reach `minApprovals`). In every mode a single rejection finalizes the node as `rejected`. Default `first_response` |
338338
| `minApprovals` | Approvals required — total for `quorum`, per group for `per_group`. Omitted ⇒ ALL resolvable approvers under `quorum`, `1` per group; clamped at runtime so a misconfiguration can never deadlock |
339339
| `lockRecord` | Lock the record from edits while pending. Default `true` |
340340
| `approvalStatusField` | Business-object field to mirror `pending`/`approved`/`rejected`/`returned`/`recalled` onto (should be readonly) |
@@ -370,9 +370,9 @@ These are wired on the **graph**, not in node config:
370370
the record and its `master_detail` child rows only: a `lookup` child shown
371371
in the record's details (`relatedList: 'primary'`) stays editable (warning
372372
`approval-detail-editable-while-pending`). Deleting the pending record
373-
still lands, cancelling the request and cascading those rows; it is refused
374-
whole (`409 RECORD_LOCKED`) where the cascade lacks one transaction or
375-
a row has a second cascading parent.
373+
still lands, cancelling the request and cascading its `master_detail` rows;
374+
it is refused (`409 RECORD_LOCKED`) where the cascade lacks one transaction
375+
or the child object declares a second cascading relation.
376376
3. **Notify the submitter from downstream nodes** wired to the `approve` /
377377
`reject` edges. Opening already tells each resolved approver
378378
(`approval.requested`); ⛔ no `notify` node for the opening: it tells

0 commit comments

Comments
 (0)