Article Consultation Solution Tool Course Member  
 
 
 
     
   
UML Diagram: Activity Diagram
 
Zu Tao ,Pitaya System Engineering
Views    2020-2-11
 

Why do you need activity diagram modeling

The phrase "life is in motion" illustrates that sport is a very important way for people to observe the world, because the world of motion is meaningful to us. People describe the process as a sequence of actions arranged according to time, because of the need to calibrate the relative order of motion, man invented the concept of time (in my opinion: time does not exist):

  • Absolute time: People choose a relatively stable frame of reference in nature to define time, such as one revolution of the earth around the sun for one year, and one rotation of the earth for one day. The Gregorian calendar uses the year of Jesus' birth as the first year of the Common Era.
  • Relative time: Arrange the order of activities according to the order of movement, such as the course of a person's life from morning to night.
  • Man has also invented various forms of describing movement:

    1. Natural language uses narrative to describe the process of a story.

    2. Data flow uses the process of data flow to describe the data relationships between processes.

    3. A flowchart describes the relationships between individual processes in a controlled flow manner.

    4. … …

    The activity diagram is a UML modeling specification that uses graphics to describe the behavior process, which integrates the description forms of 2 and 3, and can fully support various descriptions of the process in natural language. When the complex behavior is based on the activity diagram to clarify the order, the analyst will have a clear idea, and the designer will also pay attention to the impact of the behavior order on the logical correctness and efficiency, which can greatly improve people's ability to understand and control the behavior.

    What's in the activity map

    Any UML diagram has semantics, elements, relationships, and uses, and the following is a list of activity diagrams:

    Semanteme Describe the flow of the activities in the order in which they are precededed
    Element Start (init), activity Activity, Decision, Final,
    Fork, Merge, Join
    Relationship Control flow (control flow), object flow
    Use Business processes, program flows, user operation processes can be described

     

    Legend: Activity diagram

    In order to make the reader see more vividly, here is a legend to introduce the use of the activity map, the following is the activity map of the snake game.

    Activity Diagram Description:

    Here's a natural language text description of the activity diagram of the snake game:

    A textual description of the process of the snake game
    1. The user executes "Activity: Start the Game"
    2. "Activity: Start the Game" sends "Object Flow: Start Instruction To" to the game "Activity: Initialize Map Activity"
    3. Game executes "Activity: Initialize Map"
    4. Game executes "Activity: Create Food"
    5. Game executes "Activity: Create Snake"
    6. Start the timer and start the timing,
    7. If the user executes "Activity: Press the arrow key", then sets "Object: Direction"
    8. "Event: 1 second to time", "Activity: Perform Crawling", receive "Object: Direction"
    9. Snake executes "Conditional Judgment: What to Encounter"
    9.1. If it encounters food, the snake executes "Activity: Eat Food".
    9.2. If it encounters a wall, the snake executes "Activity: Die"
    10. The snake ends the current processing after eating the food, and waits for the next "Event: 1 second up"
    11. The game is over after the snake dies

    The above text description looks tiring, if it is more complex to describe the behavior process is more difficult to read, it seems that it is better to use the activity diagram, or borrow the form of the activity diagram and use a structured text description, as follows:

    Serial numbe  User  Game
     1. Event: Launch the Game  
     2. "Activity: Start Game"
    Send "Object Flow: Start Instruction"
     
     3.
    "Activity: Initialize Map" Receive
    "Object Flow: Start Instruction"
     4.   Activity: Create Food
     5.   Event: Create a Snake
     6.   Activity: Start Timer
     7. Activity: Press the arrow keys
    Set Object: Direction
     
     8.   Event: 1 Second Up
     9.   "Activity: Snake Crawling" receives "Subject: Direction"
     10.   "Conditional Determination: What to Encounter"
  • If it encounters food, the snake performs the "Activity: Eat the Food";
  • The snake ends the current treatment after eating the food;
  • If it encounters a wall, the snake performs "Activity: Dead";
  • The game ends when the snake dies.

     

    Note: The model in this paper is modeled by the modeling tool EA.

     


    UML Diagram Series:

    1.UML Overview
    2.Use Case Diagram
    3.Activity Diagram
    4.Class Diagram
    5.Object Diagram
    6.Sequence Diagram
    7.Interpretation of the Mapping Relationship between Class Diagram and Code (C++)

     

    Postscript

    I hope you have benefited from reading this.

    If you are willing to share your experience, please submit it to us.

    If you are interested in our training, consulting and tools:

  • Course: Analytical design based on UML and EA  
  • Course: MBSE (Model-Based Systems Engineering)  
  • Course: Model-Based Requirements Management) Methods and Practices
  • Course: System Design and Modeling Based on SysML and EA
  • Course: Enterprise Architecture Modeling
  • Course: System Architecture Modeling Methods and Cases
  • Course: Domain-Driven Modeling and Design
  • Course: Model-Based Design
  • Course: Business Modeling and Business Analysis
  • Modeling tool: EA
  • Model-based requirements management tool: iSpace
  • Consulting Solution: MBSE (Model-Based Systems Engineering)
  • Consulting Solution: Model-Driven Development Based on UML
  • Welcome to contact us: umlooo@hotmail.com

       
    Views  
     
    Related Articles

    UML Overview
    UML Diagram: Use Case Diagram
    UML Diagram: Activity Diagram
    UML diagram: class diagram
    UML Diagram: Object Diagram
    UML Diagram: sequence diagram
     
    Related Courses

    MBSE (Model-based Systems Engineering)
    System analysis and design based on UML
    Business Modeling & Business Analysis
    System design and modeling SysML EA
    Model-based requirements management
    Business Modeling &; Domain-Driven
     
    Related Tool

    MBSE Platform
    Modeling Tools EA
    Requirements Management
    Automatic modeling
    Multi-level simulation -Sys Simulator
    Code Engineer

    Tool News
    June 2024 EA v17.0 Beta release
    November 2022 EA v16.1 release notes
    November 2022 EA v16.1 official release
    July 2022 EA v16.05 release notes
    April 2022 EA16.0 official release
     
    Latest Article
    UML Overview
    UML Diagram: Use Case Diagram
    UML Diagram: Activity Diagram
    UML diagram: class diagram
    UML Diagram: Object Diagram
    UML Diagram: sequence diagram
    Specification changes from UML 2.4 to UML 2.5
    DDS models and modeling tools
    More...   
    MBSE Tool
    MBSE Platform
    Modeling Tools EA
    Requirements Management
    Automatic modeling
    Multi-level simulation -Sys Simulator
    Code Engineer
    DocGenerator
    Model Checker
    R&D management
    TestDriver
    Model Based Quality Manager (inspector)
    More...   
    Successful Case
    Gac Research Institute SysML+EA+ Software
    Modeling tools EA, WebEA, and learning
    China Automotive Intelligence modeling tools EA...
    Ekatong MBSE tool chain consulting
    Avic UAV MBSE tool chain
    Geely Auto buys EA tools
    Huaco Auto parts buy EA tools
    Dongfeng LAN Map Auto purchase EA tools