Chapter 6 Essential Elements for Designing IoT Architecture 145
How Do We Draw an Activity Diagram?
Activity diagrams are usually utilized as a flowchart that comprises of the activities conducted by
the system. Before drawing an activity diagram, we must be able to understand the elements that
are used in activity diagrams. The most important element of an activity diagram is the activity
itself. An activity is a function that is being performed by the system itself. After we get to know
about the activities, we should try to learn how they are associated with conditions and constraints.
We must identify the following elements in an activity diagram:
Activities,
Association,
Conditions, and
Constraints.
After we identify the aforementioned parameters, we need to create a mental layout of the entire
flow of the system. Then this mental flow gets transformed into an activity diagram. The use
of an activity diagram is very suitable for modeling the entire activity flow of the system. An
application could easily use multiple systems. The use of an activity diagram is very important
to capture these systems together and explain the flow from a system to another. This definite
usage is not available in the other four diagrams. These systems can have the utility of being
external queues, database, or any other system.
Uses of activity diagram:
It can be used for describing the workflows by utilizing activities.
It is supportive in modeling extensive business requirements.
It provides a high level of knowledge about the functionalities of the system.
It helps in the investigation of business requirements in later development.
Example:
Following example shows an ATM withdrawal process. It has start and end as two points. There
are a few diamond shapes, which are used for checking conditions.
Use Case Diagrams
A system is known to fulfill the functional requirements. By using Use Case Diagrams, we
can eectively analyze the high-level requirement of the system. These requirements can be
explained by utilizing various cases. There are the three major components of these types of
UML diagrams.
1. Functional requirements: These can be represented as use cases; a verb explaining an
action.
2. Actors: Actors have the job to interact with the system; an actor could be anyone like a
human being, a group, organization, or an external or internal application.
3. Relationships: These relationships can happen between the actors and use cases. We
represent such relationships by using straight arrows.
The following given example uses a Case UML diagram to manage an inventory. In the example,
we have been given the owner, the manager, the supplier, the inventory inspector, and the
inventory clerk.
Internet_of_Things_CH06_pp141-170.indd 145 9/3/2019 10:14:17 AM
146 Internet of Things
Owner
Manager
Supplier
Inventory Cler
k
Distribute/
sell stock
Defective
Shipment
Quality
Control of
Stock
Payment
for Stock
Provide
stock/shipment
Return Stock
Purchase
Stock
<<include>>
<<include>>
Inspector
Withdraw
Money
PIN NumberCash Card
Display
Balance
<include>>
Record
Withdrawal
Record
Deposit
Deposit
Account
Number
Bank Name
ATM
Customer
Inside the circular blocks, we can explain the actions that are being performed by the
actors. These actions could be buying and paying for the stock, checking the quality of the
stock, distributing, or returning the stock. Use Case UML diagrams are perfect for depicting
Internet_of_Things_CH06_pp141-170.indd 146 9/3/2019 10:14:18 AM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.111.24