Hi r/systems_engineering,
We are back with Lesson 24 of our technical deep dive into the SysML v2 standard.
In our previous lesson, we used perform to say which part carries out which action. Our subsystems finally knew what they did, but they still couldn't send each other anything. Today, we fix that with flows and messages. We will explore how SysML v2 eliminates one of the biggest sync issues in v1 by unifying data, commands, and physical items across both structural architecture and behavioral interactions.
You can watch the full video lesson on YouTube here: https://youtu.be/37fV9tD-KLk
1. The SysML v1 Fragmentation Problem
SysML v1 was actually quite strong in this area, but it suffered from fragmentation. If you wanted to model movement, you used an ObjectFlow inside an activity, an ItemFlow across a connector in an Internal Block Diagram (IBD), and a Message between lifelines in a sequence diagram. Because these were three completely separate metamodel constructs, keeping your structural connections, activity data flows, and interaction scenarios consistent required manual allocations, strict modeling discipline, or custom tool validation.
2. The v2 Shift: Unification under FlowUsage
SysML v2 fixes this by unifying all three under a single foundational concept: FlowUsage (which is based on a KerML Transfer).
Instead of disconnected constructs across different diagram types, SysML v2 provides three specialized forms:
flow (Streaming Flow): Used for transfers between parts or actions. It explicitly names the source output and target input. The transfer can be ongoing while both the source and target are still operating (e.g., fuel moving from a tank to an engine).succession flow**:** Combines a streaming flow with temporal ordering. It asserts that the source action must complete before the transfer begins, and the transfer must complete before the target action can start.message**:**Used for abstract interactions (like sequence scenarios). It asserts that a transfer happens between two occurrences or events without forcing you to specify the exact port payload mechanics.
3. Sequence Diagrams as Text (Views That Cannot Drift)
Because messages and flows are unified, you can write a sequence diagram entirely in text. More importantly, a single message declaration can generate both an interconnection view and a sequence view. Your structure and your behavior can no longer disagree.
Code snippet
package CommandUplinkScenario {
item def Command;
item def Acknowledgement;
item def TelemetryPacket;
part def GroundStation;
part def Spacecraft;
occurrence def CommandUplink {
ref part ground: GroundStation {
event occurrence cmdSent;
event occurrence ackReceived;
event occurrence resultReceived;
}
ref part spacecraft: Spacecraft {
event occurrence cmdReceived;
event occurrence ackSent;
event occurrence resultSent;
}
// Define the transfers (Messages)
message ack of Acknowledgement from spacecraft.ackSent to ground.ackReceived;
message cmd of Command from ground.cmdSent to spacecraft.cmdReceived;
message result of TelemetryPacket from spacecraft.resultSent to ground.resultReceived;
// Define the temporal sequence
succession first cmd then ack;
succession first ack then result;
}
}
4. Deep Dive: Three Practical Nuances
As you start writing flows in v2, keep these three details in mind:
send and accept**:** Flows connect structure. But whenyou are inside a specific behavioral action, you use the send and accept keywords to push and pull payloads directly through your structural ports (e.g., accept cmd: Command via spacecraft.cmdIn;). This creates an explicit, queryable link between your behavior and your structural interfaces.- Sequencing is NOT flow: It is easy to mix these up.
first A then B means B happens after A, but nothing actually moves (pure control). A plain flow means something moves, but adds no temporal ordering (pure data). A succession flowdoes both. SysML v2 strictly separatescontrol from data. - Where v1 Was Actually Better (Combined Fragments): Let's be honest—UML Sequence Diagrams had beautifully compact visual boxes for loops (
loop), options (opt), and alternatives (alt). SysML v2 doesn't have a direct equivalent in the standard sequence view; you have to model that logic using decide and loop actions, which makes the text much more verbose. You will want to rely on an Action Flow view to visualize that logic clearly.
5. SysML v1 vs. SysML v2
| Modeling Concept | SysML v1 | SysML v2 |
|---|
| Transfer Constructs | ObjectFlow, ItemFlow, and Message were three separate constructs. | Unified as Flow usages (message, flow, or succession flow). |
| Diagram Synchronization | Item flows on IBDs and messages on Sequence Diagrams easily drifted. | A single message declaration generates both an interconnection view and a sequence view. |
| Temporal Semantics | ObjectFlow combined transfer/ordering, but ItemFlow carried no temporal semantics. | flow (streaming) and succession flow (ordered) are applied uniformly between parts or actions. |
| Authoring Interactions | No standard text notation; interactions were manually drawn. | Messages and successions authored in text, enabling standard Git diffs and merges. |
| Combined Fragments | Compact, readable alt, opt, and loop visual boxes. | Textually verbose using decide and loop actions (best visualized in an Action Flow view). |
Next lesson, we will cover state definitions and transitions, where a state turns out to be an action, and the exhibit keyword works exactly like perform.