Black Friday week: every question bank $9 instead of $15. Ends Monday, Nov 30.
Home › OCUP 2 Advanced › Practice questions › Common Behavior
OCUP 2 Advanced · OMG · Common Behavior · Bank updated 2026-11-28

OMG OCUP 2 Advanced (UML 2 Advanced) practice questions: Common Behavior

5 free questions from 12 on this area · answer and explanation for each · no sign-up

These 5 questions come from the Common Behavior section of ExamDeck's OMG OCUP 2 Advanced (UML 2 Advanced) bank: 12 of its 172 original questions are on this area, which carries 3% 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.

Try 6 free OCUP 2 Advanced questions → All OCUP 2 Advanced sample questions

Free: 6 questions in study mode, no card. All 12 Common Behavior 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 · Common Behavior
A behavior declares two triggers: one for a SignalEvent of signal Alarm and one written as 'all'. The receiving object then gets an Alarm signal instance followed by a Ping signal instance, and no trigger exists for Ping. How are the triggers matched?
A. Alarm matches the Alarm trigger, and Ping matches the 'all' trigger
B. Alarm matches both triggers, and Ping matches the 'all' trigger
C. Alarm and Ping both match the 'all' trigger, and the Alarm trigger stays idle
D. Alarm matches the Alarm trigger, and Ping remains unmatched by any trigger
Answer: A. An AnyReceiveEvent trigger (notation 'all') can fire on any message, but not when a SignalEvent or CallEvent trigger specifically matches that message. Alarm is therefore handled by its own trigger, while Ping, which is not handled explicitly, is caught by 'all'.
  • A. An 'all' trigger fires for messages not matched by a specific SignalEvent or CallEvent trigger (13.3.3.2, 13.4.1).
  • B. When a specific trigger matches the message, the AnyReceiveEvent trigger is not triggered by it (13.3.3.2).
  • C. A specific trigger that matches Alarm keeps Alarm away from 'all', so the Alarm trigger does respond (13.3.3.2).
  • D. Ping is not handled by any specific trigger, so the 'all' trigger covers it (13.3.3.2, 13.3.4).
Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 13.3.3.2, p. 334 · Common Behavior / 13.3.3.2 Message Events / AnyReceiveEvent Trigger
2/5 · Common Behavior · hard
A behavior owns a precondition Constraint requiring that a buffer is not empty. Another behavior invokes it while the buffer is empty. What does the UML specification define for this invocation?
A. its semantics are intentionally left undefined by the specification
B. the invocation is rejected and an exception reaches the caller
C. the behavior runs but its postconditions are no longer required
D. the invocation waits in the event pool until the condition holds
Answer: A. Preconditions are conditions that shall be true at invocation and may be assumed by the Behavior's specification. When one is not satisfied, UML intentionally leaves the semantics of the invocation undefined, so no rejection, waiting or recovery is prescribed.
  • A. 13.2.3.1 states that the semantics of an invocation with an unsatisfied precondition are intentionally undefined.
  • B. Rejection with an exception is not specified; exception propagation in 13.2.3.1 concerns exceptions raised during an execution.
  • C. Postconditions are guaranteed only if preconditions held, but the standard does not define a run with waived postconditions.
  • D. The event pool holds event occurrences for triggers (13.3.3.1); it is not a mechanism for deferring invocations on preconditions.
Source: OMG Unified Modeling Language 2.5.1, 13.2.3.1, p. 328-329 · Common Behavior / 13.2.3.1 Behaviors / preconditions and undefined semantics
3/5 · Common Behavior · hard
An OpaqueBehavior has two body Strings: one written in OCL and one in a general-purpose programming language, with matching language Strings. A tool must decide which body defines the behavior. What does UML state?
A. either body can determine the behavior, and the choice rule is not defined
B. the first body in the sequence is authoritative and the other is documentation
C. both bodies run one after the other in the order they are listed
D. the body whose language is OCL is chosen because UML defines OCL
Answer: A. Body Strings are alternative specifications. Languages are matched to bodies by order, but if several bodies exist any one may determine the behavior and UML does not say how the choice is made.
  • A. 13.2.3.3 says any one of the bodies can be used and the specification does not determine how the choice is made.
  • B. Order is used only to match languages to bodies, not to rank bodies.
  • C. The bodies are alternative means of specifying the behavior, not steps to execute.
  • D. UML does not define how bodies are interpreted for any language; OCL is only an example of a language String.
Source: OMG Unified Modeling Language 2.5.1, 13.2.3.3, p. 330 · Common Behavior / 13.2.3.3 Opaque and Function Behaviors / multiple body Strings
4/5 · Common Behavior · hard
Two behavior executions share one context object. Both wait at a Trigger matching the signal Alarm, and a single Alarm occurrence arrives in the object's event pool. What happens to it?
A. exactly one of the waiting behaviors consumes it
B. each waiting behavior receives its own copy of it
C. both consume it at once, as they share a context object
D. it is discarded as the dispatch target is ambiguous
Answer: A. A context object mediates event handling for all its behavior executions, which share its event pool. When a matching occurrence is dispatched it is removed from the pool, so only one Behavior can consume it.
  • A. 13.3.3.1 notes that behaviors with the same context object share the pool but an occurrence can be consumed by only one.
  • B. Copying per behavior is not defined; the pool is shared and the occurrence is removed once dispatched.
  • C. Sharing the pool does not allow shared consumption; the occurrence is removed on dispatch.
  • D. The standard does not discard it; it also does not require a specific order of dispatch.
Source: OMG Unified Modeling Language 2.5.1, 13.3.3.1, p. 333-334 · Common Behavior / 13.3.3.1 Event Dispatching / shared event pool
5/5 · Common Behavior
A behavior is invoked at time 0 and spends 20 seconds in an initialization step. It then comes to a point where it needs a Trigger written 'after 5 seconds'. When does the TimeEvent occur?
A. 5 seconds after the behavior was invoked
B. 5 seconds after the context object was created
C. 25 seconds after the behavior was invoked
D. at the 5-second mark of the system clock
Answer: C. A relative TimeEvent needs a starting time. For an outstanding Trigger at a wait point it is the time when the Behavior reached that wait point. An absolute TimeEvent would use 'at' and a fixed instant instead.
  • A. The starting time is not the invocation of the behavior, so this moment is too early.
  • B. Creation of the context object is not the reference point defined for relative TimeEvents.
  • C. 13.3.3.4 sets the starting time of a relative TimeEvent to the moment the behavior came to the wait point, here 20 s, plus 5 s.
  • D. That describes an absolute time ('at'), not a relative one ('after').
Source: OMG Unified Modeling Language 2.5.1, 13.3.3.4, p. 335 · Common Behavior / 13.3.3.4 Time Events / starting time of a relative TimeEvent
Try 6 more free OCUP 2 Advanced questions → See the whole OCUP 2 Advanced bank

Other OCUP 2 Advanced areas

The same kind of free sample for every other section of the OCUP 2 Advanced bank:

Alf14 qfUML15 qThe MOF & Metamodeling12 qCommon Structure37 qClassification8 qStateMachines14 qStructured Classifiers14 qActivities18 qInteractions13 qActions15 q

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 →
Read next
OCUP 2 Advanced: Who Needs the Top UML Certification and How It Differs from Intermediate OCUP 2 Advanced costs $350, needs Foundation and Intermediate and puts 24% of the exam on MOF, fUML and Alf. Who needs the top UML level and who can stop.
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.