Skip to main content

EventStorming

As built

Derived from network/model/model.yaml. This context's service is built; the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses.

Process-level boards in the ddd-crew EventStorming glossary & cheat sheet notation. Every sticky is a command, aggregate, event, policy or read model of the model. Hotspots come only from gaps or open questions in the model; the source of each is in the inventory at the end. The boards read top to bottom (flowchart TB) so each stays inside the page width. The network-wide board is on EventStorming big picture.

Legend​

StickyColourMeaning
Commandblue #a5d8ffAn intent: a vendor write, a policy's action, a sweep
Aggregateyellow #ffec99VendorAccount, PurchaseOrder, Submission
Domain Eventorange #ffc078A published fact of this context, or a consumed fact of a neighbour
Policylilac #d0bfff"Whenever X, then Y"
Read Modelgreen #b2f2bbVendorNodeView, ListingView, or a query the vendor reads
External Systempink #fcc2d7The vendor (the fleet) or a sibling context
Hotspotred #ff8787A gap or open question in the model
Actorpale yellow #fff59dA person or a timer

Derived from: the ddd-crew EventStorming notation; colours fixed by this site.

1. Issue and acknowledge​

Derived from: model.yaml → contexts[vendor-connectivity].policies[IssueOnRelease], .aggregates[PurchaseOrder], .aggregates[Submission], .read_models, .business_decisions.

Omitted: the synchronous refusals at receipt (ErrPartialAcknowledgement, ErrAlreadyAcknowledged, ErrAckWindowClosed, ErrNodeNotOwnedByVendor), shown on Use Cases; the PO_REDELIVERY_RATE re-delivery on poll.

2. Transaction outcomes​

Derived from: model.yaml → contexts[vendor-connectivity].aggregates[Submission], .aggregates[PurchaseOrder].transitions, .policies[SimulationKnobs], .publishes.

Omitted: node-performance also consumes PurchaseOrderAccepted, PurchaseOrderRejected and VendorShipmentConfirmed; the relay kinds (INVENTORY, NODE_REGISTRATION, NODE_PROFILE) are on board 5.

3. The clock and cancellation​

Derived from: model.yaml → contexts[vendor-connectivity].policies[ExpireUnacknowledged], .policies[CancelOnSourcingCancel], .aggregates[PurchaseOrder].invariants (ErrCancelAfterAcknowledgement); contexts[order-sourcing].aggregates[FulfillmentAssignment].transitions (RELEASED to CANCELLED).

Omitted: node-performance also consumes PurchaseOrderExpired.

4. Labels and shipment​

Derived from: model.yaml → contexts[vendor-connectivity].aggregates[PurchaseOrder] (RequestLabel, SubmitShipmentConfirmation, ErrLabelBeforeAcceptance, ErrConfirmWithoutLabel), .sync_calls[shipping-and-tracking], .aggregates[Submission].value_objects (SubmissionKind), .business_decisions.

Omitted: LabelIssued, which shipping-and-tracking publishes and this context does not consume.

5. Onboarding, nodes and inventory​

Derived from: model.yaml → contexts[vendor-connectivity].aggregates[VendorAccount], .aggregates[Submission], .sync_calls, .read_models, .consumes; meta/conventions.no_auth.

Omitted: VendorOnboarded goes to node-performance; SubmissionProcessed goes out for every processed write (board 2).

Sticky inventory​

StickyKindModel source
Vendor system (network-fulfillment)External Systeminbound rows from network-fulfillment; external[network-fulfillment]
order-sourcing, node-topology, offer-availability, shipping-and-tracking, node-performanceExternal Systeminbound, sync_calls, publishes[*].consumers
Network partner manager, expiry sweep timer, submission processorActorinbound (partner managers); policies[ExpireUnacknowledged]; Submission invariant ErrSubmissionNotDue
OnboardVendor, IssuePurchaseOrder, SubmitAcknowledgement, RequestLabel, SubmitShipmentConfirmation, ExpireUnacknowledgedOrders, CancelPurchaseOrder, ReceiveSubmission, ProcessSubmissionCommandaggregates[*].commands
VendorAccount, PurchaseOrder, SubmissionAggregateaggregates
VendorOnboarded, PurchaseOrderIssued, PurchaseOrderAccepted, PurchaseOrderRejected, PurchaseOrderExpired, PurchaseOrderCancelled, VendorShipmentConfirmed, SubmissionProcessedDomain Event (published)publishes
FulfillmentReleasedToNode, FulfillmentCancelled, NodeRegistered, NodeActivated, NodeSuspended, NodeRetired, ListingCreatedDomain Event (consumed)consumes
IssueOnRelease, CancelOnSourcingCancel, ExpireUnacknowledged, SimulationKnobsPolicypolicies
VendorNodeView, ListingView, purchase-order pollRead Modelread_models; rest GET /vendor/purchase-orders
H1: ackBy needs handlingTime (resolved)Hotspotbusiness_decisions (ackBy = min(...)); consumes lists NodeOperationalProfileDeclared, which feeds VendorNodeView.handlingTimeMinutes
H2: cancel after acknowledgement is refused (resolved, G12; one race stays open)Hotspotinvariants (ErrCancelAfterAcknowledgement), policies[CancelOnSourcingCancel]: logged, nothing published; order-sourcing decides the cancel (CancelDecision) and an acceptance after a cancel is only logged there (AcceptanceAfterCancelOnlyLogged)
H3: label is synchronousHotspotbusiness_decisions ("every vendor write returns 202") vs SubmissionKind (no label kind) and sync_calls (IssueLabel)
H4: vendor suspension (resolved)Hotspotrest has POST /vendors/{vendorId}/suspensions and /reinstatements; publishes has VendorSuspended and VendorReinstated; ErrVendorSuspended (409 vendor-suspended) refuses a suspended vendor's writes
H5: vendor never learns its nodeIdHotspotaggregates[Submission] (status and errors only) vs rest (GET /vendor/nodes/{nodeId} needs it)
H6: caller identity without authHotspotconventions.no_auth vs invariant ErrNodeNotOwnedByVendor and the rest query parameters (no vendor id on reads)