Sunteți pe pagina 1din 23

Activity Diagram

Agenda
. Activity diagram . .
[condition 1]

Activity
[condition 2]

Ac ti vi ty

Activity Activity
[synchronization condition]

Aris Tjahyanto. ADSI. 1 2

Aris Tjahyanto. ADSI.


Activity

Belongs to a UseCase business workflows Illustrates

Activity Diagram

Activity or action Transition

Syntax of Activity Diagrams Activi


ty_1

Similar to the traditional flowchart (if no concurrent process) Used to :


Understanding Work-Flow Analyzing UseCase (show the logic of a usecase) Dealing with Multi-Threading
Aris Tjahyanto. ADSI.

Branch/Decision point Synchronization bar


zationUnit_1

Swimlanes
Aris Tjahyanto. ADSI. 4

F o r Join k

Organi

3/24/12

Activity Diagram Example


K u l i a h [te rta rik ] [tidak tertarik] meng antu k
Pilih action [aktif] [ p a s if ] Mend engark an [ s e l e s a i ]

Synchronization bar
Concurrent behavior means an object can Modeling concurrency do multiple things in parallel a Each separate path is called thread
Spli ttin g
A B

pe rh ati an

M e n c a t a t

B e r t a n y a

Synchroniz ation

Aris Tjahyanto. ADSI. 5 6

Aris Tjahyanto. ADSI.

The activities of an activity diagram may be performed or lane represents the Each zone by different groups. responsibilities of a particular group. If swimlanes are used, each activity can belong to one and only one swimlane.
Aris Tjahyanto. ADSI. 7

Swim lanes

D o s e n W a li

Swimlanes Example Adminis M


H S trasi

Aris Tjahyanto. ADSI. 8

3/24/12

Custo mer
Identify Movie

Swimlanes Example
Manager Clerk Walking

Exercises
FRS Online

Place Pa Order y C o lPlace lOrder e c t M D o e n l e i y v e r M o v i e

P i c k u p M o v i e

F i l l O r d e r

Describe activity diagram Make an an usecase. for the actor MHS.


M H S

Mengisi FRS Online << ext en d> >

<<i ncl ude >> << ext en d> >

Mengambil SKS lebih

Aris Tjahyanto. ADSI. 10

Do se n W ali

Konsu ltasi FRS

Aris Tjahyanto. ADSI.

Narrative use case specification


Use Case Mengisi FRS Online Mahasiswa Mahasiswa sudah 1. 2. 3. 4. bayar SPP Online memerlukan NRP, kode FRS kuliah, dan kelas yang akan diambil Mahasiswa memasukkan data tsb. Extension point: SKS lebih dari jatah FRS Online memeriksa prasyarat dan menghitung total SKS yang diambil. Menampilkan pesan SKS melebihi jatah bila pengambilan melebihi jatah yang telah ditentukan. Dosen wali memberikan ACC Bagian Administrasi mencetak bukti FRS MHS mengambil bukti FRS Pengambilan SKS > jatah SKS 3a. Bila kelebihan hanya 1 SKS, langsung diijinkan. 3b. Bila track record nilai bagus atau akan DO, diijinkan. MHS tidak jadi mengisi FRS Online. MHS mendapatkan bukti FRS dari bagian Administrasi. Actors Preco Desc ripti nditio on ns

Activity Diagram for MHS


M enam bah atau m em batal kan kul i ah

5. 6. 7. Ext ensi on

[prasya rat ti dak oke ] T am pi l pesan "prasya rat ti dak m em e nuhi " [ACC]

[pra syarat oke]

Konsul tasi deng an Do sen Wali

Exc epti ons Res

Ce tak b ukti FRS

Aris Tjahyanto. ADSI. 11

Aris Tjahyanto. ADSI. 12

3/24/12

ult

So far ...
Usecase diagram: describe functionality from the users perspective Class diagram: modeling static structure Collaboration diagram: relationship among objects Sequence diagram: dynamic behavior of objects in time sequence. Statechart diagram: model of business rules for a class
CookSpaghetti

Another Examples (1)


PrepareMeal Mak eSau ce

[ in the mood for wine]

OpenBottl eWine

Activity diagram: illustrates business Package workflows for usecase diagram: ??


Deployment diagram: ?? Aris Tjahyanto. ADSI. 13
Combine

Serve

Aris Tjahyanto. ADSI. 14

Another Examples (2)


[New System]

[Existing

Recei ve Order

[Incorrec t problem] Analyse the Problem

System] [Understand Stakeholder Needs]

Another Examples (3)


[New Input] [Can't do all

Understand

*[
the work]

Staheolder Needs Define the System Manage Scope of the System

Assign Goods to item [ need to order] [

for each line item] /

Authorize Payment

f a il e d ]

Canc el Orde r

[ More Iteratio ns]

[Wor k in scop e] Refine the System Definition Manage Changing Requirements

[Requirements Definition Complete]

Reorde r Goods

succeeded] stock assigned to all items and payment authorized]

Dispatch Order

Aris Tjahyanto. ADSI. 15

Aris Tjahyanto. ADSI. 16

3/24/12

Exercises
Develop an activity diagram based on the following narrative. Note any ambiguities or questions that you have as you develop the model. If you need to make assumptions, also note them. The purpose of the open Access Insurance System is to provide automotive insurance to car owners. Initially, prospective customers fill out an insurance application, which provides information about the customer and his or her vehicles. This information is sent to an agent, who sends it to various insurance companies to get quotes for insurance. When the responses return, the agent then determines the best policy for the type and level of coverage desired and gives the customer a copy of the insurance policy proposal and quote.
Aris Tjahyanto. ADSI. 17 18

References
Alan Dennis, Systems Analysis and Design with UML Version 2.0, 2004

Aris Tjahyanto. ADSI.

3/24/12

Activity Diagram

3/24/12

Aris Tjahyanto. ADSI. 1

Agenda
. . . Activity diagram
[condition 1]

Activity
[condition 2]

Acti vity

[synchronization Activity condition]

Activity Activity

3/24/12

Belongs to a UseCase business Illustrates

Activity Diagram

workflowsthe traditional flowchart (if no Similar to concurrent process) Used to :


Understanding WorkFlow Analyzing UseCase (show the logic of a usecase) Dealing with Multi-Threading
3/24/12

Aris Tjahyanto. ADSI. 3

Activity or action Transition Branch/Decision point For


k Join

Syntax of Activity Diagrams

Activity _1

OrganizationUn it_1

Synchronization bar Swimlanes


3/24/12

Activity Diagram Example


Kuli ah
Pilih action [aktif]

[pa sif]

[tertari k] perhati an

[tidak tertarik] mengant uk

Menc atat

Berta nya

Mendengar kan [selesai]

3/24/12

Aris Tjahyanto. ADSI. 5

Synchronization bar
Modeling concurrency Concurrent behavior means an object can do multiple things in parallel
Splitti ng
B Each separate path is called a thread A C E

Synchronizati on

3/24/12

Aris Tjahyanto. ADSI. 6

The activities of an activity diagram may be performed or lane represents the responsibilities Each zone by different groups. of a particular group. If swimlanes are used, each activity can belong to one and only one swimlane.

Swim lanes

3/24/12

Aris Tjahyanto. ADSI. 7

Dos en Wali

Swimlanes Example M
HS

Administra si

3/24/12

Custom er Identify Movie


Place Order

Swimlanes Example Walking Manag


er Clerk

Place Order Pay Coll ect Mon ey Fill Order

Pick up

Deli ver Mov

3/24/12

Mo vie

Exercises

Describe an usecase.

Mengisi FRS Online <<exten d>> M H S <<includ e>>

FRS Online

Mengambil SKS lebih <<extend>>

Make an activity diagram for the actor MHS.


Dosen Wali

Konsultasi FRS

3/24/12

Aris Tjahyanto. ADSI.

Narrative use case specification


Use Case Actors Preconditi ons Descriptio n Mengisi FRS Online Mahasiswa Mahasiswa sudah bayar SPP 1 FRS Online memerlukan NRP, kode kuliah, dan . kelas yang akan diambil 2 Mahasiswa memasukkan data tsb. . 3 Extension point: SKS lebih dari jatah . 4 FRS Online memeriksa prasyarat dan menghitung . total SKS yang diambil. Menampilkan pesan SKS 5 . 6 . 7 . melebihi jatah bila pengambilan melebihi jatah yang telah ditentukan. Dosen wali memberikan ACC Bagian Administrasi mencetak bukti FRS MHS mengambil bukti FRS

Pengambilan SKS > jatah SKS 3a. Bila kelebihan hanya 1 SKS, langsung diijinkan. 3b. Bila track record nilai bagus atau akan DO, diijinkan. MHS tidak jadi mengisi FRS Online.

Extension

MHS mendapatkan bukti FRS dari bagian Administrasi.

3/24/12

Aris Tjahyanto. ADSI.

Activity Diagram for MHS

[prasyarat tidak oke] [A CC ]

[prasyarat oke]

Tampil pesan "prasyarat tidak memenuhi"

Konsultasi dengan Dosen Wali

Cetak bukti FRS

Menambah atau membatalkan kuliah

3/24/12

So far ... from the users perspective Usecase diagram: describe functionality
Class diagram: modeling static structure Sequence diagram: dynamic behavior of objects in time sequence. Collaboration diagram: relationship among objects Statechart diagram: model of business rules for a class

Activity diagram: illustrates business Package workflows for usecase


diagram: ?? Deployment diagram: ??
3/24/12

Aris Tjahyanto. ADSI. 13

Another Examples (1)

CookSpaghe tti

MakeSa uce OpenBottleWine

Combine PrepareMeal

[ in the mood for wine]

3/24/12

Another Examples (2)

* [ Assign Goods to item [ [ need to order] [ Authorize Payment succeeded] stock assigned to all items and payment authorized]

fail ed]

Cancel Order

Reorder Goods

Dispatch Order

3/24/12

Aris Tjahyanto. ADSI.

[New System]

[Existing System]

Another Examples (3)


[New Input] Manage Changing Requirements [Can't do all the work]

Analyse the Problem Needs [Incorrect problem]

Understand Staheolder

[Understand Stakeholder Needs]

Define the System [ More Iterations]

Manage Scope of the System [Work in scope]

Refine the System Definition [Requirements Definition Complete]

3/24/12

Aris Tjahyanto. ADSI.

Exercise s Develop an activity diagram based on the following


narrative. Note any ambiguities or questions that you have as you develop the model. If you need to make assumptions, also note them. The purpose of the open Access Insurance System is to provide automotive insurance to car owners. Initially, prospective customers fill out an insurance application, which provides information about the customer and his or her vehicles. This information is sent to an agent, who sends it to various insurance companies to get quotes for insurance. When the responses return, the agent then determines the best policy for the type and level of coverage desired and gives the customer a copy of the insurance policy proposal and quote.
3/24/12

Aris Tjahyanto. ADSI. 17

Alan Dennis, Systems Analysis and Design with UML Version 2.0, 2004

Reference s

3/24/12

Aris Tjahyanto. ADSI. 18

S-ar putea să vă placă și