Lompat ke konten Lompat ke sidebar Lompat ke footer

Uml 2 Activity Diagram Tutorial

UML Activity Diagram

UML Activity Diagram

To understand UML Activity Diagrams, we first need to understand what the UML Diagram means. UML stands for Unified Modelling Language. It is a standardized set or a collection of diagrams that helps the software developers and software architects to understand the flow of the software. In other words, UML Diagrams are diagrams that depict how the software system is going to function.

UML Diagrams are divided into three types:

  • Structure Diagrams
  • Interaction Diagrams
  • Behavior Diagrams

What is a UML Activity Diagram?

A UML Activity Diagram is a behavioral diagram out of the above-mentioned three types of UML diagrams. Now, how are they different from UML diagrams? So activity depicts what action is going to take place in the process. It is a pictorial representation of how the software system is going to function. At the time of execution, the software system must function according to the required flow, so according to it, activity diagrams depict it as forward and reverse engineering process/actions.

Symbols and Components of UML Activity Diagram

Beforehand, one must have knowledge of how to draw the UML activity diagrams, and for it, the following components and symbols are needed.

1. Starting State

The initial state is yet to be used or modified in the activity. Activity Diagrams start from this step. Also known as the entry state. Start Node is the starting point of any activity.

It is depicted as:

UML Activity Diagram - Start Node

2. Action State

A step in which the users or software performs a certain task. It represents an action that is going to take place at this stage of the software system. Generally depicted with the rounded-edged rectangle.

It is depicted as:

UML Activity Diagram - Action state

3. Control Flow

Connectors between two states or two actions to depict the flow. Shows the sequence of execution. Also known as paths. One action state can have multiple control flows input and also output to another action state. A single-headed arrow is used to depict the control flow.

It is depicted as:

UML Activity Diagram - Control Flow

4. Decision Node

A conditional node or a decisional node is one where there are multiple options available. Or there are two or more conditions that can be considered at the point of the software system.

Example: There's an ice cream shop. A person enters into that shop and wants to buy one of the many options available. Now, if he chooses, Vanilla flavor, server 1 has to give it to him, else he chooses other flavors, then others have to serve it to him. So this is the condition in the activity diagram. It is drawn as a diamond shape with multiple inputs and outputs.

It is depicted as:

UML Activity Diagram - Decision Node

5. Fork

A point from where two concurrent or parallel processes are executed or run, or processed. It generally includes a single input but may or may not get one output.

Example: There's one ice cream shop. A person tends to buy ice cream for himself and his friend. Now, both of them buy the same vanilla flavor, but one of them wants choco-dip, and others want to have fruities to be put upon it. So, here the input is the same, that is of vanilla ice cream, but the output results are different. So, this is a perfect example of a fork.

It is depicted as:

fork

6. Join

A join is one where two results of concurrent activities add and form a single result. In joining, there is more than one input, but only one output is obtained. Two results are obtained from two activities, and one result is obtained.

Example: There is a requirement for the sandwich. But first, we need to have tomatoes and spinach for it.

It is depicted as:

join

7. End State

This is the last stage of the UML activity diagram. This is where the activity ends in a software system ends.

It is depicted as:

end state

Advantages and Disadvantages of UML activity diagram

Following are some advantages and disadvantages of the UML activity diagram:

Advantages

  • Complex stage or steps in a software system can be explained easily diagrammatically.
  • Dynamic modeling of a software system.
  • Each and every activity flow in the system can be explained as it is.
  • Methods, functions, and operations can be explained in detail.
  • Business processes and flows can be depicted easily.
  • Simplified view, though the complex system.
  • Business requirement analysis.
  • The understanding of system requirements is explained in a lucid and simple manner.
  • The workflow of the user and the system and user with the system is explained in detail.

Disadvantages

  • The only drawback is the UML Activity Diagram is the messages or the communications between two components, or the user cannot be shown.

Symbols used in the UML Activity Diagram

The symbols used in the UML activity diagram is explained in the below table:

UML Activity Diagram symbols

How to make a UML activity diagram with Example

We'll consider an example of developing software in Android Studio:

  • Open Android Studio
  • Create New Project & Save the project under a unique name
  • Import the new packages which are needed for the project
  • Start the emulator
  • Run the project on the emulator
  • Exit Project

UML Activity Diagram:

How to make UMl Diagram

Conclusion

So, in all, we can say that UML Activity Diagrams are necessary during and before the development of any software system. It is very useful in documenting and depicting visualizing the exact process and steps involved in the developmental process. All the complex stages can be displayed very easily. The person who knows the notations correctly can easily draw the UML activity diagrams. The most important part of using these diagrams is anyone can draw them according to the flow and at almost every step of the software system development life cycle. There are many software available online which are helpful in drawing the UML Activity Diagrams like SmartDraw, etc.

Recommended Articles

This has been a guide to the UML Activity Diagram. Here we discussed What is, Types, Symbols, components, advantages, and disadvantages of the UML Activity Diagram, respectively. You can also go through our other suggested articles to learn more –

  1. Class Diagram
  2. What is Software Testing?
  3. Reverse Engineering
  4. UML Interaction Diagrams

Source: https://www.educba.com/uml-activity-diagram/

Posted by: mosconesunshinesays.blogspot.com

Posting Komentar untuk "Uml 2 Activity Diagram Tutorial"