How to read a drawing

Docs · Learn

Copy as Markdown
View as Markdown

How to read a UJN drawing

You can read a UJN drawing without ever writing one: each shape, line and tab has one meaning, and this page shows them on small drawings.

UJN 0.1 draft · revision 23 · November 29, 2026 · Changes

The checkout, explained#

Drawing of the checkout journey: start from_cart, view Checkout, action Authorize payment, handoff Bank app, view Order confirmed, end paid, system Payment provider, end refused, view Pay later, view Bank transfer. Arrows: from_cart to Checkout; Checkout to Authorize payment on Pay; Authorize payment to Bank app; Bank app to Order confirmed on Approve; Order confirmed to paid on Done; Authorize payment to Payment provider; Payment provider to Authorize payment; Authorize payment to refused; Bank app to Checkout on Decline; Checkout to Pay later on Pay later; Checkout to Bank transfer on Bank transfer.12345678910
  1. 1Start The green ring with a play arrow is where the journey begins, and the plate under it says where the user comes from.
  2. 2View A box with a title bar is a screen the user sees: the bar names its type, and the monospace line at the bottom is its route.
  3. 3Legacy The L tab and the dotted border flag Bank transfer as legacy: an old page that is staying.
  4. 4Planned The » tab and the dotted border flag Pay later as future: planned for a later release, not built yet.
  5. 5Action A box with a gear and no title bar is something the system does between screens; the user sees only its outcome.
  6. 6External system Cut corners and a dark band mark a participant, a person or a service; the cloud and "System, external" say this one is a third-party service the flow calls while the user stays in the app.
  7. 7End, failure A red bullseye with a cross is an end without the outcome, reached by a red arrow with a cross because it is a failure path.
  8. 8Handoff A dashed box is where the user leaves the app, here for up to 5 minutes in their bank app, and the dashed arrows out of it are the ways back.
  9. 9Back in the app Another view: the user lands here after Approve, and the links to its requirement and test are in the file and the model, not in the drawing.
  10. 10End, success A green bullseye with a check is an end where the user got what they came for.

Read it the way the journey goes, from left to right. A solid arrow moves the user on. A dashed one goes back, or comes back from outside the app, as Approve does from the bank app (13.7). A red one with a cross is a failure. The pill on an arrow names what the user does, such as Pay or Approve; out of an action, where nobody clicks, it says when that way is taken (approval needed, card refused). Braces list what an arrow carries: {card, amount} goes to the payment provider and {result} comes back.

Arrows#

There are four kinds of line (13.2). The pill reads "Trigger · guard": what the user does, then when this way is the one taken (13.4).

A solid line with a filled head: the user moves on. The pill names the button or link.

Example 1Try it
@startujnjourney DOCS "How to read a drawing"view cart { title: "Cart"; route: /cart }view checkout { title: "Checkout"; route: /checkout } cart --> checkout : [Check out]@endujn
Drawing of Example 1: view Cart, view Checkout. Arrows: Cart to Checkout on Check out.
Drawn from this text2 nodes · 1 arrow0 warnings

Failure path#

Solid and red, with a cross: an error or a rejection. Both arrows start with Pay; the text after the dot says which one is taken.

Example 2Try it
@startujnjourney DOCS "How to read a drawing (2)"view checkout { title: "Checkout"; route: /checkout }view confirmed { title: "Order confirmed"; route: /orders/:id }view refused { type: toast; title: "Card refused" } checkout --> confirmed : [Pay] card acceptedcheckout -x-> refused : [Pay] card refused@endujn
Drawing of Example 2: view Checkout, view Order confirmed, view Card refused. Arrows: Checkout to Order confirmed on Pay; Checkout to Card refused on Pay.
Drawn from this text3 nodes · 2 arrows0 warnings

Return#

Dashed, with an open head: the user goes back, as when a modal closes. It runs right under the arrow it answers (13.7).

Example 3Try it
@startujnjourney DOCS "How to read a drawing (3)"view checkout { title: "Checkout"; route: /checkout }view terms { type: modal; title: "Terms of sale" } checkout --> terms : [Read terms]terms ..> checkout : [Close]@endujn
Drawing of Example 3: view Checkout, view Terms of sale. Arrows: Checkout to Terms of sale on Read terms; Terms of sale to Checkout on Close.
Drawn from this text2 nodes · 2 arrows0 warnings

Failed return#

Dashed and red, with a cross: the user goes back because something failed. Here a refused card sends the user straight back to Checkout, with no error screen.

Example 4Try it
@startujnjourney DOCS "How to read a drawing (4)"view checkout { title: "Checkout"; route: /checkout }action authorize { title: "Authorize payment" }view confirmed { title: "Order confirmed"; route: /orders/:id } checkout --> authorize : [Pay]authorize --> confirmed : approvedauthorize .x.> checkout : refused@endujn
Drawing of Example 4: view Checkout, action Authorize payment, view Order confirmed. Arrows: Checkout to Authorize payment on Pay; Authorize payment to Order confirmed; Authorize payment to Checkout.
Drawn from this text3 nodes · 3 arrows0 warnings

A call to a system and its reply#

An action calls a system with a solid arrow, and the system replies with a dashed one. Neither has a pill: the braces say what is sent and what comes back. The user stays in the app (14.5).

Example 5Try it
@startujnjourney DOCS "How to read a drawing (5)"action authorize { title: "Authorize payment" }system psp { type: external; title: "Payment provider"; host: api.pay.example } authorize --> psp { payload: [card, amount] }psp ..> authorize { payload: [result] }@endujn
Drawing of Example 5: action Authorize payment, system Payment provider. Arrows: Authorize payment to Payment provider; Payment provider to Authorize payment.
Drawn from this text2 nodes · 2 arrows0 warnings

An arrow after a flag#

A flagged arrow is dotted, with the flag's tab right of its pill. Everything reachable only through it inherits the flag: Pay later and Payment plan get outlined tabs, and the arrow between them is dotted with no tab of its own (13.8).

Example 6Try it
@startujnjourney DOCS "How to read a drawing (6)"view checkout { title: "Checkout"; route: /checkout }view pay_later { title: "Pay later"; route: /checkout/later }view plan { title: "Payment plan"; route: /checkout/plan } checkout --> pay_later : [Pay later] { flags: [future] }pay_later --> plan : [Continue]@endujn
Drawing of Example 6: view Checkout, view Pay later, view Payment plan. Arrows: Checkout to Pay later on Pay later; Pay later to Payment plan on Continue.
Drawn from this text3 nodes · 2 arrows0 warnings

Flags#

A flag never changes a shape. The border goes dotted, and a tab inside the right edge shows the flag: filled where it is set, outlined where it is inherited. UJN has eleven flags (section 8); these four say whether a part is built and whether it stays.

Flag Tab Means Carries down the journey
future » Planned for a later release Yes
deprecated ↓ Exists, and is being retired Yes
legacy L Old, and staying No, for now (23.3)
needs-updates U Exists, but its design or code is out of date No

future and deprecated carry down: everything reachable only through the flagged node inherits them. legacy and needs-updates stay where they are set. Their tabs show the letters L and U until their glyphs are designed (23.4, 23.28).

Example 7Try it
@startujnjourney DOCS "How to read a drawing (7)"start from_cart { description: "From the cart" }view checkout { title: "Checkout"; route: /checkout; flags: [needs-updates] }view pay_later { title: "Pay later"; route: /checkout/later; flags: [future] }view plan { title: "Payment plan"; route: /checkout/plan }view transfer { title: "Bank transfer"; route: /checkout/transfer; flags: [legacy] } from_cart --> checkoutcheckout --> pay_later : [Pay later]pay_later --> plan : [Continue]checkout -up-> transfer : [Bank transfer]@endujn
Drawing of Example 7: start from_cart, view Checkout, view Pay later, view Payment plan, view Bank transfer. Arrows: from_cart to Checkout; Checkout to Pay later on Pay later; Pay later to Payment plan on Continue; Checkout to Bank transfer on Bank transfer.
Drawn from this text5 nodes · 4 arrows0 warnings

Payment plan is planned too, because the only way to it is through Pay later: its tab is outlined and the arrow into it is dotted. Checkout needs updates, but the screens after it do not, so their arrows stay solid.

Every kind of node#

UJN has nine kinds of node. The shape tells you the kind, and the icon and the type name inside tell you the type (19.4).

Where a journey starts and ends#

  • Start (17): a ring where the user enters the journey, one for each way in. Its types are plain, deep link, notification and handoff return.
  • End (17): a bullseye for each way the journey can end: success, failure, or abandoned (an octagon).
  • Actor (12): a person, in a box with cut corners and a dark band. The actor who starts the journey points at its start.
Example 8Try it
@startujnjourney DOCS "How to read a drawing (8)"actor customer { title: "Customer"; role: Shopper }start from_cart { description: "From the cart" }start from_email { type: deep-link; description: "Link in a reminder email"; route: /checkout }view checkout { title: "Checkout"; route: /checkout }end paid { type: success; description: "Order paid" }end refused { type: failure; description: "Card refused" }end left { type: abandoned; description: "Closed the page" } customer --> from_cartfrom_cart --> checkoutfrom_email --> checkoutcheckout --> paid : [Pay] card acceptedcheckout -x-> refused : [Pay] card refusedcheckout --> left : [Close]@endujn
Drawing of Example 8: actor Customer, start from_cart, start from_email, view Checkout, end paid, end refused, end left. Arrows: Customer to from_cart; from_cart to Checkout; from_email to Checkout; Checkout to paid on Pay; Checkout to refused on Pay; Checkout to left on Close.
Drawn from this text7 nodes · 6 arrows0 warnings

Views#

  • View (11): anything the user sees as a window. The title bar names its type. Each view is its own box, so a modal is never drawn inside its page: an arrow goes in and a return comes out.

A page with what opens over it: a drawer (a panel at an edge), a popover (a small panel by a control), a modal (blocks the page until it closes) and a toast (a message that goes away by itself, so its return has no pill).

Example 9Try it
@startujnjourney DOCS "How to read a drawing (9)"view orders { title: "Orders"; route: /orders }view filters { type: drawer; title: "Filters" }view tip { type: popover; title: "What is pending?" }view cancel { type: modal; title: "Cancel order?" }view canceled { type: toast; title: "Order canceled" } orders --> filters : [Filter]filters ..> orders : [Apply]orders --> tip : [?]orders --> cancel : [Cancel order]cancel ..> orders : [Keep it]cancel --> canceled : [Yes, cancel]canceled ..> orders@endujn
Drawing of Example 9: view Orders, view Filters, view What is pending?, view Cancel order?, view Order canceled. Arrows: Orders to Filters on Filter; Filters to Orders on Apply; Orders to What is pending? on ?; Orders to Cancel order? on Cancel order; Cancel order? to Orders on Keep it; Cancel order? to Order canceled on Yes, cancel; Order canceled to Orders.
Drawn from this text5 nodes · 7 arrows0 warnings

The other types: tabs (one tab shown at a time), new window (opens in another browser tab or window), wizard (steps in order, each its own view), embedded (third-party content inside the app) and waiting (the user waits while the system works).

Example 10Try it
@startujnjourney DOCS "How to read a drawing (10)"view checkout { type: wizard; title: "Checkout"; description: "2 steps"; route: /checkout }view address { title: "Address"; description: "Step 1"; parent: checkout }view card { type: embedded; title: "Card form"; description: "Step 2, from the payment provider"; parent: checkout }view paying { type: waiting; title: "Paying"; description: "Waiting for the bank" }view account { type: tabs; title: "Your account"; description: "Orders · Addresses"; route: /account }view help { type: new-window; title: "Help center"; route: https://help.example.com } checkout --> address : [Start]address --> card : [Next]card --> paying : [Pay]paying ..> card : [Cancel]account --> help : [Help]@endujn
Drawing of Example 10: view Checkout, view Address, view Card form, view Paying, view Your account, view Help center. Arrows: Checkout to Address on Start; Address to Card form on Next; Card form to Paying on Pay; Paying to Card form on Cancel; Your account to Help center on Help.
Drawn from this text6 nodes · 5 arrows0 warnings

Actions#

  • Action (14): something the system does between views. The user never sees it, only its outcome. Its box has no title bar.

Auth asks the user to log in or confirm who they are, action does the work, and message sends an email, an SMS or a push. Authorize payment has two exits without a guard, so both happen: the receipt goes out and the confirmation shows.

Example 11Try it
@startujnjourney DOCS "How to read a drawing (11)"view checkout { title: "Checkout"; route: /checkout }action step_up { type: auth; title: "Confirm it is you"; description: "Bank login" }action authorize { title: "Authorize payment" }action receipt { type: message; title: "Send receipt"; channel: email }view confirmed { title: "Order confirmed"; route: /orders/:id } checkout --> step_up : [Pay]step_up --> authorizeauthorize --> receiptauthorize --> confirmed@endujn
Drawing of Example 11: view Checkout, action Confirm it is you, action Authorize payment, action Send receipt, view Order confirmed. Arrows: Checkout to Confirm it is you on Pay; Confirm it is you to Authorize payment; Authorize payment to Send receipt; Authorize payment to Order confirmed.
Drawn from this text5 nodes · 4 arrows0 warnings

Wait is a delay; its exit guarded timeout is taken when the time runs out. Fork and join are bars: the paths between them run at the same time, and the join waits for all of them. Event is something that arrives on its own, and permission asks the user for consent.

Example 12Try it
@startujnjourney DOCS "How to read a drawing (12)"action window { type: wait; title: "Cancel window"; description: "Free to cancel"; timeout: 30 min }action split { type: fork }action reserve { title: "Reserve stock" }action invoice { title: "Create invoice" }action ready { type: join }action shipped { type: event; title: "Parcel shipped"; description: "From the warehouse" }action allow { type: permission; title: "Allow notifications" }view tracking { title: "Tracking"; route: /orders/:id/track } window --> split : timeoutsplit --> reservesplit --> invoicereserve --> readyinvoice --> readyready --> shippedshipped --> allowallow --> tracking@endujn
Drawing of Example 12: action Cancel window, action split, action Reserve stock, action Create invoice, action ready, action Parcel shipped, action Allow notifications, view Tracking. Arrows: Cancel window to split; split to Reserve stock; split to Create invoice; Reserve stock to ready; Create invoice to ready; ready to Parcel shipped; Parcel shipped to Allow notifications; Allow notifications to Tracking.
Drawn from this text8 nodes · 8 arrows0 warnings

Systems, data and people in the flow#

  • System (12): a service an action calls while the user stays in the app. A server icon marks an internal one, a cloud an external one.
  • Data (16): a store an action writes to or reads from, drawn as a cylinder. The arrow points the way the data moves.
  • Actor inline (12.3): a person doing a manual task. Each arrow out is an outcome they pick.
Example 13Try it
@startujnjourney DOCS "How to read a drawing (13)"view checkout { title: "Checkout"; route: /checkout }action place { title: "Place order" }system fraud { title: "Fraud service"; host: fraud.internal }data orders_db { title: "Orders"; location: table orders }actor reviewer { title: "Fraud reviewer"; role: Back office }view confirmed { title: "Order confirmed"; route: /orders/:id }view held { title: "Order on hold"; route: /orders/:id/held } checkout --> place : [Place order]place --> fraud { payload: [order] }fraud ..> place { payload: [score] }place --> orders_db { payload: [order] }place --> confirmed : low riskplace --> reviewer : high riskreviewer --> confirmed : [Approve]reviewer -x-> held : [Hold]@endujn
Drawing of Example 13: view Checkout, action Place order, system Fraud service, data store Orders, actor Fraud reviewer, view Order confirmed, view Order on hold. Arrows: Checkout to Place order on Place order; Place order to Fraud service; Fraud service to Place order; Place order to Orders; Place order to Order confirmed; Place order to Fraud reviewer; Fraud reviewer to Order confirmed on Approve; Fraud reviewer to Order on hold on Hold.
Drawn from this text7 nodes · 8 arrows0 warnings

Leaving the app#

  • Handoff (15): a dashed box where the user leaves the app, for a bank app, an email link or a phone call. The type name says whether they come back.

The bank app returns: Approve comes back through a start of type handoff return, and Decline goes back to Checkout. Call support does not return: the journey ends out there.

Example 14Try it
@startujnjourney DOCS "How to read a drawing (14)"start from_cart { description: "From the cart" }view checkout { title: "Checkout"; route: /checkout }handoff bank_app { title: "Bank app"; description: "Approve the payment"; channel: bank app; timeout: 5 min }start back { type: handoff-return; description: "Back from the bank"; route: /checkout/return }view confirmed { title: "Order confirmed"; route: /orders/:id }handoff call_us { type: no-return; title: "Call support"; channel: phone } from_cart --> checkoutcheckout --> bank_app : [Pay with bank app]bank_app ..> back : [Approve]bank_app .x.> checkout : [Decline]back --> confirmedcheckout -down-> call_us : [Call us]@endujn
Drawing of Example 14: start from_cart, view Checkout, handoff Bank app, start back, view Order confirmed, handoff Call support. Arrows: from_cart to Checkout; Checkout to Bank app on Pay with bank app; Bank app to back on Approve; Bank app to Checkout on Decline; back to Order confirmed; Checkout to Call support on Call us.
Drawn from this text6 nodes · 6 arrows0 warnings

Other journeys#

  • Journey reference (18): another journey, drawn in its own diagram. Its pointed side faces away from the arrow that leads in, and the other journey's id is on its bottom line.

Sign in is a call: the user comes back to Checkout by the dashed line beside the arrow. Return an item is a go-to: the user carries on in that journey.

Example 15Try it
@startujnjourney DOCS "How to read a drawing (15)"view checkout { title: "Checkout"; route: /checkout }ref sign_in { journey: LOGIN; title: "Sign in" }view confirmed { title: "Order confirmed"; route: /orders/:id }ref returns { journey: RETURNS; title: "Return an item" } checkout -up-> sign_in : [Sign in] { returns }checkout --> confirmed : [Pay]confirmed --> returns : [Return an item]@endujn
Drawing of Example 15: view Checkout, journey reference Sign in, view Order confirmed, journey reference Return an item. Arrows: Checkout to Sign in on Sign in; Checkout to Order confirmed on Pay; Order confirmed to Return an item on Return an item.
Drawn from this text4 nodes · 3 arrows0 warnings