Modeling interactions in use-cases: are messages the rigth thing to do?

13 views
Skip to first unread message

Florian Mayer

unread,
Nov 21, 2025, 10:40:48 AM11/21/25
to The SysML v2 Book
Hello SysML community,

it seems I have the honor to start the first conversation :). Hope to make this right...

I want to model a use case for an emergency brake assist (EBA) at a functional level (no technical systems known yet). I feel I should use messages to model the interactions between an external obstacle (actor) with the EBA system (subject) which then would hit the brake which I would also model as a message at this level of abstraction.

Here is a UML-diagram of what I have in mind - imagine the elements "Sensing", "Thinking", "Execution" as comprised by a not shown part "EBASystem":

PlantUML diagram

My issue: When declaring the message "obstacle_occurs" between obstacle and EBASystem, Syside shows an error: "Event occurrence usage must reference an occurrence usage". 

Here is the code snippet:

    part def MissionContext {
        part eba_system : EBA_System;
        part obstacle : EnvironmentObject;
        part street : Street;

        use case imminent_collision {
            subject system_sbj = eba_system;
            actor obstacle_act = obstacle;
            actor street_act = street;
            objective emergency_break_on_imminent_collision {
                doc /* Avoid a collision when an obstacle occurs in the driving path. */
            }

            message obstacle_occures from obstacle_act to system_sbj;
        }
    }    

The error disappears when saying message obstacle_occures from obstacle_act to eba_system;

I wonder if I have a methodological problem when using messages for interactions of a use case. Why should I not have actors sending messages to the subject in a use-case?

Thanks for answering this in advance!

Tim Weilkiens

unread,
Nov 22, 2025, 1:09:25 AM11/22/25
to The SysML v2 Book
Hi Florian,

We plan the chapter about connections and messages for the next release. So, the answer to your question is not in the book yet. 

The source and target of a message are event occurrences that represent the event of sending and receiving the message. Actually, it is the same in UML/SysML v1, but there they are not shown in the diagram (they are called MessageOccurrenceSpecification). If you ever did a OCUP or OCSMP certification exam, you probably remember the questions about sequence diagrams. Some questions were about the ordering of the events.

Coming back to your question. With event occurrences owned by your sender and receiver and linked to the message, it works. I also changed the binding of the use case parameters to subsetting. With that, the parameters inherit the event occurrences, and you can, for example, change the parameter assignments in a specialized use case which is not possible with binding.

  part def MissionContext {
        part eba_system : EBA_System {
event occurrence evReceive;
}
        part obstacle : EnvironmentObject {
event occurrence evSend;
}
        part street : Street;

        use case imminent_collision {
            subject system_sbj :> eba_system;
            actor obstacle_act :> obstacle;
            actor street_act :> street;
            objective emergency_break_on_imminent_collision {
                doc /* Avoid a collision when an obstacle occurs in the driving path. */
            }

            message obstacle_occures from obstacle_act.evSend to system_sbj.evReceive;
        }
    }  

Cheers,
Tim

Florian Mayer

unread,
Nov 25, 2025, 3:23:26 AM11/25/25
to The SysML v2 Book
Thanks Tim! I tried your suggestion and it worked - appreciate your guidance!

Also helpful for me was to further study the examples provided in the "Intro to the SysML Language Textual Notation" (section about interactions) from the SysML Release. My next challenge will be to realize a use case by an architectural design...
Reply all
Reply to author
Forward
0 new messages