Appearance
Examples
Each example shows its code next to the graph it renders. The graphs are rendered by the same renderer as the editor, in the Classic Light stylesheet in the light theme and in the Classic Dark stylesheet in the dark theme.
A start, an activity and an end
The smallest process: a start, one work step and an end, each linked to the next.
pml
START 'Order received' NEXT
ACTIVITY 'Pack order' NEXT
END 'Order shipped'Implicit NEXT
A NEXT without a target links to the next node in the text.
pml
START 'Request in' NEXT
ACTIVITY 'Read request' NEXT
ACTIVITY 'Answer request' NEXT
END 'Request answered'Explicit NEXT with labels
A string after a target labels its link. See Explicit identifiers.
pml
START 'Ticket opened' NEXT Triage
ACTIVITY Triage 'Triage ticket' NEXT Fix 'Bug' AND Answer 'Question'
ACTIVITY Fix 'Fix bug' NEXT Close
ACTIVITY Answer 'Answer question' NEXT Close
END Close 'Ticket closed'A gateway with branches
A gateway branches into labelled links, and one branch rejoins the other.
pml
START 'Invoice received' NEXT
GATEWAY-EXCLUSIVE 'Amount above limit?' NEXT 'Ask approval' 'Yes' AND 'Pay invoice' 'No'
ACTIVITY 'Ask approval' NEXT 'Pay invoice'
ACTIVITY 'Pay invoice' NEXT
END 'Invoice paid'A parallel split and join
A parallel gateway splits the flow into two steps, and a second one joins them.
pml
START 'Order confirmed' NEXT
GATEWAY-PARALLEL 'Split' NEXT 'Pack goods' AND 'Send invoice'
ACTIVITY 'Pack goods' NEXT 'Join'
ACTIVITY 'Send invoice' NEXT 'Join'
GATEWAY-PARALLEL 'Join' NEXT
END 'Order complete'Lanes
Each LANE groups the nodes after it into a swimlane, and declaring a lane again returns to it.
pml
LANE Customer
START 'Need a quote' NEXT
ACTIVITY 'Request quote' NEXT
LANE Sales
ACTIVITY 'Prepare quote' NEXT
ACTIVITY 'Send quote' NEXT
LANE Customer
END 'Quote received'Pools with a message flow
Two pools, each with its own flow, and a message flow between them.
pml
POOL Customer
START 'Wants a product' NEXT
ACTIVITY 'Place order' NEXT-MESSAGE 'Process order' 'Order form' NEXT
END 'Order placed'
POOL Shop
START 'Order arrives' NEXT
ACTIVITY 'Process order' NEXT
END 'Order processed'Event types
Each event keyword draws its own marker.
pml
START 'Application sent' NEXT
EVENT-MESSAGE 'Confirmation received' NEXT
EVENT-TIMER 'Two weeks passed' NEXT
EVENT-CONDITIONAL 'Review complete' NEXT
EVENT-SIGNAL 'Decision published' NEXT
END 'Application closed'A terminate end
END-TERMINATE ends the whole process at once.
pml
START 'Payment started' NEXT
GATEWAY-EXCLUSIVE 'Card valid?' NEXT 'Charge card' 'Yes' AND 'Payment refused' 'No'
ACTIVITY 'Charge card' NEXT
END 'Payment done'
END-TERMINATE 'Payment refused'Attachments with associations
A database and a data object are associated with the steps that use them.
pml
START 'Order received' NEXT
ACTIVITY 'Check stock' NEXT
ACTIVITY 'Write invoice' NEXT
END 'Order handled'
DATABASE 'Stock' NEXT-ASSOCIATION 'Check stock'
DATA 'Invoice' NEXT-ASSOCIATION 'Write invoice'A text annotation
A TEXT line explains the node it links to.
pml
START 'Claim filed' NEXT
ACTIVITY 'Assess claim' NEXT
END 'Claim settled'
TEXT 'Within five working days' NEXT 'Assess claim'A complete small process
Lanes, a database, a gateway and two ends in one process.
pml
LANE Customer
START 'Order placed' NEXT
ACTIVITY 'Pay order' NEXT
LANE Shop
DATABASE 'Stock' NEXT 'Check stock'
ACTIVITY 'Check stock' NEXT
GATEWAY-EXCLUSIVE 'In stock?' NEXT 'Ship order' 'Yes' AND 'Refund order' 'No'
ACTIVITY 'Ship order' NEXT
END 'Order delivered'
ACTIVITY 'Refund order' NEXT
END 'Order refunded'