Skip to content
Sequence & interaction templates

Teaching Case — Branches That Overlap, and an Input With Nowhere to Go

The one check here that would cry wolf constantly if it were not gated, and the gate is the point. Free-text guards parse as ordinary values, so two prose branches look disjoint and exhaustive of nothing — which is why this check runs only on a fragment that declares what it is testing and over what domain. Given that declaration it becomes exact: two branches that both accept the same scores, and a band of scores no branch accepts at all. Both draw as a fragment with arrows in every branch.

Template previewSequence & interaction
Credit decision5 messages · deepest 2 openaltscore · [0..600][550..820]score(applicant)refer(applicant)declineddeclinedreferredIntakeRules engineManual review1 statement in this interaction contradicts another, and 1 more is probably not what was meant —over 3 lifelines and 5 messages.ERRORTwo branches of the `alt` on line 9 can both fire: `[0..600]` and `[550..820]` both accept [550..600]. Only onebranch of an `alt` runs, so which of the two it is is not in the document — and both branches are drawn witharrows in them either way.WARNThe `alt` on line 9 tests `score` over [0..1000], and nothing in it handles (820..1000]. An input that matches nobranch falls through the whole fragment, which draws as a fragment with arrows in every branch.INFO3 lifelines, 5 messages, 1 fragment. 2 synchronous calls, 2 answered; the deepest point of the interaction has 2calls open at once. Every message states whether it is a call, a reply or a fire-and-forget, so the stack above wassimulated 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, unreturned-call, deadlock, after-destroy, before-create, double-create, double-destroy,par-interference, activation-claim, unused-participant, undeclared-lifeline, duplicate-id, fragment-unclosed.

Make it your own.

sequence "Credit decision"

participant Intake  "Intake"
participant Rules   "Rules engine"
participant Manual  "Manual review"

Intake -> Rules : score(applicant)

alt on score : [0..1000]
  when [0..600]
    Rules  -> Manual : refer(applicant)
    Manual reply Rules : declined
    Rules  reply Intake : declined
  when [550..820]
    Rules reply Intake : referred
end