Study guide
8.2 Transitions, Trigger-Guard-Effect Syntax & State Behaviors
OMG Certified Systems Modeling Professional — Model User OCSMP OMG-OCSMP-MU100
Track your progress as you read
Finished sections get a check mark.
1 Introduction & Exam Overview
About the OCSMP Model User (OMG-OCSMP-MU100) Exam
2 Chapter 1: SysML Overview, Diagram Framework & Model Organization
1.1 SysML Overview, MBSE Foundations & Diagram Frame Syntax 1.2 Model Organization, Packages & Viewpoints
3 Chapter 2: Block Definition Diagrams — Blocks & Structural Features
2.1 Block Definitions, Features & Compartments 2.2 ValueTypes, Units, Dimensions & Primitive Types 2.3 Specialization, Generalization & Inheritance Hierarchies
4 Chapter 3: Block Definition Diagrams — Associations, Composition & Multiplicities
3.1 Associations, Composite Aggregation & Reference Associations 3.2 Multiplicities, Reference Properties & Association Ends
5 Chapter 4: Internal Block Diagrams — Internal Structure & Interconnection
4.1 Enclosing Blocks & Part Usages 4.2 Standard Ports, Flow Ports & Interfaces 4.3 Connectors, Item Flows & Flow Specifications
6 Chapter 5: Parametric Diagrams & Constraint Modeling
5.1 Constraint Blocks, Properties & Mathematical Expressions 5.2 Parametric Diagrams & Binding Connectors
7 Chapter 6: Activity Diagrams — Control & Object Flows
6.1 Activity Diagram Anatomy & Control Nodes 6.2 Object Flow, Pins & Activity Parameter Nodes 6.3 Decision, Merge, Fork & Join Execution
8 Chapter 7: Activity Diagrams — Partitions & Action Types
7.1 Activity Partitions (Swimlanes) & Structural Allocation 7.2 Action Types: Call Behavior, Send Signal & Accept Event
9 Chapter 8: State Machine Diagrams — States, Transitions & Events
8.1 State Machine Basics: States, Regions & Orthogonality 8.2 Transitions, Trigger-Guard-Effect Syntax & State Behaviors 8.3 Event Types & Run-to-Completion Semantics
10 Chapter 9: Sequence Diagrams — Message Interactions & Lifelines
9.1 Sequence Diagram Fundamentals, Lifelines & Execution 9.2 Message Types & Interaction References (ref)
11 Chapter 10: Cross-Cutting Constructs — Allocations & Metadata
10.1 The «allocate» Dependency: Semantics & Types 10.2 Allocation Representations: Callouts, Compartments, Partitions & Tables 10.3 Comments, Rationales, Problems, Stereotypes, Frames & Diagram Descriptions
12 Chapter 11: Requirement Diagrams — Requirements Modeling & Traceability
11.1 Requirement Element Definition, ID, Text & Compartments 11.2 Key Relationships: Derive, Satisfy & Verify 11.3 Refine, Trace & Containment Hierarchies
13 Chapter 12: Use Case Diagrams — System Context & Capabilities
12.1 Actors, Use Cases & Subject Boundaries 12.2 Associations, Include, Extend & Generalization
8.2 Transitions, Trigger-Guard-Effect Syntax & State Behaviors
Key Takeaways Explain This Topic AI
A Transition represents a directed change of state, visualized as an open arrow leading from a source vertex to a target vertex.
Canonical transition syntax is trigger [guard] / effect, where trigger is an event, guard is an optional boolean condition, and effect is an atomic behavioral action.
States define internal behaviors: entry / runs upon arrival, exit / runs upon departure, and do / executes an ongoing, interruptible activity while residing in the state.
An internal transition handles an event without exiting the state; its effect executes without invoking either exit or entry behaviors.
When an external transition fires, behaviors execute in strict chronological sequence: source state exit -> transition effect -> target state entry.
Last updated: September 2026
8.2 Transitions, Trigger-Guard-Effect Syntax & State Behaviors
Quick Reference: Transitions dictate how a system moves between states. The canonical transition string adheres to trigger [guard] / effect . Triggers are events that stimulate evaluation; guards are boolean expressions in square brackets [...] evaluated at dispatch time; and effects are atomic, non-interruptible actions executed during traversal. States possess internal behaviors: entry / (runs upon entry), exit / (runs upon exit), and do / (interruptible ongoing activity). An internal transition executes an effect inside the state without firing exit or entry behaviors.
Anatomy of a State Transition
A Transition is a directed relationship between a source state (or pseudostate) and a target state (or pseudostate). It signifies that when specific conditions are met, the system departs the source vertex and enters the target vertex, changing the active state configuration.
Graphically, a transition is rendered as a solid line with an open arrowhead pointing from the source vertex to the target vertex. The transition line is annotated with a text label adhering to a strict SysML/UML grammar.
The Canonical Transition Syntax: trigger [guard] / effect
The text string associated with a transition adheres to the formal OMG specification grammar: trigger [guard] / effect
Each component governs a precise phase of transition traversal:
1. The Trigger ( trigger )
Specifies the event that stimulates the transition evaluation (e.g., EngineStartCmd , TimerExpired , SensorThresholdExceeded ).
Can include parameters passed by the event: CommandRcvd(commandID: Integer, param: Real) .
A transition can specify multiple triggers separated by commas: Trigger1, Trigger2 [guard] / effect . In this case, the occurrence of either event will trigger the transition evaluation.
2. The Guard ( [guard] )
A boolean expression enclosed in square brackets [...] (e.g., [voltage >= 12.0 && fuelLevel > 15] ).
Evaluation Timing: Evaluated at the exact instant the trigger event is dispatched from the event pool. It is not a continuous polling monitor. If the guard evaluates to false , the transition cannot fire, and the event is consumed and discarded (unless another transition is enabled or the event is deferred).
A guard must be side-effect free; evaluating the guard condition cannot modify system property values.
3. The Effect ( / effect )
An optional behavioral action preceded by a forward slash ( / ) .
Specifies an atomic, non-interruptible behavior executed during transition traversal (e.g., / logModeChange(); setThrottle(50) ).
Can invoke operations, send signals, or assign values to structural block properties.
Optionality and Completion Transitions
All three components of the transition string are optional:
No Trigger (Anonymous / Completion Transition): An unlabeled transition or a transition containing only [guard] / effect . It fires automatically as soon as the source state finishes all internal behaviors (its do activity completes or all nested regions reach final states), provided the guard evaluates to true.
No Guard: If the guard is omitted, the transition fires unconditionally whenever the trigger event occurs.
No Effect: If the effect is omitted, the state machine transitions from source to target without executing an action during the traversal.
State Body Internal Behaviors: entry , exit , and do
States in SysML are not passive labels; they specify internal behavioral lifecycles. Inside the internal behaviors compartment of a state, three standardized keywords specify execution timing: +---------------------------------------+
- | Monitoring |
- +---------------------------------------+
- | entry / initializeSensors() |
- | do / continuousPressureSampling() |
- | exit / archiveBuffer() |
- +---------------------------------------+
- 1. entry / <behavior>
Executes immediately upon entering the state, directly after the incoming transition effect completes.
Non-interruptible: Runs to completion. The state machine will not process any new events or initiate outgoing transitions until the entry behavior finishes.
Used for initialization, asserting invariants, engaging hardware interlocks, or logging state arrival.
2. exit / <behavior>
Executes immediately when departing the state via an external transition, before the transition effect executes.
Non-interruptible: Runs to completion.
Used for cleanup, releasing shared resources, saving volatile data, or disabling actuators.
3. do / <ongoing-behavior>
Specifies an ongoing activity that commences execution only after the entry behavior has completed.
Executes concurrently while the system resides in the state.
Crucially Interruptible: Unlike entry and exit , a do behavior can be interrupted at any moment. If an external transition fires while the do activity is running, the do activity is aborted immediately prior to running the exit behavior.
If the do behavior runs to normal completion without interruption, the state machine posts an internal completion event , which enables any outgoing anonymous completion transitions.
External Transitions versus Internal Transitions
A critical distinction on the OCSMP Model User exam is the difference between an External Transition , an External Self-Transition , and an Internal Transition .
Transition Type Graphical Representation Does it Leave the State? Executes exit Behavior? Executes entry Behavior? Interrupts Ongoing do Activity?
External Transition Arrow departing State A and entering State B Yes Yes (State A) Yes (State B) Yes
External Self-Transition Arrow departing State A, looping around, and re-entering State A Yes Yes (State A) Yes (State A) Yes (Aborts and restarts do )
Internal Transition Text line inside the state compartment: trigger [guard] / effect No No No No (Continues uninterrupted)
Deep-Dive: Internal Transitions
An Internal Transition is written directly inside the text compartment of the state without any arrow departing the state boundary: +---------------------------------------+
- | Operational |
- +---------------------------------------+
- | entry / powerUpSubsystems() |
- | do / processWorkload() |
- | exit / powerDownSubsystems() |
- +---------------------------------------+
- | PingQuery / sendHeartbeat() |
- +---------------------------------------+
When the PingQuery event occurs:
The transition effect sendHeartbeat() executes.
The system does NOT exit Operational .
The exit / powerDownSubsystems() behavior is NOT invoked.
The entry / powerUpSubsystems() behavior is NOT invoked.
The ongoing do / processWorkload() behavior is NOT interrupted.
If PingQuery had been drawn as an external self-transition (an arrow looping from Operational back to Operational ), the system would have aborted processWorkload() , executed powerDownSubsystems() , executed sendHeartbeat() , executed powerUpSubsystems() , and restarted processWorkload() . Using internal transitions avoids this destructive cycling.
Strict Chronological Execution Ordering
When an external transition fires between two states, SysML defines a strictly deterministic, non-overlapping execution sequence: Source Exit ────> Transition Effect ────> Target Entry
Comprehensive Worked Example
Consider a spacecraft propulsion controller transitioning from State A (Primed) to State B (Firing) :
State A ( Primed ):
- entry / openFuelValve()
- do / monitorPressure()
- exit / closeFuelValve()
- Transition: IgnitionCmd [pressure > 50] / igniteThruster()
State B ( Firing ):
- entry / logBurnStart()
- do / executeBurnProfile()
- exit / logBurnComplete()
When the IgnitionCmd event is dispatched and the guard [pressure > 50] evaluates to true , the state machine executes the following chronological steps:
Abort Ongoing Behavior: The ongoing do / monitorPressure() activity in State A is immediately terminated.
Execute Source Exit: The exit / closeFuelValve() behavior of State A executes to completion.
Execute Transition Effect: The transition effect / igniteThruster() executes to completion.
Execute Target Entry: The entry / logBurnStart() behavior of State B executes to completion.
Initiate Target Do Activity: The ongoing do / executeBurnProfile() activity in State B begins running.
Exam Warning: Questions frequently test whether the transition effect executes before or after the source state's exit behavior. Always remember: Exit comes first! You must exit the source state before you can traverse the transition effect, and you must traverse the transition effect before you enter the target state.
Comparison: State Behaviors versus Transition Effects
Dimension entry / <behavior> exit / <behavior> do / <behavior> Transition / effect
Location Inside state compartment Inside state compartment Inside state compartment Along transition path (or inside internal transition)
Execution Timing Immediately after entering state Immediately before leaving state After entry finishes, runs during dwell During transition traversal, between exit and entry
Interruptibility Non-interruptible (runs to completion) Non-interruptible (runs to completion) Interruptible (aborted upon external transition) Non-interruptible (runs to completion)
Typical Purpose State setup, invariant assertion State cleanup, resource release Continuous execution, sampling loops Bridge actions, event logging, parameter passing
Exam Pitfalls & Misconceptions
Concept Correct SysML Rule Common Exam Trap / Distractor
Internal vs Self-Transition Internal transitions do NOT execute exit or entry behaviors; external self-transitions DO execute both. Believing that internal transitions and self-transitions are functionally identical.
Execution Sequence Source exit executes before the transition effect ; target entry executes after the transition effect. Placing the transition effect before source state exit, or target entry before transition effect.
do Behavior Interruptibility An ongoing do activity is immediately aborted when an external transition fires out of the state. Claiming that outgoing transitions must wait until the do activity finishes on its own.
Guard Evaluation Moment A guard [condition] is evaluated only at the instant its trigger event is dispatched from the event pool. Believing a guard continuously monitors the system and automatically fires the instant it becomes true without an event.
Anonymous Transitions Transitions without a trigger fire automatically upon completion of the source state's activities. Believing anonymous transitions can never fire, or that they fire instantaneously without letting do finish.