- 9 minutes to read

O2C Demo — C4 Architecture Diagrams

The Order-to-Cash (O2C) demo generates log events that carry Repository Binding metadata. Each log event records the System, Domain, Service, Endpoint, and MessageType that handled the message. These properties are the building blocks of C4 Diagrams: Systems, Domains, Services, Endpoints, and Message Types.

This page is a technical reference for developers and solution architects. It walks through the six taught diagrams of the O2C story, one per layer, using the exact entities the O2C PowerShell script produces:

  • ✅ L0 System Landscape: the four Systems in their four Domains
  • ✅ L1 System Context of Portal, L2 Container of Portal, and the L3 Component of the Service INT1337-RCV-Order-Incoming
  • ✅ The Dynamic, generated from the BPM, and the Deployment on three servers

All six live in the C4 Diagram Set Order-to-Cash Demo in Nodinite Mapify. New 7.12 Build the Order-to-Cash C4 set adds the other 19 diagrams with Generate from Integration Landscape: 25 in all, with zero stored links.

The Order-to-Cash C4 diagrams in one Diagram Set: the L0 System Landscape with the four O2C Systems in their Domains and the people who use them, the Portal's L2 Container diagram with its four Services inside and ERP outside, then the L3 Component diagram of INT1337-RCV-Order-Incoming with its Endpoint and the steps the order takes, the Component Portal-OrderReceived-Drop bound to the Endpoint of that name, animated walkthrough (7.12)
Animated walkthrough: the taught diagrams imported into a Diagram Set and opened one level at a time, from the landscape to Portal's Services to INT1337-RCV-Order-Incoming, by the inferred Inside pill. See Navigate the Set.

Warning

Name matching is exact (not case-sensitive) during C4 import. Use the same string as the existing Repository entity (for example, ERP-Finance, not ERP Finance), or the wizard can't bind the node.


Repository Binding → C4 Element Mapping

The table summarises how each O2C log event field ends up in a C4 diagram. Every rule comes from the C4 model in Nodinite (C4 Model vs Nodinite Concept Mapping).

Log Event Field O2C Example Value C4 Level C4 Element
System Portal, ERP, WMS, ERP-Finance L0, L1 System(...) node; on an L1 only the scope System, the others System_Ext(...)
System Portal L2 The System_Boundary(...): the diagram's scope, bound to the System
Domain Sales, Planning, Logistics, Finance L0 Boundary(..., "Domain") around its System
Service INT1337-RCV-Order-Incoming L2, Dynamic, Deployment Container(...) bound to the Service
Service INT1337-RCV-Order-Incoming L3 The Container_Boundary(...): the diagram's subject
Endpoint Portal-OrderReceived-Drop L3 Component(...) inside the subject, bound to the Endpoint
MessageType O2C.Order.Received/1.0 All The Message Type of a Flow, written after / in the technology text
Format JSON, XML, CSV, PSV All The protocol, before / in the technology text
ProcessingMachineName portal-server-01 Deployment Deployment_Node(...): an unbound label
LogText Order Received from Customer L2 Description text of a Container; no binding
(not in log events) Customer, Warehouse Staff, Finance Officer L0, L1 (and the taught L2 and L3) Person(...) / Person_Ext(...)

Two rules hold on every O2C diagram: a System is never drawn as a Container, and a Service is never drawn as a Component. A Flow between two Services or Systems names its sender's Message Type, such as XML / O2C.Forwarding/1.0 for a forwarder.

The Six Taught Diagrams

# Diagram Import as Scope / Subject Example page
1 Order-to-Cash — System Landscape System Landscape (L0) — multiple independent systems none System Landscape Example
2 Portal — System Context Context Scope step: System Portal L1 Context Example
3 Portal — L2 Container Diagram Container From its System_Boundary (Portal) L2 Container Example
4 INT1337-RCV-Order-Incoming — L3 Component Diagram Component Scope System Portal, subject Service INT1337-RCV-Order-Incoming, from its Container_Boundary L3 Component Example
5 INT1337 - Order-to-Cash Flow — Dynamic Not imported: C4 Dynamic on the BPM none Dynamic Example
6 Order-to-Cash — on servers Deployment none Deployment Example

The Order-to-Cash C4 examples page says per diagram when its scope is set and whether it's needed before Promote.


L0 — System Landscape

The L0 shows the four O2C Systems inside their four Domains, and the three business actors. It has no Architectural Scope: it covers the whole set.

Key Points

  • Each Domain becomes a Boundary(..., "Domain") around its System: Sales/Portal, Planning/ERP, Logistics/WMS, Finance/ERP-Finance. These are the four lanes of the BPM INT1337 - Order-to-Cash Flow.
  • Business actors aren't captured by log events. They are Person(...) and Person_Ext(...) nodes.
  • Each Rel(...) carries one Flow, with the technology Format / MessageType.
  • The L0 draws one connector per System pair: Portal and ERP share one connector with three Flows (two Portal → ERP, one ERP → Portal).
C4Context title Order-to-Cash — System Landscape Person(customer, "Customer", "Places orders and receives order confirmations") Person(warehouse_staff, "Warehouse Staff", "Confirms packing and delivery in WMS") Person_Ext(finance_officer, "Finance Officer", "Reviews and approves generated invoices") Boundary(sales, "Sales", "Domain") { System(portal, "Portal", "Receives customer orders and delivers order confirmations") } Boundary(planning, "Planning", "Domain") { System(erp, "ERP", "Enters orders and schedules production") } Boundary(logistics, "Logistics", "Domain") { System(wms, "WMS", "Packs and delivers orders") } Boundary(finance, "Finance", "Domain") { System(erp_finance, "ERP-Finance", "Invoices delivered orders") } Rel(customer, portal, "Places orders", "HTTPS") Rel(portal, erp, "Forwards the order", "XML / O2C.Forwarding/1.0") Rel(portal, erp, "Sends the confirmation for planning", "CSV / O2C.Order.Confirmation/1.0") Rel(erp, portal, "Returns the order entry", "XML / O2C.Order.Entry/1.0") Rel(erp, wms, "Schedules packing", "JSON / O2C.Order.Scheduled/1.0") Rel(wms, erp_finance, "Reports the delivery for invoicing", "PSV / O2C.Order.Delivered/1.0") Rel(warehouse_staff, wms, "Confirms packing and delivery", "Web") Rel(finance_officer, erp_finance, "Approves invoices", "Web")

Import Mapping for L0

Import it with the C4 import wizard, Diagram type System Landscape (L0) — multiple independent systems. The wizard shows no Scope step.

Element Status in Review and Resolve Binds to
Portal, ERP, WMS, ERP-Finance Matched The four Systems
Sales, Planning, Logistics, Finance boundaries Matched The four Domains
Customer, Warehouse Staff, Finance Officer New A new System each, with Resolve All
Flows with O2C.* after / Message Type column The Message Types O2C.Forwarding/1.0, O2C.Order.Confirmation/1.0, O2C.Order.Entry/1.0, O2C.Order.Scheduled/1.0, O2C.Order.Delivered/1.0

Tip

To keep the actors out of the Repository, choose Leave unbound for them in Review and Resolve.


L1 — System Context of Portal

An L1 has exactly one System as its scope. The O2C demo has four L1s, one per System; the taught one is Portal's. Portal is the only System; ERP, its neighbour, is a System_Ext.

C4Context title Portal — System Context Person(customer, "Customer", "Places orders and receives order confirmations") System(portal, "Portal", "Receives customer orders and delivers order confirmations") System_Ext(erp, "ERP", "Enters orders and schedules production") Rel(customer, portal, "Places orders", "HTTPS") Rel(portal, erp, "Forwards the order", "XML / O2C.Forwarding/1.0") Rel(portal, erp, "Sends the confirmation for planning", "CSV / O2C.Order.Confirmation/1.0") Rel(erp, portal, "Returns the order entry", "XML / O2C.Order.Entry/1.0")

Import Mapping for L1

Import it as Context. New 7.12 The wizard's Scope step asks for one System: pick Portal (Next stays disabled until you do). Portal and ERP match their Systems, and Customer matches the System the L0 import created (or is New, if you import the L1 first). The three Portal/ERP Flows become one connector.


L2 — Container Diagram of Portal

An L2 shows the inside of one System: Portal's four Services in the System_Boundary Portal, and ERP outside as a System_Ext with the cross-System Flows. The demo has four L2s, one per System.

Key Points

  • The System_Boundary(portal, "Portal") is the diagram's subject: the wizard takes the scope Portal from it, and its binding follows the scope, read-only.
  • Each Service is a Container(...) inside the boundary. Two of them are business steps of the BPM; their descriptions carry the LogText milestone.
  • Each Flow between Services carries the sender's Message Type. A Flow whose text after / names no Message Type, such as HTTPS / JSON, keeps its text as the protocol.
C4Container title Portal — L2 Container Diagram Person(customer, "Customer", "Places orders and receives order confirmations") System_Boundary(portal, "Portal") { Container(rcv_order, "INT1337-RCV-Order-Incoming", "Integration / JSON", "Picks up the customer's order file. Step 0 — Milestone: Order Received from Customer") Container(snd_order, "INT1337-SND-Order-Incoming", "Integration / XML", "Forwards the order to ERP for entry") Container(rcv_confirm, "INT1337-RCV-Confirm-Incoming", "Integration / XML", "Receives the order entry ERP returns") Container(snd_confirm, "INT1337-SND-Confirm-Outgoing", "Integration / CSV", "Sends the order confirmation. Step 2 — Milestone: Order Confirmation Delivered to Customer") } System_Ext(erp, "ERP", "Enters orders and schedules production") Rel(customer, rcv_order, "Drops the order file", "HTTPS / JSON") Rel(rcv_order, snd_order, "Hands the order on", "JSON / O2C.Order.Received/1.0") Rel(snd_order, erp, "Forwards the order for entry", "XML / O2C.Forwarding/1.0") Rel(erp, rcv_confirm, "Returns the order entry", "XML / O2C.Order.Entry/1.0") Rel(rcv_confirm, snd_confirm, "Hands the entry on", "XML / O2C.Forwarding/1.0") Rel(snd_confirm, erp, "Sends the confirmation for planning", "CSV / O2C.Order.Confirmation/1.0") Rel(snd_confirm, customer, "Delivers the order confirmation", "CSV / O2C.Order.Confirmation/1.0")

Import Mapping for L2

Import it as Container. The Scope step shows Portal, taken from the markup. A bound node takes the Component Type of its Repository item, and the third Mermaid argument becomes its Technology.

Element Binds to Note
System_Boundary Portal System Portal The row shows Follows the scope: Portal
INT1337-RCV-Order-Incoming, INT1337-SND-Order-Incoming, INT1337-RCV-Confirm-Incoming, INT1337-SND-Confirm-Outgoing The four Services Matched
ERP (System_Ext) System ERP Matched
Customer The System Customer Matched once it exists

A Container(...) binds to a Service or a Contract, never a System. A Container named after a System imports unbound, with the note to draw it as a System shape.


L3 — Component Diagram of INT1337-RCV-Order-Incoming

An L3 zooms into one Service, its subject. Its scope is the System it lives in, Portal. The demo has 14 L3s, one per Service.

Key Points

  • The Container_Boundary(rcv_order, "INT1337-RCV-Order-Incoming") is the subject. Named after the Service, it gives the wizard both the subject and the scope (that Service's System).
  • Inside: the Component Portal-OrderReceived-Drop matches the Service's Endpoint of exactly that name. An Endpoint Component shows the Endpoint's icon and View, and has no monitoring state.
  • The other Components (Order Validator, Deduplication Guard, Order Repository) are unbound steps.
  • Outside: the related Service INT1337-SND-Order-Incoming as a Container_Ext.
C4Component title INT1337-RCV-Order-Incoming — L3 Component Diagram Person(customer, "Customer", "Places orders and receives order confirmations") Container_Boundary(rcv_order, "INT1337-RCV-Order-Incoming") { Component(order_drop, "Portal-OrderReceived-Drop", "File drop", "The End Point the customer's order file arrives on") Component(order_validator, "Order Validator", "C# / FluentValidation", "Validates the order schema, business rules and customer identity") Component(dedup_guard, "Deduplication Guard", "C#", "Checks the Order Store so an order is never processed twice") ComponentDb(order_repo, "Order Repository", "SQL Server", "Persists received orders before they are handed on") } Container_Ext(snd_order, "INT1337-SND-Order-Incoming", "Integration / XML", "Forwards the order to ERP for entry") Rel(customer, order_drop, "Drops the order file", "JSON / O2C.Order.Received/1.0") Rel(order_drop, order_validator, "Passes the order", "In-process") Rel(order_validator, dedup_guard, "Passes the validated order", "In-process") Rel(dedup_guard, order_repo, "Reads and writes the order record", "SQL") Rel(dedup_guard, snd_order, "Hands the order on", "JSON / O2C.Order.Received/1.0")

Import Mapping for L3

Import it as Component.

Element Binds to Note
Container_Boundary INT1337-RCV-Order-Incoming Service INT1337-RCV-Order-Incoming The row Subject of the Component diagram; the scope becomes System Portal
Portal-OrderReceived-Drop Endpoint Portal-OrderReceived-Drop Use existing Endpoint; needs read rights on Endpoints
Order Validator, Deduplication Guard, Order Repository Nothing Unbound steps; an L3 Component never creates anything
INT1337-SND-Order-Incoming (Container_Ext) Service INT1337-SND-Order-Incoming Matched
Customer The System Customer Matched once it exists

New 7.12 An L3 Component binds only to an Endpoint, never to a Service or an Integration. A Component named after a Service matches no Endpoint and stays unbound, so draw a Service as the Container_Boundary or as a Container outside it.


Dynamic and Deployment

  • Dynamic: not imported. On the BPM INT1337 - Order-to-Cash Flow, click C4 Dynamic, pick the set, and Confirm. The Draft INT1337 - Order-to-Cash Flow — Dynamic has the BPM's 7 Services as participants, one System_Boundary per owning System in step order (Portal, ERP, WMS, ERP-Finance), and 7 numbered steps, each carrying its sender's Message Type. All 7 steps resolve through the Services' Transport Contracts with no issues. See Dynamic Example.
  • Deployment: Order-to-Cash — on servers draws the three servers from the script's ProcessingMachineName (portal-server-01, erp-server-01, wms-server-01) as unbound Deployment_Nodes, each holding the Services that log there. Each Service is written as a Container and stored as a Container Instance; ERP-Finance's two Services run on erp-server-01. See Deployment Example.

Neither needs an Architectural Scope to be promoted.


Navigate the Set

New 7.12 Navigation between the diagrams is inferred every time a diagram opens, from its type, scope, subject, and each element's binding. No links are stored, and there is nothing to sync (Navigation Between C4 Diagrams). After you Promote the six Drafts:

  1. On the L0, Portal offers Inside (Portal's L2), Context (Portal's L1), and Dynamic.
  2. On Portal's L2, INT1337-RCV-Order-Incoming offers Inside: its L3.
  3. On the L3, Zoom out returns to Portal's L2, and the L2's Zoom out goes to Portal's L1.
  4. On the Dynamic, each participant offers Owner: the L2 of its System.

One level at a time: a System opens its L2, never an L3 straight away. Once the generator has added the other Systems' diagrams, ERP on the L0 also offers Context and Inside (Build the Order-to-Cash C4 set).


Next Steps