- tags
- #events
events-flows: story¶
Each of the event's flows, run by hand on the sample data (in the Fiddle, nothing is kept). The triggers in Init start the same flows as the data changes; a story can't raise those events itself, so it sends the flow's own message.
A registration: the workshop pass had one seat left, and this takes it, so it sells out.
$send events.registered (id = "r40")
$expect payload.sold is 12
$expect payload.soldOut is true
The double-booking guard: a pop-up talk in Hall A during the opening keynote is taken out again.
$send dom.upsert (cls = "Session", entity = {id: "s99", event: "northconf", title: "Pop-up talk", room: "Hall A", track: "t-data", start: "2026-11-12T09:30:00Z", end: "2026-11-12T10:00:00Z", speakers: [], status: "scheduled"})
$send events.sessionAdded (id = "s99")
$expect payload is "refused"
The same talk at lunch, in Room 3, is fine.
$send dom.upsert (cls = "Session", entity = {id: "s98", event: "northconf", title: "Lunch talk", room: "Room 3", track: "t-data", start: "2026-11-12T12:00:00Z", end: "2026-11-12T12:45:00Z", speakers: [], status: "scheduled"})
$send events.sessionAdded (id = "s98")
$expect payload is "ok"
A payment: the registration is paid, with its invoice and badge.
$send events.paid (id = "pay-r01")
$expect payload.badge is "b-r01"
The daily run, well before the event: the unpaid registrations are reminded; volunteers get their shifts only the day before.
$send events.daily (event = "northconf")
$expect payload.reminded is 8
$expect payload.volunteers is 0
Check-in into the keynote: Hall A holds everyone.
$send events.checkedIn (id = "ci1")
$expect payload is "ok"
After the keynote, the three people who came are asked for feedback; after the event, the organizers get a summary.
$send events.sessionEnded (id = "s01")
$expect payload is 3
$send events.summary (event = "northconf")
$expect payload.ratings is 3
$expect payload.average is 4.0