Beyond the Basics of Sequence Diagrams: Part 2

We wrap up the week with where we left off with Sequence Diagrams and a look into more advanced elements. Today we will concentrate on the use of Gates in Sequence Diagrams.

Gates

The previous post illustrated how to reference another sequence diagram via sending across data through parameters and also return values. Yet, there’s another way to send across data between two sequence diagrams. Gates could be regarded as being a simple way to model the passing of data between a sequence diagram and its context. A gate is a message that is highlighted with one end connected to the sequence diagram’s frame’s edge and the other end connected to a lifeline. A reworking of Figure 1  (from Part 1 of this series) using gates can be seen in the following diagram.

Figure 2 (from Part 1 of this series) with the utilization of gates would look like what is shown below.

Figure 2 has an entry gate called getBalance that takes the parameter of accountNumber. The getBalance message is an entry gate, because it is the arrowed line that is linked to the diagram’s frame with the arrowhead linked to a lifeline. The sequence diagram has an exit gate, which returns the balance variable. The exit gate is known, because it’s a return message that is connected from a lifeline to the diagram’s frame with the arrowhead connected to the frame.

The real purpose behind these recent posts on Sequence Diagrams have been to offer anyone, irrespective of their experience in UML, with an effective  “crash course” in understanding this area. We think this aim has been achieved. After this series is over (stay tuned for Part 3 next week!), we hope to bring more interesting insights into UML during the coming weeks and months. Till then, Happy Diagramming!

Join over thousands of organizations that use Creately to brainstorm, plan, analyze, and execute their projects successfully.

Get started here
Download our all-new eBook for tips on 50 powerful Business Diagrams for Strategic Planning.

Author

Nishadha

Software engineer turned tech evangelist. I handle marketing stuff here at Creately including writing blog posts and handling social media accounts. In my spare time, I love to read and travel.

Leave a comment

*
*

16 − three =

Back to top