Professional Documents
Culture Documents
L9te Raiii
L9te Raiii
Software Requirements
Engineering
Topic 9:
Requirements Analysis III
Contents
1. Activity Diagrams
2. Statechart
Activity Diagram
UML Activity Diagram:
•Often called as “Object-oriented Flowcharts”.
•Model a process as an activity that consists of a collection of
nodes connected by edges.
•It is a behavioral diagram that illustrates the flow of activities
through a system.
•Can also be used to depict a flow of events in a business process.
•Helps to visualize a certain use case at a more detailed level.
• Most commonly used in the following ways:
– Business Modelling: To model business process processes and
workflows.
– Analysis: To model the flow in a use case and between use cases.
– Preconditions: Things that must be true before the activity can start.
– Postconditions: Things that will be true after the activity has
finished.
• Actions within the activity can also have their own local
preconditions and postconditions.
Example:
• A common use of activity diagrams is to model a use case as a series of
actions.
• Use cases express system behaviour as an interaction between an actor
and the system whereas activity diagrams express it as a series of actions.
• Activities are networks of nodes connected by edges.
Object Flow
Object node
• There are three node categories:
– Action: Represent discrete units of work that are atomic within the
activity.
– Control: Control the flow through the activity.
– Object: Represent objects used in the activity.
Action nodes
• Call action nodes:
• Send signal action node, and Accept event action nodes:
• Accept time event action nodes:
– Respond to time.
– Has a time expression, and it generates a time event
when this expression becomes true.
Control nodes
• Initial node and final nodes (i.e. activity final node, flow final
node):
– Initial node is the point which the flow starts.
– May have more than one initial node (i.e. flows start at all of the
initial nodes simultaneously and execute concurrently).
– May have many final nodes (i.e. the first one to be activated
terminates all other flows and the activity itself).
– The flow final node stops one of the flows within the activity, the
other flows continue.
• Decision nodes:
– Has one input edge and two or more alternate output edges.
– The input edge is offered to all of the output edges but traverses at
most one of them.
– The keyword else can be used to specify the edge traversed if none
of the guard conditions are true.
• Merge nodes:
– They merge all their incoming flows into a single outgoing flow.
• Fork and join nodes:
– Concurrent flows within an activity can be shown by using a fork
node to split a single flow into multiple concurrent flows.
– A fork node has one incoming edge and two or more outgoing edges.
This splits the single incoming flow into multiple parallel outgoing
flows. Each outgoing edge may have a guard condition, which the
outgoing edge can only transverse if the guard condition is true.
– Join nodes have multiple incoming edges and a single outgoing edge.
They synchronise flows and perform a logical AND on their input
edges.
Note:
1.The product is designed first;
2.The product is marketed and manufactured concurrently;
3.The product is sold only after both the marketing and manufacturing
processes are complete.
Example:
Fork Node
Swimlanes
•Swimlanes group related activities into one column or one row.
Swimlanes can be vertical and horizontal.
Condition state
Concurrent States
THANK YOU
• Question?
• Tutorial (this week):
– Conduct analysis (group project)
• Draw Use Case Diagrams & Specifications
• Draw Sequence Diagrams
Include the above in the report. Submit at the end of the semester
(Phase 1 + 2 + 3).
Use Case
Diagram
Example:
Sequence
Diagram
Example:
Register for Exam