Commit 6dcf2be
committed
fix(service-automation): bind
Dogfooding the record-after-write showcase flow in a live app surfaced two bugs:
1. The engine bound `previous` into the flow condition scope only when truthy, so
on a record insert `previous` was an unknown CEL variable — the documented
`previous == null` create-discrimination threw "Unknown variable: previous" and
failed the whole start condition, dropping the run. `previous` is now always
bound (null when there is no prior row), making the create/update discrimination
the record-after-write docs + Studio designer advertise actually work. Verified
end-to-end (integration test + a live showcase boot: the flow fires on
create-urgent and on escalation, and correctly skips a non-urgent create).
2. The showcase `UrgentTaskAlertFlow` notify node had no recipient, so every run
failed "at least one recipient is required". Now notifies the assignee, falling
back to the triggering user (`{$User.Id}`) so an unassigned urgent task still
pings someone. Live-verified: a `task.urgent` notification is delivered.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018939yJ413zG3irLzcTtqaaprevious as null on the create leg; fix showcase notify recipient (#3427)1 parent be7e242 commit 6dcf2be
3 files changed
Lines changed: 30 additions & 3 deletions
File tree
- .changeset
- examples/app-showcase/src/automation/flows
- packages/services/service-automation/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1572 | 1572 | | |
1573 | 1573 | | |
1574 | 1574 | | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
1575 | 1580 | | |
1576 | 1581 | | |
1577 | 1582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1623 | 1623 | | |
1624 | 1624 | | |
1625 | 1625 | | |
1626 | | - | |
1627 | | - | |
1628 | | - | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1629 | 1633 | | |
1630 | 1634 | | |
1631 | 1635 | | |
| |||
0 commit comments