A sequence diagram consists of several objects with one timeline each, between which interactions take place. Some of the permitted types of interactions in a sequence diagram are method calls, returns and exceptions. OCL constraints can be used to define object properties at certain “Points-in-time”. The elements participating in a sequence diagram are objects (instances of various classes). The messages exchanged by these elements are method invocations.
With a sequence diagram, the desired system runs can be represented in order to better understand the system that needs to be implemented. Further, a sequence diagram can be used to define exemplary runs in tests as well as modelling of test drivers.
In sequence diagrams, we need to analyse and document the use cases. Each use case describes the main business task required. The system use case diagram is part of this activity.
Later we come to design each subsystem, namely each element participating in the system use case diagram. We draw one or more class diagrams depicting the classes participating in the solution. Then we can draw a sequence diagram for the most important (or difficult to understand) methods
System Sequence Diagram
The elements participating (exchanging messages) in a system sequence diagram are Actors and Systems. The messages exchanged by these elements could be any type depending on the systems (from web service calls to data input from a human).
System Sequence Diagrams are used to define the input and outputs and sequence of interaction between the user and the system for a use case. They are used in conjunction with activity diagrams. In Sequence Diagrams, there is information flow in and out of a system are called messages. The users are identified and detailed messages are described.
A System sequence diagram visualises a use case, while a sequence diagram visualises a method of a class.
In a system sequence diagram, participating elements are known as ‘actors and systems’ while in a sequence diagram elements participating are called ‘objects’.