Skip to content
Sequence & interaction templates

Teaching Case — A Message to a Lifeline That No Longer Exists

A session is closed and then used. In every tool that draws lifelines the full height of the figure, the arrow lands on an ordinary dashed line and looks exactly like a message to a live object — which is why the defect survives review. Here the lifeline stops at the destruction cross, so the message visibly lands on nothing AND the panel says which line destroyed it. The second finding is its consequence: the call that message opened can never be answered.

Template previewSequence & interaction
Session teardown7 messages · deepest 3 openlogoutinvalidate()delete(sid)okinvalidatedtouch(sid)204 No ContentUserAPISessionSession store1 statement in this interaction contradicts another, and 1 more is probably not what was meant — over 4 lifelines and 7 messages.ERROR`Session` is destroyed on line 13 and receives a message on line 15. The arrow lands on an ordinary dashed line in every tool that draws lifelines full height;here the lifeline stops at the ✕, so the message visibly lands on nothing.WARN1 call is never answered: `Api` → `Session` on line 15. A synchronous caller waits, so as drawn that lifeline is blocked when the interaction ends. A diagramdeliberately drawn as an excerpt can say so with `async` for a message nobody waits on, or `ref` for an interaction shown elsewhere.INFO4 lifelines, 7 messages. 4 synchronous calls, 3 answered; the deepest point of the interaction has 3 calls open at once. Every message states whether it is acall, a reply or a fire-and-forget, so the stack above was simulated rather than guessed at.OK15 of the 17 checks ran over every instance of their subject and found nothing: misdirected-reply, orphan-reply, conditional-reply, deadlock, before-create,double-create, double-destroy, par-interference, guard-overlap, guard-incomplete, activation-claim, unused-participant, undeclared-lifeline, duplicate-id,fragment-unclosed.

Make it your own.

sequence "Session teardown"

actor       User
participant Api     "API"
participant Session "Session"
database    Store   "Session store"

User -> Api         : logout
Api  -> Session     : invalidate()
Session -> Store    : delete(sid)
Store reply Session : ok
Session reply Api   : invalidated
Api destroy Session

Api -> Session      : touch(sid)
Api reply User      : 204 No Content