Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Execution

An execution is a thin white bar on a lifeline, showing where it is active. Write a block after a message to open one. Bars nest and step to the right as calls go deeper.

diagram sequence "Nested executions"

participant App
participant Parser

App -> Parser : parse() {
  Parser -> Parser : next token
  return ast
}
Nested executions App Parser parse() next token ast

return sends a reply from inside a block, to the block’s caller, and ends the bar when it is the last statement.

Syntax

<a> -> <b> : label { ... }
return [text]

A plain synchronous self-call also opens a short nested bar.

Specification

UML 2.5.1, 17.2.4.4 (p. 569).

Used in

Interrupt handling with a nested IRQ, Raft log replication.