5 Flows & Activities

Flows and Activities

Objective

  1. Understand workflows, data flows, information flows, and activities.
  2. Use data flow diagrams to model systems.
  3. Identify relevant external entities and data flows.
  4. Create context diagrams and breaking them down into processes.
  5. Use activity diagrams to model primary flows.

Workflows

A workflow diagram is a visual representation that outlines the steps, activities, or tasks involved in completing a specific process or workflow. It shows how work moves from one stage to another, indicating the sequence of activities and the roles or systems involved at each step. Workflow diagrams help in understanding, analyzing, and optimizing business processes by making the flow of tasks more transparent.

They key components of a workflow diagram are steps/tasks, decision points, actors/roles, start/end points, and flows arrows/connectors. Workflow diagrams are essential for optimizing processes, identifying inefficiencies, and ensuring that tasks are completed in the right order with clear responsibilities.

Data Flows

Data flow diagrams (DFDs) are a graphical representation of the flow of data within a system. They are used to visualize how information moves between different components of a system, typically focusing on processes, data stores, and external entities. DFDs are often used during the system design phase to understand how data is processed, what data is stored, and how different parts of a system interact.

DFDs are mainly about data flow, that is, the object/data model and data-driven process modeling, and are less about the control flow and sequencing. They help in understanding system functionality and are a useful tool for analyzing and designing information systems, understanding how data is processed in a system, and identifying potential problems in the system.

External Entities

External entities, also called terminators or actors, represent sources or destinations (sinks) of data that are outside the system being modeled. These entities interact with the system but are not part of the system itself. They can provide input to the system or receive output from it.

Processes

Processes are activities or functions that transform input data into output data. They represent the core actions or operations that occur within a system, showing how the system manipulates data to produce meaningful outcomes.

Data Stores

Data stores represent locations where data is stored or held within the system for later use. They act as repositories of information that processes can read from or write to. Data stores are essential for systems that need to retain data between operations or across different processes.

Data Flows

Data flows represent the movement of data between different elements within the system. These elements include processes, data stores, external entities, and other processes. Data flows show how data travels and gets transferred within the system, providing a visual indication of how information is passed from one part to another.

Exercise 1

Create a context diagram with the main external entities and a single system process for the system from 2 Requirements: Exercise 1.

Hierarchy

DFDs are typically drawn at various levels of abstraction, starting with a high-level context diagram: Level 0, and then breaking down the system into more detailed sub-processes: Level 1, 2, with some systems extending to Level 3 and beyond. This hierarchical approach helps in understanding the system at different levels of detail and complexity and allows for a top-down view of the system, starting with an overview and then drilling down into specific processes and data flows.

  1. Level 0 is a context diagram that shows the system as a whole and the main external entities that interact with the system.
  2. Level 1 breaks down the context diagram into processes with more specific functions.
  3. Level 2 breaks down the processes into more detailed sub-processes.

Miracles

A miracle occurs when a process produces an output without any input. This situation is logically impossible because a process should always take some input to generate output.

Black Holes

A black hole is the opposite of a miracle. It occurs when a process has input(s) but produces no output. This represents data going into the process but never emerging, which suggests that the process is not completing its function or the output is not shown.

Gray Holes

A gray hole occurs when the input to a process is insufficient to produce the expected output. In other words, the input data does not logically support the output being generated. This is a partial flaw, where the process seems to transform data incorrectly or unrealistically.

Exercise 2

Break down the context diagram from Exercise 1 into a more detailed diagram with processes, data stores, and data flows. Make sure that everything is labelled and properly connected.

Information Flows

Information flow diagrams (IFDs) are visual representations that illustrate how information moves or flows within a system or process. They are used to show the relationships and pathways between different components, entities, or systems that share information. These diagrams help in understanding the sources of data, its destinations, and how it is processed or transformed along the way. They are part of the UML metamodel.

They key components of an IFD are entities, information flows, processes/nodes, and data stores. IFDs are often used in systems analysis, software engineering, and process design to clarify the flow of information and ensure proper communication between different parts of a system. They are a useful tool for understanding how information is processed in a system and for identifying potential problems in the system.

Activities

Activity diagrams are a type of behavioral UML diagram used to model the dynamic aspects of a system. They visually represent the flow of activities or tasks and how they relate to each other, capturing the sequential or parallel actions in a process. Typically, they are used to describe workflows, business processes, or the logic behind complex operations in a system.

The key components of an activity diagram include activities/actions, transitions/arrows, decisions, start/end points, merges, forks/joins, and swimlanes. Activity diagrams help in understanding the flow of control within a system, the order of activities, and the conditions that determine the path of execution. They are a useful tool for visualizing complex processes and their step-by-step execution, identifying bottlenecks, and optimizing workflows.

In many ways, activity diagrams are the object-oriented equivalent of flow charts and data flow diagrams from structured development. They are used to model the behavior of objects or systems, focusing on the sequence of actions and the conditions that direct the flow of control.

Exercise 3

Create an activity diagram for a primary flow describing one of the use cases of 4 Specifications: Exercise 3.

Follow the 5 Development Toolchain guide to set up your development environment and tools.

Structure

      • activity.vpp
      • data-flow.vpp
  • Resources