0% found this document useful (0 votes)
13 views30 pages

UNIT2 - Activity Diagrams

Activity diagrams are a type of UML diagram used to model the dynamic aspects of a system, emphasizing the flow of actions and conditions. They are useful for visualizing workflows, defining system logic, and communicating with clients. Key components include activities, swimlanes, forks, joins, and pins, which help represent complex processes and parallel flows.
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)
13 views30 pages

UNIT2 - Activity Diagrams

Activity diagrams are a type of UML diagram used to model the dynamic aspects of a system, emphasizing the flow of actions and conditions. They are useful for visualizing workflows, defining system logic, and communicating with clients. Key components include activities, swimlanes, forks, joins, and pins, which help represent complex processes and parallel flows.
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/ 30

Activity Diagrams

Activity diagram is another important behavioral diagram in UML diagram


to describe dynamic aspects of the system. Activity diagram is essentially
an advanced version of flow chart that modeling the flow from one activity
to another activity.

It put emphasis on the condition of flow and the order in which it occurs.
The flow can be sequential, branched, or concurrent, and to deal with such
kinds of flows, the activity diagram has come up with a fork, join, etc.
Why use Activity Diagram?
Activity diagrams are used to visually represent the flow of actions in
a system, and are useful for a variety of purposes:
• Modeling workflows
Activity diagrams can be used to model business workflows, including how multiple users interact with a system.
• Modeling use cases
Activity diagrams can be used to illustrate the flow of events in a use case.
• Modeling software
Activity diagrams can be used to model software elements like functions, methods, and operations.
• Defining system logic
Activity diagrams can be used to define the rules and logic of a system.
• Identifying system constraints
Activity diagrams can help users understand the conditions and constraints associated with specific operations.
• Communicating with clients
Activity diagrams can help developers and clients build a shared understanding of how a system works.
Activity Diagram Notations?
• In activity diagrams, the notations are like visual symbols that
help represent different elements and actions in a simple way.
Components of an Activity Diagram
• Activities
• The categorization of behavior into one or more actions is termed as an activity. In other words, it can be said that
an activity is a network of nodes that are connected by edges. The edges depict the flow of execution. It may
contain action nodes, control nodes, or object nodes.

• The control flow of activity is represented by control nodes and object nodes that illustrates the objects used
within an activity. The activities are initiated at the initial node and are terminated at the final node.

Activity
Activity partition /swimlane
• The swimlane is used to cluster all the related activities in one column or one row. It can be either
vertical or horizontal. It used to add modularity to the activity diagram. It is not necessary to
incorporate swimlane in the activity diagram. But it is used to add more transparency to the activity
diagram.
• Here different set of activities are executed based on if the
number is odd or even. These activities are grouped into a
swimlane.
• Forks and join nodes generate the concurrent flow inside the
activity. A fork node consists of one inward edge and several
outward edges. It is the same as that of various decision
parameters. Whenever a data is received at an inward edge, it
gets copied and split crossways various outward edges. It split a
single inward flow into multiple parallel flows.
• Join nodes are the opposite of fork nodes. A Logical AND
operation is performed on all of the inward edges as it
synchronizes the flow of input across one single output
(outward) edge.
• Pins
It is a small rectangle, which is attached to the action rectangle. It
clears out all the messy and complicated thing to manage the
execution flow of activities. It is an object node that precisely
represents one input to or output from the action.
• Sample example of Activity
• Activity Diagram - Learn by Examples

A basic activity diagram - flowchart like


Process Order - Problem Description
• Once the order is received, the activities split into two parallel sets of
activities. One side fills and sends the order while the other handles the
billing.
• On the Fill Order side, the method of delivery is decided conditionally.
Depending on the condition either the Overnight Delivery activity or the
Regular Delivery activity is performed.
• Finally the parallel activities combine to close the order.
Example of an Activity Diagram
An example of an activity diagram showing the business flow
activity of order processing is given below.

• Here the input parameter is the Requested order, and once the order is
accepted, all of the required information is then filled, payment is also
accepted, and then the order is shipped. It permits order shipment before
an invoice is sent or payment is completed.
Activity Diagram Example - Student Enrollment
This UML activity diagram example describes a process for student
enrollment in a university as follows:
• An applicant wants to enroll in the university.
• The applicant hands a filled out copy of Enrollment Form.
• The registrar inspects the forms.
• The registrar determines that the forms have been filled out properly.
• The registrar informs student to attend in university overview presentation.
• The registrar helps the student to enroll in seminars
• The registrar asks the student to pay for the initial tuition.
What are the differences?

Activity Diagram Flow Chart


An activity diagram is associated with the A Flow Chart is associated with the
UML(Unified Modelling Language) programming.
Depicts a diagrammatic representation
An activity diagram is used to model the
illustrating a solution model to a given
dynamic aspects of a system and also
problem and a flow chart converges into
illustrates the workflow of activities
being an activity diagram if complex
within a use case or business process.
decisions are being made.
Commonly used in software engineering Widely used in software engineering for
within the UML for modeling and representing algorithms, decision
designing software systems on high level. structures, and program flows.
Notes,,
• Activity diagrams are similar to flowcharts, but they can also
show parallel or concurrent flows, and alternate flows. Activity
diagrams can be divided into swimlanes to indicate which
person, organization, or object is responsible for which
activities.
When to use an Activity Diagram?
An activity diagram can be used to portray business processes and workflows. Also, it used for
modeling business as well as the software. An activity diagram is utilized for the followings:

1. To graphically model the workflow in an easier and understandable way.


2. To model the execution flow among several activities.
3. To model comprehensive information of a function or an algorithm employed within the
system.
4. To model the business process and its workflow.
5. To envision the dynamic aspect of a system.
6. To generate the top-level flowcharts for representing the workflow of an application.
7. To represent a high-level view of a distributed or an object-oriented system.
• Uber App
• ref,. …
• https://www.uml-diagrams.org/

You might also like