Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
34 views50 pages

Lecture 04 - Activity Diagrams

Uploaded by

Yonas Buzuayehu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views50 pages

Lecture 04 - Activity Diagrams

Uploaded by

Yonas Buzuayehu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Software Requirements

Engineering

Understanding Activity Diagrams


From Requirements to Diagrams

1
Activity Diagrams

• Overview of Activity Diagrams


– Introduction to Activity Diagrams
– Purpose of Activity Diagrams
– Where Activity Diagrams are Used
• Key Components and Creation Process
• From Requirements and Use Cases to Activity Diagrams
• Case Study Analysis
• Common Pitfalls

2
Introduction to Activity Diagrams

• Activity Diagrams: "Graphical representations of workflows of


stepwise activities and actions with support for choice, iteration,
and concurrency."
• Purpose:
– Illustrate various system flows,
– Show Steps of activities in their sequence
• Scope:
– Extensively used in modeling complex business processes
and software systems.
• Activity Diagrams Aid in visualizing and understanding intricate
workflows.
Activity Diagram

• Activity diagrams describe the workflow behavior of a system.

– Activity diagrams are used in process modeling and analysis of during


requirements engineering.

– A typical business process which synchronizes several external incoming


events can be represented by activity diagrams.

• They are most useful for understanding work flow analysis of synchronous
behaviors across a process.
Purpose of Activity Diagrams

• System Modeling Role: Visualize dynamic aspects of systems,


focusing on workflows and operations.

• Process Visualization Utility: Clarify sequences, conditions,


and parallelisms in activities.

• Functional Process Application: Ideal for detailed modeling of


business and software processes.

Activity Diagrams Enhance comprehension and communication


of system functionalities.
When to Use Activity Diagrams

• The main reason to use activity diagrams is to model the workflow


behind the system being designed.

• Activity Diagrams are also useful for:


– analyzing a use case by describing what actions need to take place
and when they should occur
– describing a complicated sequential algorithm
– modeling applications with parallel processes

• Activity Diagrams should not take the place of interaction diagrams


and state diagrams.

• Activity diagrams do not give detail about how objects behave or


how objects collaborate.
When to Use Activity Diagrams

• Business Process Modeling: Streamline and analyze complex


business operations.

• Software Development: Design and understand software


process flows.

• Workflow Management: Optimize and improve organizational


processes.

• Process Improvement: Identify inefficiencies and areas for


enhancement.
Key Components and Creation Process

• Overview of Activity Diagrams


• Key Components and Creation Process
– Start and End Points
– Activities
– Transitions
– Decision and Merge Nodes
– Forks and Joins
– Creation Process
• From Requirements and Use Cases to Activity Diagrams
• Case Study Analysis
• Common Pitfalls

8
Activity Diagram Example
Start State

Fork Activity

Branch

Merge Join

End State
9
Start and End Points

• Start Point: Represented by a solid circle, indicating the initiation


of a process.

• End Point: Depicted as a circle with a border, marking the


completion of a process.

• Importance:
• Clearly denotes the beginning and end of the workflow.
• Crucial for defining the scope and extent of the activity diagram
Activities

• Rounded rectangles symbolize individual tasks or actions within a


process.

• Depict the essential steps in a workflow.


• Each activity is distinct, with a clear, concise label.
• Activities are arranged to mirror the actual sequence of
operations.
Control flow

• Arrows indicating the progression from one activity to another.

• Show the sequence and direction of workflow.


• Represents the flow of control from one action to another.
Decision and Merge Nodes
• Decision Nodes:
– indicating where the process diverges based on conditions.
– Direct the workflow based on specific criteria or conditions.
• Merge Nodes:
– Symbols used to bring divergent paths back into a single flow.
• Both have the same notation: a Diamond shape
• Essential for modeling decision-making processes within a
workflow.
Forks and Joins
• Forks: Symbols for splitting the workflow into parallel paths.

• Joins: Nodes that bring parallel paths back together,


synchronizing the flow.

• Represent concurrent processing within a workflow.


• Showcases the system's capability to handle parallel operations.
Key Components and Creation Process

• Overview of Activity Diagrams


• Key Components and Creation Process
– Start and End Points
– Activities
– Transitions
– Decision and Merge Nodes
– Forks and Joins
– Creation Process
• From Requirements and Use Cases to Activity Diagrams
• Case Study Analysis
• Common Pitfalls

15
Understanding the Process or Workflow

• Grasp the overall process or workflow intended for modeling.


• Identify
– key activities
– and their sequence within the workflow.
• Examine how activities interact and connect.
• Essential for creating an accurate and effective activity diagram.
Identifying the Start and End Points

• Determine the process's beginning and end.


• Crucial for establishing the diagram's scope.
• Utilize standard symbols to denote start and end points.
• Ensures the boundaries of the process are well-defined.
Listing Activities

• Enumerate all tasks and actions involved in the process.


• Each task represents a distinct, essential step.
• Guarantees comprehensive coverage of the process.
• Forms the foundation of the activity diagram.
• Describe each activity clearly and concisely.
Representing Activities

• Visualization: Use rounded rectangles to symbolize each


activity.
• Sequence: Arrange activities to reflect the actual process flow.
• Ensure each activity is distinct and identifiable.
• Maintain uniformity in representing activities.
• Include brief, clear descriptions for each activity.
Logical Sequence of Activities

• Flow: Organize activities in a logical, sequential manner.


• Reflect a thorough understanding of the process.
• Refinement: Adjust the sequence for clarity and efficiency.
• Iterative Review: Continuously refine to accurately represent the
process.
Control Flows

• Represent using Arrows that depict the direction and flow between
activities.
• Clearly show the transition from one activity to the next.
• Flow Clarity: Ensure the flow is logical and easy to follow.
• Completeness: Include all transitions between activities.
Decision Nodes

• Indicate points where the process flow diverges based on


conditions.
• Labeling: Label each outgoing flow with its corresponding
condition.
• Reflect different outcomes based on decision points.
• Ensure all potential outcomes are considered.
Flow Coherence

• Ensure a logical and coherent flow throughout the diagram.


• Consistency: Check for consistent transitions between activities.
• Coverage: All paths should lead to logical conclusions or
endpoints.
• Review: Regularly assess for any missing or redundant paths.
• Stakeholder Feedback: Incorporate feedback to enhance flow
coherence.
Initial Review of the Diagram

• Evaluate the diagram for accuracy and completeness.


• Verification: Confirm that all activities and decisions are correctly
represented.
• Ensure alignment with defined requirements and use cases.
• Clarity: Assess the diagram for clarity and understandability.
• Be prepared to revise based on feedback.
Refinement of the Diagram

• Simplify complex parts for enhanced clarity.


• Redundancy Removal: Eliminate redundant or unnecessary
elements.
• Readability: Improve the readability of the diagram.
• Feedback Incorporation: Adjust the diagram based on
stakeholder input.
• Finalization: Prepare the diagram for presentation or
documentation.
From Requirements and Use Cases to Activity
Diagrams
• Overview of Activity Diagrams
• Key Components and Creation Process
• From Requirements and Use Cases to Activity Diagrams
– Importance of Accurate Requirements
– Gathering Requirements
– Validating Requirements
– Understanding Use Cases
– Identifying Main Scenarios
– Scenario Variations
– Mapping Scenarios to Activity Diagram
– Reviewing the Diagram
• Case Study Analysis
• Common Pitfalls

26
Importance of Accurate Requirements

• Accurate requirements are crucial for effective activity diagrams.


• Ensure the diagram reflects the true workflow and processes.
• Emphasize thorough and accurate collection of requirements.
• Inaccuracies can lead to flawed diagrams.
• Regular updates as requirements evolve.
Gathering Requirements

• Collecting detailed requirements for the process.

• Methods: Using the Requirement Gathering Methods discussed in


previous classes like Interviews, observations, and reviewing
existing documentation and so on.

• Importance: Understanding user needs and system objectives.


Preliminary Documentation of Requirements

• Documentation of gathered requirements in the following formats


– Use cases,
– user stories,
– and process descriptions.

• Serves as a reference for developing the activity diagram.


• Ensures all requirements are accurately captured.
Understanding Use Cases

• Understanding the Descriptions of interactions between a user


and a system.

• Purpose: Identifying activities and flows for the diagram.

• Extracting Components: Actors, scenarios, and goals.

• Use cases as a basis for activity diagrams.


Identifying Main Scenarios

• Breaking down use cases into main success scenarios.

• Outlines the standard flow of activities.

• Translates into the primary path in the activity diagram.

• Detailing and Including all relevant steps and decisions.


Alternate and Exception Scenarios

• Identify Scenarios that deviate from the main flow.

• Important for understanding variations in the process.

• These lead to decision points in the activity diagram.

• Ensure all possible scenarios are considered.


Scenario Variations

• Pay attention to different possible outcomes.

• Variations often lead to decision points in the diagram.

• Requires a Thorough examination of each scenario.

• Should Result in Accurate depiction of all possible paths.


Mapping Scenarios to Activities

• Translate scenario steps into activities in the diagram.


• Identify Start and End Points: Identify the beginning and
conclusion of each scenario.
• Flow: Determine the sequence and interaction of activities.
• Decision Points: Identify key decision nodes within scenarios.
Determining Flow of Control

• Establish how control moves between activities.


• Use arrows to show transitions in the diagram.
• Conditional Flows: Indicate decision-based transitions.
• Clarity: Ensure the flow is logical and understandable.
Identifying Decision Points

• Pinpoint where choices affect the process flow.


• Use diamond shapes for decision nodes.
• Scenarios: Reflect different outcomes based on decisions.
• Key for modeling complex decision-making.
Main Success Scenario

• Starting Point: Begin with the main success scenario in the


diagram.
• Add activities and transitions as outlined in the use case.
• Ensure it accurately represents the intended process.
• Maintain simplicity and readability.
Integrating Alternate Scenarios

• Add alternate and exception scenarios to the diagram.


• Decision Nodes: Include decision points for scenario branching.
• Complexity: Manage complexity with clear and concise
representation.
• Ensure all scenarios are logically integrated.
Reviewing the Diagram

• Objective: Ensure the diagram accurately represents the use


case.
• Clarity: Check for understandability and simplicity.
• Completeness: Verify all scenarios and paths are included.
• Feedback: Seek input from stakeholders for improvements.
Case Study Analysis

• Overview of Activity Diagrams


• Key Components and Creation Process
• From Requirements and Use Cases to Activity Diagrams
• Case Study Analysis
• Common Pitfalls

40
Case Study Scenario

Refer to the Case Study Document


Common Pitfalls

• Overview of Activity Diagrams


• Key Components and Creation Process
• From Requirements and Use Cases to Activity Diagrams
• Case Study Analysis
• Common Pitfalls

42
Common Pitfalls in Activity Diagrams

Discussing typical errors in creating activity diagrams.

• Ambiguity: Avoiding vague or unclear activity descriptions.


• Overcomplication: Keeping the diagram simple and avoiding
unnecessary complexity.
• Missing Elements: Ensuring all necessary activities, decisions,
and flows are included.
• Incorrect Flow: Verifying that the sequence of activities and
decisions accurately reflects the process.
Disadvantages

• A disadvantage of activity diagrams is that they do not explicitly


present which objects execute which activities, and the way that the
messaging works between them.
– Labeling of each activity with the responsible object can be done.
– It is useful to draw an activity diagram early in the modeling of a process, to
help understand the overall process.

• Then interaction diagrams can be used to help you allocate activities to


classes.
Swimlanes

• Used to show which activities are performed by which


organisation in the activity diagram
• A swimlane specifies a locus of activities
• To partition the activity states on an activity diagram into
groups
– each group representing the business organization responsible
for those activities
– each group is called a swimlane
• Each swimlane is divided from its neighbor by a vertical
solid line
Swimlanes (2)

• have to be ordered in a Logical Manner


• Each swimlane has a name unique within its diagram
• Each swimlane may represent some real-world entity
• Each swimlane may be implemented by one or more
classes
• Every activity belongs to exactly one swimlane, but
transitions may cross lanes
Activity Diagram: Swimlanes
Activity Diagram: Swimlanes
Best Practices in Activity Diagram Creation

• Clarity and Simplicity: Striving for a clear and understandable


diagram.
• Iterative Development: Continuously refining the diagram based
on feedback.
• Stakeholder Involvement: Engaging with stakeholders for
accurate and relevant diagrams.
• Consistent Notation: Using UML notation consistently for clarity
and standardization.
• Validation and Verification: Regularly checking the diagram
against requirements and use cases.

You might also like