Login Sequence Diagram Uml

broken image


Create Sequence Diagrams Online

  1. Jan 31, 2018 This is the UML sequence diagram of Login Authentication System which shows the interaction between the objects of Permission and Authrozation, Password, Username, Change Password, Groups. The instance of class objects involved in this UML Sequence Diagram of Login Authentication System are as follows: Permission and Authrozation Object.
  2. UML sequence diagrams are just one type of many UML diagrams. Check out all our UML diagramming resources for more help learning how to make UML diagrams and when to use them. Other UML Video Tutorials: How to Make a Class Diagram in UML; How to make a State Diagram in UML; Blog Posts: What is UML? Everything You Need to Know About the Unified.

UML 2 Tutorial - Sequence Diagram Sequence Diagrams. A sequence diagram is a form of interaction diagram which shows objects as lifelines running down the page, with their interactions over time represented as messages drawn as arrows from the source lifeline to the target lifeline. UML is a modeling toolkit that guides the creation and notation of many types of diagrams, including behavior diagrams, interaction diagrams, and structure diagrams. A sequence diagram is a type of interaction diagram because it describes how—and in what order—a group of objects works together.

Create sequence diagrams in seconds with GenMyModel, a free uml online tool to draw UML diagrams.

  • Sequence Diagram Examples to get started quickly
  • No install, web-based application
  • Export (UML,PDF,SVG,JPG)

Draw UML Sequence Diagrams Online

Easy and fast

GenMyModel is an UML editor with powerful features for creating UML sequence diagrams, in the web browser. GenMyModel helps you create sequence diagrams with amazing ease, there's no install, no setup and no learning curve to get started.It's just a matter of drag, drop and connect.

UML compliant

At anytime, GenMyModel assists you draw a valid UML sequence diagram by highlighting the UML elements that match an UML-compliant architecture. It saves time when creating UML elements such as lifelines, behaviors, calls, replies, etc.

  • Design easily
  • Share and export
  • Edit all UML properties

UML Sequence Diagram

Online

Within GenMyModel, you can create your sequence diagram online, share and export images. Everything is handled in your web-browser with an intuitive user interface. The sequence diagrams conform the UML2 standard. You get both a visual representation, called the diagram, and the internal structure of your model in a tree-based representation. It works on Windows, Mac, Linux and the supported browsers are IE, Chrome, Firefox, Safari and Opera.

Unified Modeling Language

A sequence diagram in the Unified Modeling Language (UML) is an interaction diagram that shows how processes operate with one another and in what order. UML sequence diagrams model the flow of logic within your system in a visual manner, enabling you both to document and validate your logic, and are commonly used for both analysis and design purposes. Sequence diagrams are the most popular UML artifact for dynamic modeling, which focuses on identifying the behavior within your system.

Diagram

The sequence diagram is a construct of a message sequence chart. A sequence diagram shows object interactions arranged in time sequence. It depicts the objects and classes involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functionality of the scenario. Sequence diagrams are typically associated with use case realizations.

A sequence diagram shows, as parallel vertical lines (lifelines), different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in which they occur. This allows the specification of simple runtime scenarios in a graphical manner.

Sequence diagrams are typically used to model usage scenarios, the logic of methods and the logic of services.

Stihl hedge trimmer. Source: agilemodeling

Sequence Diagram Examples

GenMyModel comes with many free examples, clonable in just a click. You can access these designed templates from the dashboard area. The examples contain sequence diagrams but also class diagrams, use case diagrams and activity diagrams.

The Restaurant example designed in GenMyModel

Login Sequence Diagram Uml Tutorial


Learn more about how to draw more diagrams in GenMyModel: Flowchart software, BPMN online

Sequence diagram is the most common kind of interaction diagram, which focuses on the message interchange between a number of lifelines.

Sequence diagram describes an interaction by focusing on the sequence of messages that are exchanged, along with their corresponding occurrence specifications on the lifelines.

The following nodes and edges are typically drawn in a UMLsequence diagram: lifeline, execution specification, message, combined fragment, interaction use, state invariant, continuation, destruction occurrence.

Major elements of the sequence diagram are shown on the picture below.

You can find some sequence diagram examples here:

Lifeline

Lifeline is a named element which represents an individual participant in the interaction. While parts and structural features may have multiplicity greater than 1, lifelines represent only one interacting entity.

If the referenced connectable element is multivalued (i.e, has a multiplicity > 1), then the lifeline may have an expression (selector) that specifies which particular part is represented by this lifeline. If the selector is omitted, this means that an arbitrary representative of the multivalued connectable element is chosen.

A lifeline is shown using a symbol that consists of a rectangle forming its 'head' followed by a vertical line (which may be dashed) that represents the lifetime of the participant.

Information identifying the lifeline is displayed inside the rectangle in the following format (slightly modified from what's in UML 2.4 standard):

lifeline-ident ::= [ connectable-element-name [ '[' selector ']' ]] [ ':' class-name ] [ decomposition ] | 'self'
selector ::= expression
decomposition ::= 'ref' interaction-ident [ 'strict' ]

where class-name is the type referenced by the represented connectable element. Note that although the syntax allows it, lifeline-ident cannot be empty.

The lifeline head has a shape that is based on the classifier for the part that this lifeline represents. Usually the head is a white rectangle containing name of class.

Lifeline 'data' of class Stock

Lifeline 'x' of class X is selected with selector [k]

If the name is the keyword self, then the lifeline represents the object of the classifier that encloses the Interaction that owns the Lifeline. Ports of the encloser may be shown separately even when self is included.

Gate

A gate is a message end, connection point for relating a message outside of an interaction fragment with a message inside the interaction fragment.

The purpose of gates and messages between gates is to specify the concrete sender and receiver for every message. Gates play different roles:

  • formal gates - on interactions
  • actual gates - on interaction uses
  • expression gates - on combined fragment

The gates are named implicitly or explicitly. Implicit gate name is constructed by concatenating the direction of the message ('in' or 'out') and the message name, e.g. in_search, out_read.

Gates are notated just as message connection points on the frame.

Interaction Fragment

Interaction fragment is a named element representing the most general interaction unit. Each interaction fragment is conceptually like an interaction by itself.

There is no general notation for an interaction fragment. Its subclasses define their own notation.

Examples of interaction fragments are:

Occurrence

Occurrence (complete UML name - occurrence specification, i.e. 'event description') is interaction fragment which represents a moment in time (event) at the beginning or end of a message or at the beginning or end of an execution.

An occurrence specification is one of the basic semantic units of interactions. The meanings of interactions are specified by sequences of occurrences described by occurrence specifications.

Each occurrence specification appears on exactly one lifeline. Occurrence specifications of a lifeline are ordered along the lifeline.

Occurrence specification has no notation and is just a point at the beginning or end of a message or at the beginning or end of an execution specification.

Examples of occurrences are:

Message Occurrence

Message occurrence (complete UML name - message occurrence specification) is an occurrence which represents such events as sending and receiving of signals or invoking or receiving of operation calls.

Destruction Occurrence

Destruction occurrence is a message occurrence which represents the destruction of the instance described by the lifeline. It may result in the subsequent destruction of other objects that this object owns by composition. No other occurrence may appear below the destruction event on a given lifeline.

Complete UML name of the occurrence is destruction occurrence specification. Until UML 2.4 it was called destruction event, and earlier - stop.

The destruction of instance is depicted by a cross in the form of an X at the bottom of a lifeline.

Execution Occurrence

Execution occurrence (complete UML name - execution occurrence specification) is an occurrence which represents moments in time at which actions or behaviors start or finish.

Execution occurrence references exactly one execution specification which describes the execution that is started or finished at this execution occurrence.

Duration of an execution is represented
by two execution occurrences - start and finish.

Execution

Execution (full name - execution specification, informally called activation) is interaction fragment which represents a period in the participant's lifetime when it is

  • executing a unit of behavior or action within the lifeline,
  • sending a signal to another participant,
  • waiting for a reply message from another participant.
Login sequence diagram uml tutorial

Note, that the execution specification includes the cases when behavior is not active, but just waiting for reply. The duration of an execution is represented by two execution occurrences - the start occurrence and the finish occurrence.

Execution is represented as a thin grey or white rectangle on the lifeline.

Login Sequence Diagram Uml

The sequence diagram is a construct of a message sequence chart. A sequence diagram shows object interactions arranged in time sequence. It depicts the objects and classes involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functionality of the scenario. Sequence diagrams are typically associated with use case realizations.

A sequence diagram shows, as parallel vertical lines (lifelines), different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in which they occur. This allows the specification of simple runtime scenarios in a graphical manner.

Sequence diagrams are typically used to model usage scenarios, the logic of methods and the logic of services.

Stihl hedge trimmer. Source: agilemodeling

Sequence Diagram Examples

GenMyModel comes with many free examples, clonable in just a click. You can access these designed templates from the dashboard area. The examples contain sequence diagrams but also class diagrams, use case diagrams and activity diagrams.

The Restaurant example designed in GenMyModel

Login Sequence Diagram Uml Tutorial


Learn more about how to draw more diagrams in GenMyModel: Flowchart software, BPMN online

Sequence diagram is the most common kind of interaction diagram, which focuses on the message interchange between a number of lifelines.

Sequence diagram describes an interaction by focusing on the sequence of messages that are exchanged, along with their corresponding occurrence specifications on the lifelines.

The following nodes and edges are typically drawn in a UMLsequence diagram: lifeline, execution specification, message, combined fragment, interaction use, state invariant, continuation, destruction occurrence.

Major elements of the sequence diagram are shown on the picture below.

You can find some sequence diagram examples here:

Lifeline

Lifeline is a named element which represents an individual participant in the interaction. While parts and structural features may have multiplicity greater than 1, lifelines represent only one interacting entity.

If the referenced connectable element is multivalued (i.e, has a multiplicity > 1), then the lifeline may have an expression (selector) that specifies which particular part is represented by this lifeline. If the selector is omitted, this means that an arbitrary representative of the multivalued connectable element is chosen.

A lifeline is shown using a symbol that consists of a rectangle forming its 'head' followed by a vertical line (which may be dashed) that represents the lifetime of the participant.

Information identifying the lifeline is displayed inside the rectangle in the following format (slightly modified from what's in UML 2.4 standard):

lifeline-ident ::= [ connectable-element-name [ '[' selector ']' ]] [ ':' class-name ] [ decomposition ] | 'self'
selector ::= expression
decomposition ::= 'ref' interaction-ident [ 'strict' ]

where class-name is the type referenced by the represented connectable element. Note that although the syntax allows it, lifeline-ident cannot be empty.

The lifeline head has a shape that is based on the classifier for the part that this lifeline represents. Usually the head is a white rectangle containing name of class.

Lifeline 'data' of class Stock

Lifeline 'x' of class X is selected with selector [k]

If the name is the keyword self, then the lifeline represents the object of the classifier that encloses the Interaction that owns the Lifeline. Ports of the encloser may be shown separately even when self is included.

Gate

A gate is a message end, connection point for relating a message outside of an interaction fragment with a message inside the interaction fragment.

The purpose of gates and messages between gates is to specify the concrete sender and receiver for every message. Gates play different roles:

  • formal gates - on interactions
  • actual gates - on interaction uses
  • expression gates - on combined fragment

The gates are named implicitly or explicitly. Implicit gate name is constructed by concatenating the direction of the message ('in' or 'out') and the message name, e.g. in_search, out_read.

Gates are notated just as message connection points on the frame.

Interaction Fragment

Interaction fragment is a named element representing the most general interaction unit. Each interaction fragment is conceptually like an interaction by itself.

There is no general notation for an interaction fragment. Its subclasses define their own notation.

Examples of interaction fragments are:

Occurrence

Occurrence (complete UML name - occurrence specification, i.e. 'event description') is interaction fragment which represents a moment in time (event) at the beginning or end of a message or at the beginning or end of an execution.

An occurrence specification is one of the basic semantic units of interactions. The meanings of interactions are specified by sequences of occurrences described by occurrence specifications.

Each occurrence specification appears on exactly one lifeline. Occurrence specifications of a lifeline are ordered along the lifeline.

Occurrence specification has no notation and is just a point at the beginning or end of a message or at the beginning or end of an execution specification.

Examples of occurrences are:

Message Occurrence

Message occurrence (complete UML name - message occurrence specification) is an occurrence which represents such events as sending and receiving of signals or invoking or receiving of operation calls.

Destruction Occurrence

Destruction occurrence is a message occurrence which represents the destruction of the instance described by the lifeline. It may result in the subsequent destruction of other objects that this object owns by composition. No other occurrence may appear below the destruction event on a given lifeline.

Complete UML name of the occurrence is destruction occurrence specification. Until UML 2.4 it was called destruction event, and earlier - stop.

The destruction of instance is depicted by a cross in the form of an X at the bottom of a lifeline.

Execution Occurrence

Execution occurrence (complete UML name - execution occurrence specification) is an occurrence which represents moments in time at which actions or behaviors start or finish.

Execution occurrence references exactly one execution specification which describes the execution that is started or finished at this execution occurrence.

Duration of an execution is represented
by two execution occurrences - start and finish.

Execution

Execution (full name - execution specification, informally called activation) is interaction fragment which represents a period in the participant's lifetime when it is

  • executing a unit of behavior or action within the lifeline,
  • sending a signal to another participant,
  • waiting for a reply message from another participant.

Note, that the execution specification includes the cases when behavior is not active, but just waiting for reply. The duration of an execution is represented by two execution occurrences - the start occurrence and the finish occurrence.

Execution is represented as a thin grey or white rectangle on the lifeline.

Execution specification shown as grey rectangle on the Service lifeline.

Execution specification can be represented by a wider labeled rectangle, where the label usually identifies the action that was executed.

Execution Specification represented as wider rectangle labeled as action.

For execution specifications that refer to atomic actions such as reading attributes of a signal (conveyed by the message), the action symbol may be associated with the reception occurrence specification with a line in order to emphasize that the whole action is associated with only one occurrence specification (and start and finish associations refer to the same occurrence specification).

Overlapping execution specifications on the same lifeline are represented by overlapping rectangles.

Overlapping execution specifications on the same lifeline - message to self.

Overlapping execution specifications on the same lifeline - callback message.

State Invariant

A state invariant is an interaction fragment which represents a runtime constraint on the participants of the interaction. It may be used to specify different kinds of constraints, such as values of attributes or variables, internal or external states, etc.

The constraint is evaluated immediately prior to the execution of the next occurrence specification such that all actions that are not explicitly modeled have been executed. If the constraint is true, the trace is a valid trace, otherwise the trace is an invalid trace.

State invariant is usually shown as a constraint in curly braces on the lifeline.

Attribute t of Task should be equal to complete.

It could also be shown as a state symbol representing the equivalent of a constraint that checks the state of the object represented by the lifeline. This could be either the internal state of the classifier behavior of the corresponding classifier or some external state based on a 'black-box' view of the lifeline.

State invariant can optionally be shown as a note associated with an occurrence specification.

Interaction Use

Interaction use is an interaction fragment which allows to use (or call) another interaction. Large and complex sequence diagrams could be simplified with interaction uses. It is also common to reuse some interaction between several other interactions.

Referenced interaction has formal gates. Interaction use provides a set of actual gates that must match the formal gates of the interaction.

Interaction use works as:

  • copy the contents of the referred interaction to where this interaction needs to be used,
  • substitute formal parameters with arguments,
  • connect the formal gates with the actual ones.

The interaction use is shown as a combined fragment with operator ref.

Web customer and Bookshop use (reference) interaction Checkout.

The syntax of the interaction use of the ref operator is:

interaction-use ::= [ attribute-name '=' ] [ collaboration-use '.' ] interaction-name [ io-arguments ] [ ':' return-value ]
io-arguments ::= '(' io-argument [ ',' io-argument ]* ')'
io-argument ::= in-argument | 'out' out-argument

The attribute-name refers to an attribute of one of the lifelines in the interaction that will receive interaction result. Note, that this restricts results of interactions to be assigned only to attributes. In real life, results of a method call could be assigned to a variable from calling method.

Login Sequence Diagram Uml Example

The collaboration-use is an identification of collaboration use that binds lifelines of a collaboration. The interaction name is in that case within that collaboration.

The io-arguments is list of in and/or out arguments of the interaction.

Use Login interaction to authenticate user and assign result back to the user attribute of Site Controller.

Create Sequence Diagram

One constraint imposed by UML specification that is sometimes difficult to follow is that the interaction use must cover all involved lifelines represented on the enclosing interaction. This means that all those lifelines should be somehow located near each other. If we have another interaction use on the same diagram it could be very tricky to rearrange all involved lifelines as required by UML.





broken image