SysML Modeling Scenarios with Sequence Diagram

Categories:

Recommended

SysML: Modeling Scenarios with Sequence Diagram

9-11 minutes

A sequence diagram is a kind of behavior diagram that presents a dynamic view of the use case, a requirement, or a system, a view that expresses sequences of behaviors and event occurrences over time. You can use elements called lifelines to model the participants in system behavior and then use messages between lifelines to model interactions among those participants. Interaction uses to let you model behavioral decomposition among a set of interactions. You can also specify time constraints and duration constraints on interactions.

SysML includes the Sequence Diagram only and excludes the Interaction Overview Diagram and Communication Diagram, which were considered to offer significantly overlapping functionality without adding the significant capability for system modeling applications. The Timing Diagram is also excluded due to concerns about its maturity and suitability for systems engineering needs

Why Scenario Modeling with Sequence Diagram?

A use case is a collection of interactions between external actors and a system. A use case is “the specification of a sequence of actions, including variants, that a system (or entity)can perform, interacting with actors of the system.

A scenario is one path or flows through a use case that describes a sequence of events that occurs during one particular execution of a system which is often represented by a sequence diagram.

User requirements are captured as use cases that are refined into scenarios. A use case is a collection of interactions between external actors and a system. Typically each use case includes a primary scenario (or main course of events) and zero or more secondary scenarios that are alternative courses of events to the primary scenario. It is often useful to visualize use case scenarios for the following reasons:

  • Understanding the requirements in more detail by creating a model of the end-users problems (Modelling the Problem)
  • Typically, however, after defining an initial System Architecture and exploring the capabilities of the system (captured as Use Cases) you’ll want to see how the capabilities are delivered by the components within the System Architecture(Modelling the Solution).
  • high-level interactions between the user of the system and the system, between the system and other systems, or between subsystems (sometimes known as system sequence diagrams)

Sequence Diagrams at a Glance

Sequence Diagram is an interaction diagram that details how operations are carried out— what messages are sent and when. Sequence diagrams are organized according to time. The time progresses as you go down the page. The objects involved in the operation are listed from left to right according to when they take part in the message sequence.

Sequence Diagrams show elements as they interact over time and they are organized according to object (horizontally) and time (vertically):

Object (lifeline) Dimension

  • An object lifeline represents the existence of an object over some time. Objects that exist throughout an interaction should appear at the top of the object dimension with their lifelines drawn parallel to the Time dimension. Objects that are created and destroyed dynamically (transient objects) have object lifelines that begin and end with a receipt of a message.
  • The horizontal axis shows the elements that are involved in the interaction
  • Conventionally, the objects involved in the operation are listed from left to right according to when they take part in the message sequence. However, the elements on the horizontal axis may appear in any order

Time Dimension

The vertical axis represents time proceedings (or progressing) down the page.

The Example below is a generic sequence diagram showing the sequence of messages interacted between the objects with frames and message constraints.

Flow of Control and Messages

A focus of control , also known as the Activation bar, illustrates the period an object is acting. Actions can either be performed directly by an object or through a subordinate object to which it has sent messages.

Messages specify communication from one object to another, with an expectation that an activity will be performed by the recipient object.

Messages depict the invocation of operations are shown horizontally. They are drawn from the sender to the receiver. Ordering is indicated by the vertical position, with the first message shown at the top of the diagram, and the last message shown at the bottom. As a result, sequence numbers are optional.

The line type and arrowhead type indicates the type of message is used:

Creation and Destruction Messages

Participants do not necessarily live for the entire duration of a sequence diagram’s interaction. Participants can be created and destroyed according to the messages that are being passed.

A constructor message creates its receiver. The sender that already exists at the start of the interaction is placed at the top of the diagram. Targets that are created during the interaction by a constructor call are automatically placed further down the diagram.

A destructor message destroys its receiver. There are other ways to indicate that a target is destroyed during an interaction. Only when a target’s destruction is set to ‘after destructor’ do you have to use a destructor.

Category:

VP Flipbook Maker

Created a flipbook like this. This flipbook is made with Visual Paradigm Online. Try this free flipbook maker and create you own flipbook now!