OCUP 2 Foundation study materials
OCUP 2 Foundation study resources

OCUP 2 Foundation: UML Behavioral Diagram Types

OCUP 2 Foundation · Work through your exam, one topic at a time.

All guide sections

UML Behavioral Diagram Types

What the exam tests

OCUP 2 Foundation treats behavioral diagrams as the seven UML 2.5 diagram kinds that show dynamic behavior: Use Case, Activity, State Machine, and the four Interaction diagrams (Sequence, Communication, Timing, Interaction Overview). Expect items on which diagram shows what, which notation element belongs to which diagram, and the meaning of arrows and pseudostates.

Core rules

  • Use case diagrams: actors, use cases (ellipses), subject boundary. «include» points from base to included behavior and is mandatory; «extend» points from the extending use case to the base and is conditional, optionally with an extension point and condition.
  • Activity diagrams: token flow. Initial node is a filled circle, activity final is a bullseye, flow final is a circle with X. Decisions and merges use diamonds; forks and joins use thick bars. Object flows connect pins; partitions (swimlanes) organize responsibility.
  • State machines: transitions have trigger [guard] / effect. States can carry entry/exit/do behaviors. Pseudostates include initial, choice, junction, fork, join, shallow history H, deep history H*, terminate, entry and exit points.
  • Sequence diagrams: lifelines, activation bars, synchronous messages (filled arrow), asynchronous (open arrow), replies (dashed open arrow), combined fragments with operators alt, opt, loop, par, critical, break, neg, assert; interaction use «ref».
  • Communication diagrams emphasize links and numbered messages; Timing diagrams plot state or value change against time.

Worked example

A model shows a dashed arrow labelled «extend» from Pay by card to Checkout, with condition [amount > 50]. Reading: Pay by card is optional behavior that may occur at the extension point in Checkout when the guard holds; Checkout does not require it. If the arrow ran the other way with «include», Checkout would always execute Pay by card.

Traps

  • Reversing include and extend.
  • Confusing activity final with flow final: flow final ends one token, not the whole activity.
  • Calling a thick bar a decision; it is a fork or join.
  • Expecting sequence diagrams to model class structure; they model interaction order.
  • Treating history pseudostates as ordinary states.