System Behavior
Behavior modeling in SysML
SysML behaviors are described with activity, sequence, and state machine diagrams (plus use cases for scope). Each answers a different question, and many exam items simply test whether you can pick the right one.
Activities model flow of control and data as tokens. Actions consume and produce tokens through pins; object flows carry them and must be type-compatible with the pins. A decision node selects exactly one outgoing path; a merge joins alternative paths; a fork emits tokens on all outgoing edges and a join waits for all incoming edges. Partitions (swimlanes) map actions to structural elements; they are not control logic.
Sequence diagrams show one scenario as an ordered exchange between lifelines. Distinguish synchronous messages (with replies) from asynchronous ones, and know the combined fragments alt, opt, loop, and par. Ordering, not data transformation, is the point.
State machines describe event-driven lifecycles. A transition has a trigger, guard, and effect; a state may have entry, exit, and do behaviors. Composite states have regions, and history pseudostates (shallow versus deep) restore prior configurations.
Traps: treating a guard as a trigger, or an action as an event; assuming a decision can branch to several paths at once; forgetting that a do behavior runs while the state is active and is interruptible; using a sequence diagram to express data flow; ignoring that activity parameters can be streaming.
Rule of thumb: if the wording is "all paths are taken," reach for fork/join; if it is "one of the paths," reach for decision/merge.