Sequence Diagram
Introduction Dynamic View State chart Diagram Collaboration Diagram Sequence Diagram آزمايشگاه سيستم هاي همشمند
Sequence & Collaboration Diagram describe the flow of messages between objects. Sequence Diagram: focus on the order in which the messages are sent Collaboration Diagram: emphasizes the relationships between the objects
Sequence Diagram showing concurrent multi-threaded interactions. finding race conditions in concurrent systems
Notation Objects or Acotors Lifelines Activations box (method-invocation boxes) Messages
Notation [sequence number] <<Create>> ,<<Destroy>> , C++ , C# & java garbage collection Return value Dashed line message with a label Method name : return value Loop Send message to itself
Type of Message Asynchronous: the sender doesn’t wait for the result of the message hardware devices, autonomous software services Synchronous: sender waits for the result before continuing on
Another Notation
Example (condition UML 1.x) Condition to one message
Example (condition UML 2) group of messages
Combined Fragment (UML 2) Alternative (alt) : model if, else Option (opt) Loop (loop) : [minint=no, maxint=no]
Example