BPMN Order Process

An online shop receives an order, checks stock, then charges the card and packs the parcel at the same time before shipping. This page draws that process in BPMN 2.0 (Business Process Model and Notation), the OMG standard for business processes. BPMN is not UML: UML covers software structure and behaviour; BPMN, swimlanes and journey maps are the other standard notations used alongside it when the subject is how a business works.


1. The Diagram

Online Shop Order Process (BPMN 2.0 collaboration) Customer Online Shop Sales Warehouse Finance Order received Check stock In stock? No Notify customer out of stock Order rejected Yes Pick and pack Charge card Ship order book courier Order shipped order out-of-stock email shipping notice
  1. The Customer pool is collapsed (a black box). We do not model the customer's internal steps, only the messages they exchange with the shop.
  2. A message flow (dashed, circle at the tail) carries the order into the shop and triggers the message start event Order received in the Sales lane.
  3. Sales performs Check stock, then an exclusive gateway (X) asks In stock?. Exactly one outgoing path is taken.
  4. If not, Sales sends an out-of-stock email (another message flow back to the customer) and the process ends at Order rejected.
  5. If yes, a parallel gateway (+) splits the flow: Warehouse picks and packs while Finance charges the card. Both tokens run at once.
  6. The second parallel gateway is a join: it waits until both branches arrive. Nothing ships before the card is charged.
  7. Warehouse ships the order and the process ends with a message end event that sends the shipping notice to the customer.

2. How to Read It

BPMN 2.0 Core Notation Start event Message catch Timer catch Message end Task Activity (work) Exclusive (XOR) Parallel (AND) Event-based Sequence flow (inside a pool) Message flow (between pools) Pool Lane A Lane B Pool = participant Lane = role inside it

Events are circles (thin = start, double = intermediate, thick = end), activities are rounded rectangles, gateways are diamonds. Solid arrows are sequence flows and may never cross a pool boundary; between pools only dashed message flows are allowed. Lanes divide one participant by role or department.

3. Variant: Waiting for Payment

Variant: Waiting for Payment (event-based gateway) Finance Order confirmed Request payment send pay link Payment received Release to warehouse Order released 48 hours Cancel order release stock Order cancelled Whichever event happens first wins; the other path is discarded.

Real orders often wait for an external event, such as a bank transfer. An event-based gateway (diamond with a pentagon in a double circle) waits for the first of several events: a Payment received message releases the order; a 48 hours timer cancels it and returns the stock. Drawing the timeout explicitly is one of the main reasons to use BPMN over a plain flowchart.

4. Pros, Cons, and When to Use

Pros

Cons

When to use

When not to use

5. As Diagrams-as-Code

Mermaid has no BPMN renderer, so the usual diagrams-as-code approach is a Mermaid flowchart with subgraphs as lanes. For an executable model, export BPMN 2.0 XML from bpmn.io or Camunda Modeler instead.

flowchart LR
    subgraph Sales
        S((Order received)) --> CS[Check stock] --> G{In stock?}
        G -- No --> N[Notify customer] --> E1(((Order rejected)))
    end
    subgraph Warehouse
        P[Pick and pack]
        SH[Ship order] --> E2(((Order shipped)))
    end
    subgraph Finance
        C[Charge card]
    end
    G -- Yes --> P
    G -- Yes --> C
    P --> SH
    C --> SH

The flowchart loses the gateway types and message flows; keep the BPMN drawing as the reference and the Mermaid as a readable summary.