Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Document From Sayyam Singhal

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

ACTIVITY DIAGRAM

• Activity diagram is another important diagram in UML to describe the


dynamic aspects of the system.
• Activity diagram is basically a flowchart to represent the flow from one
activity to another activity. The activity can be described as an operation of
the system.
• The control flow is drawn from one operation to another. This flow can be
sequential, branched, or concurrent. Activity diagrams deal with all type of
flow control by using different elements such as fork, join, etc
• Before drawing an activity diagram, we should identify the following
elements −
Activities
Association
Conditions
Constraints
• Following is an example of an activity diagram for order management
system. In the diagram, four activities are identified which are
associated with conditions.
• The four main activities −
Send order by the customer
Receipt of the order
Confirm the order
Dispatch the order
• After receiving the order request, condition checks are performed to
check if it is normal or special order. After the type of order is
identified, dispatch activity is performed and that is marked as the
termination of the process.
Notations
• Initial State – The starting state before an activity takes place is
depicted using the initial state. Figure – notation for initial
state or start state A process can have only one initial state
unless we are depicting nested activities. We use a black filled
circle to depict the initial state of a system. For objects, this is
the state when they are instantiated. The Initial State from the
UML Activity Diagram marks the entry point and the initial
Activity State.
• Action or Activity State – An activity represents execution of an action
on objects or by objects. We represent an activity using a rectangle with
rounded corners. Basically any action or event that takes place is
represented using an activity.
.

• Action Flow or Control flows – Action flows or Control flows are also
referred to as paths and edges. They are used to show the transition
from one activity state to another.

• An activity state can have multiple incoming and outgoing action flows.
We use a line with an arrow head to depict a Control Flow. If there is a
constraint to be adhered to while making the transition it is mentioned
on the arrow.
• Decision node and Branching – When we need to make a decision before deciding the flow of control,
we use the decision node.
• Guards – A Guard refers to a statement written next to a
decision node on an arrow sometimes within square brackets.

guards being used next to a decision node The statement must be true for the control to
shift along a particular direction. Guards help us know the constraints and conditions
which determine the flow of a process.
COMPONENT DIAGRAM
• A component diagram is used to break down a large object-oriented system into the
smaller components, so as to make them more manageable. It models the physical
view of a system such as executables, files, libraries, etc. that resides within the
node.
• Component diagrams are used to visualize the organization and relationships among
components in a system. These diagrams are also used to make executable systems.
• A component is a single unit of the system, which is replaceable and executable. The
implementation details of a component are hidden, and it necessitates an interface
to execute a function. It is like a black box whose behavior is explained by the
provided and required interfaces.
• It is used to depict the functionality and behaviour of all the components present in
the system, unlike other diagrams that are used to represent the architecture of the
system, working of a system, or simply the system itself.
Notation of a Component Diagram

• A component

• A node
DEPLOYMENT DIAGRAM
• Deployment diagrams are used to visualize the topology of the
physical components of a system, where the software components
are deployed.
• Deployment diagrams are used to describe the static deployment
view of a system. Deployment diagrams consist of nodes and their
relationships.
• The term Deployment itself describes the purpose of the diagram.
Deployment diagrams are used for describing the hardware
components, where software components are deployed. Component
diagrams and deployment diagrams are closely related.
• Component diagrams are used to describe the components and
deployment diagrams shows how they are deployed in hardware.
• The purpose of deployment diagrams can be described as −
Visualize the hardware topology of a system.
Describe the hardware components used to deploy software
components.
Describe the runtime processing nodes.
• The purpose of deployment diagrams can be described as −
Visualize the hardware topology of a system.
Describe the hardware components used to deploy software
components.
Describe the runtime processing nodes.
Following is a sample deployment diagram to provide an idea of the deployment view of order
management system. Here, we have shown nodes as −
•Monitor
•Modem
•Caching server
•Server
The application is assumed to be a web-based application, which is deployed in a clustered
environment using server 1, server 2, and server 3. The user connects to the application using the
Internet. The control flows from the caching server to the clustered environment.

You might also like