Exp 7
Exp 7
Aim-To draw the activity Diagram for fashion recommendation system: Activity Diagram
ACTIVITY DIAGRAM:-
Activity diagrams show the steps involved in how a system works, helping us understand the flow of
control. They display the order in which activities happen and whether they occur one after the
other (sequential) or at the same time (concurrent). These diagrams help explain what triggers
certain actions or events in a system.
• An activity diagram starts from an initial point and ends at a final point, showing different
decision paths along the way.
• They are often used in business and process modeling to show how a system behaves over
time.
USE CASE:-
Activity diagrams are useful in several scenarios, especially when you need to visually represent the
flow of processes or behaviors in a system. Here are key situations when you should use an activity
diagram:
1. Modeling Workflows or Processes: When you need to map out a business process,
workflow, or the steps involved in a use case, activity diagrams help visualize the flow of
activities.
3. Understanding the Dynamic Behavior: When it’s essential to depict how a system changes
over time and moves between different states based on events or conditions, activity
diagrams are effective.
5. System Design and Analysis: During the design phase of a software system, activity diagrams
help developers and stakeholders understand how different parts of the system interact
dynamically.
6. Describing Use Cases: They are useful for illustrating the flow of control within a use case,
showing how various components of the system interact during its execution.
NOTATIONS:-
1. Initial State
The starting state before an activity takes place is depicted using the initial state.
5. Guard
A Guard refers to a statement written next to a decision node on an arrow sometimes within
square brackets.
6. Fork
Fork nodes are used to support concurrent activities. When we use a fork node when both the
activities get executed concurrently i.e. no decision is made before splitting the activity into two
parts. Both parts need to be executed in case of a fork statement. We use a rounded solid
rectangular bar to represent a Fork notation with incoming arrow from the parent activity state
and outgoing arrows towards the newly created activities.
7. Join
Join nodes are used to support concurrent activities converging into one. For join notations we
have two or more incoming edges and one outgoing edge.
9. Swimlanes
We use Swimlanes for grouping related activities in one column. Swimlanes group related
activities into one column or one row. Swimlanes can be vertical and horizontal. Swimlanes are
used to add modularity to the activity diagram. It is not mandatory to use swimlanes. They usually
give more clarity to the activity diagram. It’s similar to creating a function in a program. It’s not
mandatory to do so, but, it is a recommended practice.
This refers to an event that stops the flow for a time; an hourglass depicts it. We can have a scenario
where an event takes some time to completed.