OCUP 2 Intermediate · OMG · Common Behavior · Bank updated 2026-11-03
OCUP 2 Intermediate practice questions: Common Behavior
5 free questions from 30 on this area · answer and explanation for each · no sign-up
These 5 questions come from the Common Behavior section of our OCUP 2 Intermediate bank (30 questions on this area, which carries 10% of the real exam). Every question is original, with the correct answer explained and linked to the source it is drawn from.
Free: 6 questions in study mode, no card. All 30 Common Behavior questions and the full OCUP 2 Intermediate bank: $15 one-time.
1/5 · Common Behavior
State Monitoring in a boiler controller's state machine has an internal transition 'when (temperature > 80) / logWarning()'. While the machine stays in Monitoring, the temperature climbs from 75 to 85 and then holds at 85 for an hour, and a tick event is dispatched to the machine every minute. How many times does logWarning() run during that period?
AEvery time the change expression is evaluated as true
BOnce with each tick dispatched while it remains true
COnly once, when the expression first becomes true
DNever, unless some action announces the change
Answer: C. Sub clause 13.3.3.3 (PDF p. 335) states that a ChangeEvent occurrence is generated any time the value of the changeExpression changes from false to true, and the same sub clause (PDF p. 334) says a ChangeEvent occurs implicitly, not as the result of an explicit action. The temperature crosses the threshold once and then stays above it, so exactly one occurrence triggers logWarning().
Source: OMG UML 2.5.1 specification
2/5 · Common Behavior · hard
In a model, class Pump has a StateMachine among its owned behaviors, and an entry Behavior is placed inside that StateMachine. Under UML 2.5.1, which element is the context of the entry Behavior?
AClass Pump, the classifier that owns the StateMachine
BThe StateMachine that contains the entry Behavior
CThe entry Behavior itself, as a stand-alone Behavior
DNo context, because no classifier owns the entry Behavior directly
Answer: A. Clause 13.2.3.4 says a Behavior that is not directly an ownedBehavior of a BehavioredClassifier may still have a context. To find it, take the first BehavioredClassifier reached by following the chain of ownership relationships. If that element is itself a Behavior with a non-empty context, that context is also the context of the original Behavior. The StateMachine owned by Pump is such a Behavior, so the context of the entry Behavior is Pump, the classifier that owns the StateMachine. Source: OMG UML 2.5.1 (formal/17-12-05), clause 13.2.3.4.
Source: OMG UML 2.5.1 specification
3/5 · Common Behavior
Behavior Transfer has three output Parameters: result, and errNetwork and errTimeout, both marked isException=true. Which outcome is allowed when an execution of Transfer completes?
ABoth errNetwork and errTimeout carry values while result stays empty.
BerrNetwork and result both carry values, and errTimeout stays empty.
CExactly one exception Parameter carries a value and nothing else does.
DAll three output Parameters carry values at the same time.
Answer: C. For output Parameters with isException=true, on completion either none of them has a value, or exactly one has a value and no other Parameter, exception or ordinary, has any. Returning a value in an exception Parameter is also not the same as raising an exception in the sense of 15.5.3.
Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 13.2.3.2 Behavior Parameters, p. 329-330
Source: OMG UML 2.5.1 specification
4/5 · Common Behavior
Behavior Checkout invokes Behavior Validate synchronously. During the execution, Validate completes through the raising of an exception. According to UML 2.5.1, what happens to the exception?
AIt is propagated to Checkout, the Behavior that invoked Validate
BIt is lost once Validate completes, as asynchronous results are
CIt is placed in the event pool of the context object of Checkout
DIt is converted into a value of an exception Parameter of Validate
Answer: A. A Behavior may complete as a result of the raising of an exception. If it was invoked synchronously, the exception is propagated to the caller (13.2.3.1). Losing outputs is the fate of results of asynchronous invocations (13.2.3.2), and exception Parameters are a separate mechanism that is explicitly not 'raising an exception'.
Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 13.2.3.1, p. 328-329
Source: OMG UML 2.5.1 specification
5/5 · Common Behavior · hard
Class Router has the ports north and south. In its state machine, a Transition has a Trigger for the SignalEvent of Signal Probe, and the Trigger specifies the port north. Which Probe occurrences does this Trigger match under UML 2.5.1?
AProbe occurrences received by Router through any port it owns
BProbe occurrences received through the port north or the port south
CProbe occurrences arriving through the port north and Router's own sends
DProbe occurrences whose messages arrive through the port north
Answer: D. A Trigger may specify one or more ports; its event must then be a MessageEvent, and the Trigger only matches occurrences for messages received through one of the specified Ports (13.3.3.2).
Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 13.3.3.2, p. 334
Source: OMG UML 2.5.1 specification
Other OCUP 2 Intermediate areas
The same kind of free sample for every other section of the OCUP 2 Intermediate bank:
Practise OCUP 2 Intermediate with instant feedback
6 free questions in study mode · no card · full OCUP 2 Intermediate bank with area filters and the error log: $15 one-time · no dumps, no ads.
Start OCUP 2 Intermediate free →
ExamDeck is an independent study tool, not affiliated with, endorsed by, or sponsored by OMG. OCUP 2 Intermediate and related marks are trademarks of their respective owners, used for identification only. Exam facts checked against official OMG materials (as of October 2026); always confirm current details with the vendor before booking.