Black Friday week: every question bank $9 instead of $15. Ends Monday, Nov 30.
OCUP 2 Advanced · OMG · StateMachines · Bank updated 2026-11-28
OMG OCUP 2 Advanced (UML 2 Advanced) practice questions: StateMachines
5 free questions from 14 on this area · answer and explanation for each · no sign-up
These 5 questions come from the StateMachines section of ExamDeck's OMG OCUP 2 Advanced (UML 2 Advanced) bank: 14 of its 172 original questions are on this area, which carries 5% of the real exam. Each is open without sign-up, with the correct answer, the reasoning for every option and its source. In all, 65 OMG OCUP 2 Advanced (UML 2 Advanced) questions are open on the practice pages; a free account adds 6 more in study mode.
Questions on this page last changed 28 Nov 2026. Exam facts checked 8 Nov 2026.
Free: 6 questions in study mode, no card. All 14 StateMachines questions and the full OCUP 2 Advanced bank: $9 (regularly $15) one-time.
How this bank fits the current exam. The bank has questions in all eleven of OMG's areas, but not yet in the exam's proportions: Common Structure (21% of the exam), The MOF & Metamodeling (12%) and Interactions (9%) are covered more thinly than their weight. Our questions come only from the open OMG specifications - UML 2.5.1, MOF 2.5.1, fUML 1.5 and Alf 1.1 - not from the books on the info sheet's study list.
The full exam blueprint →
Source: OMG UML 2 Advanced exam info sheet
1/5 · StateMachines · hard
Composite state Order has an entry behavior and an exit behavior. Its direct substate Packing is active and has an exit behavior. Event ship triggers a local transition t from Order to its direct substate Shipping, which has an entry behavior. t has an effect behavior. In which order do the behaviors execute?
A. exit Packing and Order, effect of t, entry Order and Shipping
B. effect of t, then exit Packing, then entry Shipping
C. exit Packing, then effect of t, then entry Shipping
D. exit Order, then effect of t, then entry Order and Shipping
Answer: C. A local transition does not exit its composite source state, so Order's exit and entry behaviors are skipped, but the active substate is exited. The transition execution sequence puts exits first, then the effect, then entries of the target.
- A. This is the sequence for an external transition. A local transition does not exit the composite source state (14.5.12).
- B. Packing is correctly exited, but exits come before the effect of the transition (14.2.3.9.6).
- C. A local transition exits and re-enters states within the composite state but not the composite state itself, and the effect runs between exits and entries (14.5.12, 14.2.3.9.6).
- D. Order would be left and re-entered, which is external behavior; local keeps Order active (14.5.12).
Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 14.5.12, p. 404 · StateMachines / 14.5.12 TransitionKind / local
2/5 · StateMachines · hard
State Suspended lists event type tick as deferrable. A transition whose source is Suspended also names tick among its triggers and has no guard. A tick occurrence is dispatched while Suspended is active. What is the outcome?
A. the occurrence is dispatched and the transition fires despite the deferral
B. the occurrence stays in the pool until Suspended is no longer active
C. the occurrence is discarded because the state defers that type
D. the occurrence fires the transition and also stays in the pool
Answer: A. A deferring state keeps occurrences of the deferred types in the event pool. The exception is a deferred type that is used explicitly as a trigger of a transition whose source is the deferring state: that works as an override, so the occurrence is dispatched and consumed by the transition.
- A. Using a deferred type in a trigger of a transition from the deferring state lets the occurrence be consumed (14.2.3.4.4).
- B. This is the default for deferred types, but the explicit trigger on a transition from the deferring state overrides it.
- C. Deferred occurrences are retained in the pool, not discarded; discarding applies only when nothing is enabled and the type is not deferred.
- D. An occurrence is consumed once it fires a transition; it is not kept in the pool as well.
Source: OMG Unified Modeling Language 2.5.1, 14.2.3.4.4 State history, p. 351 · StateMachines / 14.2.3.4.4 State history / deferred events
3/5 · StateMachines
A modeler draws a ProtocolStateMachine for class Account to describe the legal call sequences and wants to enrich its states. Which element is allowed in that model?
A. a state invariant written in square brackets after the state name
B. an entry behavior on each state that records every incoming call
C. a doActivity on a state that keeps polling the account balance
D. a shallowHistory pseudostate placed inside a region of the machine
Answer: A. A ProtocolStateMachine gives an external, black-box view of the legal invocation order. Its states cannot have entry, exit or doActivity behaviors, and it cannot contain history pseudostates. A state invariant, shown in square brackets after the state name, is allowed and acts as an extra condition on the transitions.
- A. Protocol states may carry invariants, shown in brackets (14.4.4.1, 14.5.9.6).
- B. States of a ProtocolStateMachine cannot have entry behaviors (14.5.4).
- C. doActivity behaviors are also prohibited on protocol states (14.5.4).
- D. ProtocolStateMachines cannot contain deep or shallow history pseudostates (14.5.4).
Source: OMG Unified Modeling Language 2.5.1, 14.5.4 ProtocolStateMachine, p. 389-390 · StateMachines / 14.5.4 ProtocolStateMachine / constraints on states and pseudostates
4/5 · StateMachines · hard
Composite state Checkout has two orthogonal regions. In each region a transition from an inner state terminates on the same exitPoint pseudostate of Checkout, and one external transition leaves that exit point toward Done. How does the exit point behave?
A. it lets the first region to arrive leave, aborting the other region
B. it makes the model ill formed when regions share an exit point
C. it acts as a join and waits for both regions before exit proceeds
D. it lets each region leave separately, running the exit behavior twice
Answer: C. An exitPoint reached by transitions from orthogonal regions of the composite state acts like a join pseudostate. The outgoing external transition continues only when all those incoming transitions have completed, and the composite state's exit behavior then runs as part of exiting the state.
- A. Nothing in the pseudostate semantics lets one region abort the other at the exit point (14.2.3.7).
- B. Several orthogonal regions may terminate on one exit point; this is explicitly described (14.2.3.7).
- C. Multiple transitions from orthogonal regions ending on an exit point make it act like a join (14.2.3.7).
- D. The composite state is exited once, with its exit behavior executed once (14.2.3.7).
Source: OMG Unified Modeling Language 2.5.1, 14.2.3.7 Pseudostate and PseudostateKind, p. 354-355 · StateMachines / 14.2.3.7 Pseudostate and PseudostateKind / exitPoint
5/5 · StateMachines · hard
In an extension StateMachine, state Review redefines state Review of the extended machine. The original has entry behavior logEntry and doActivity monitor. The redefining state specifies only an entry behavior, audit. Which behaviors apply to the redefining state?
A. entry logEntry followed by audit, plus doActivity monitor
B. entry audit, plus the inherited doActivity monitor
C. entry audit only, with the doActivity monitor dropped
D. none until the redefinition restates every behavior
Answer: B. For a redefining state, any entry, exit or doActivity behavior it specifies applies regardless of the redefined state. For a behavior it does not specify, the corresponding behavior of the redefined state also applies. Here audit replaces logEntry, while monitor is inherited.
- A. A specified entry behavior replaces the redefined one; both do not run (14.3.3.3).
- B. Specified behaviors replace; unspecified ones are inherited from the redefined state (14.3.3.3).
- C. The doActivity is not specified in the redefinition, so the inherited one still applies (14.3.3.3).
- D. No such requirement exists; partial specification is allowed (14.3.3.3).
Source: OMG Unified Modeling Language 2.5.1, 14.3.3.3 Vertex Redefinition, p. 380 · StateMachines / 14.3.3.3 Vertex Redefinition / inherited state behaviors
Other OCUP 2 Advanced areas
The same kind of free sample for every other section of the OCUP 2 Advanced bank:
Practise OCUP 2 Advanced with instant feedback
6 free questions in study mode · no card · full OCUP 2 Advanced bank with area filters and the error log: $9 (regularly $15) one-time · no dumps, no ads.
Start OCUP 2 Advanced free →
ExamDeck is an independent study tool, not affiliated with, endorsed by, or sponsored by OMG. OCUP 2 Advanced and related marks are trademarks of their respective owners, used for identification only. Exam facts checked against official OMG materials (as of November 2026); always confirm current details with the vendor before booking.