ZenUML sequence diagram in Markdown to PDF

Sequence diagrams are written the way code reads: method calls, nested blocks, conditions and return values, in ZenUML syntax.

Sequence diagrams written as method calls with blocks, conditions and return values, in ZenUML syntax, for the order service of an online pharmacy.

Markdown source

Markdown · 29 lines
---
title: Order service, call sequence
author: Platform team
---

# Placing an order: the call sequence

The online pharmacy of a Danish chain checks the prescription before it takes payment. The sequence is written as method calls.

```mermaid
zenuml
  title Place order
  @Actor Customer
  @Boundary Shop
  @Control OrderService
  @Database Orders
  @Starter(Customer)
  Shop.checkout(cart) {
    OrderService.create(cart) {
      if(prescriptionNeeded) {
        OrderService.checkPrescription()
      }
      Orders.save(order)
      return orderId
    }
  }
```

Orders without a prescription item skip the check and go straight to payment.

Rendered pages

PDF · 1 page · 8 KB
  1. ZenUML sequence diagrams, page 1 of 1

The sample documents describe invented organizations in several countries. All names and figures are illustrative.

Mermaid diagrams in Markdown to PDF: every sampleIn the Markdown reference