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
docs(interface+automation): align with framework 16.0 strict widgets, approvals, time-relative triggers
pages + dashboards (en + zh-Hans):
- widget examples rewritten from the pre-ADR-0021 inline-analytics
shape (object/categoryField/valueField/aggregate) onto the dataset
shape (dataset + dimensions + values) — DashboardWidgetSchema is
.strict() since 16.0 and the legacy keys are parse errors naming the
key (#3251); the dashboards note now states that instead of
'silently stripped'.
approvals (en + zh-Hans):
- approver-type warning aligned with #3133: canonical
org_membership_level, role = one-release deprecated alias, position
names → type:'position'; real lint ids;
- new 16.0 section: behavior first_response|unanimous|quorum|per_group
with minApprovals (runtime-clamped, never deadlocks), approver group
labels (会签), open-time snapshot + OOO substitution, decision file
attachments, server-computed decision_progress, and the
declared-actions inbox model (approve/reject/reassign/send-back/
request-info/remind/recall/resubmit as type:'api' actions on
sys_approval_request).
flows + workflows (en + zh-Hans):
- new time-relative trigger section: start-node config.timeRelative
(object, dateField, offsetDays xor withinDays, optional filter,
maxRecords 1000, default daily 08:00 UTC schedule) with a defineFlow
example and os validate readiness notes (#1874);
- workflows migration table splits 'N days before a date' (time-
relative) from fixed-clock scheduled flows and warns off the
date-equality-on-record-change pattern; notes date equality now
matches for same-day checks (#3183).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Kj2MJEPXoUXC4LiC3XYJc
|`object`| Object (machine name) whose records the sweep queries |
154
+
|`dateField`|`date` / `datetime` field evaluated relative to today (day-granular) |
155
+
|`offsetDays`|**Offset mode** — fire when `dateField` is exactly today + each listed offset (`[60, 30, 7]`; negative = past, e.g. `[-1]` the day after) |
156
+
|`withinDays`|**Range mode** — fire every day `dateField` is within N days of today: positive = upcoming ("expiring soon"), negative = bounded overdue lookback, `0` = due today |
157
+
|`filter`| Optional ObjectQL where-map AND-ed with the computed date window (e.g. `{ status: 'active' }`) |
158
+
|`maxRecords`| Cap on records launched per sweep (default 1000; the sweep logs when it clamps) |
159
+
160
+
Exactly **one** of `offsetDays` or `withinDays` must be set. The two other
161
+
common shapes:
162
+
163
+
```ts
164
+
// "Expiring soon" — fires every day a document is within 30 days of expiry.
Copy file name to clipboardExpand all lines: content/docs/build/automation/workflows.mdx
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,15 +137,19 @@ If you're coming from a platform with Workflow Rules, here's the mapping:
137
137
| Old concept | Current equivalent |
138
138
|---|---|
139
139
| Workflow Rule | Flow |
140
-
| Time trigger | Scheduled flow |
140
+
| Time trigger ("N days before/after a date") | Time-relative trigger — `config.timeRelative` on a flow's start node (16.0, see [Flows](/docs/build/automation/flows)) |
141
+
| Time trigger (fixed clock) | Scheduled flow |
141
142
| Field update action |`update_record` node |
142
143
| Email alert |`notify` node |
143
144
| HTTP call |`http` node |
144
145
| Approval Process | Flow with one or more `approval` nodes |
145
146
146
147
The test: if the old rule was "when X happens, do Y", model it as a small
147
-
flow. If it was "this record must move through controlled states", model the
148
-
lifecycle as a state machine and use flows for the side effects.
148
+
flow. If it was "N days before/after a date field, do Y", declare a
149
+
time-relative trigger — never a date-equality condition on a record-change
150
+
flow, which only evaluates when the record happens to change. If it was
151
+
"this record must move through controlled states", model the lifecycle as a
0 commit comments