SlideShare a Scribd company logo
Sequence Diagram
Sequence Diagram
 Menggambarkan interaksi antar objek di dalam dan di
sekitar sistem (termasuk pengguna, display, dan
sebagainya) berupa message yang digambarkan
terhadap waktu
 Biasa digunakan untuk menggambarkan skenario atau
rangkaian langkah-langkah yang dilakukan sebagai
respons dari sebuah event untuk menghasilkan output
tertentu.
 Diawali dari apa yang men-trigger aktivitas tersebut,
proses dan perubahan apa saja yang terjadi secara
internal dan output apa yang dihasilkan.
Sequence Diagram
 Sequence diagram terdiri atas:
 Dimensi vertikal (waktu)
 Dimensi horizontal (objek-objek yang terkait).
 Masing-masing objek, termasuk aktor, memiliki
lifeline vertikal.
 Diagram ini secara khusus berasosiasi dengan
use case diagram
 Memperlihatkan tahap demi tahap apa yang
seharusnya terjadi untuk menghasilkan sesuatu
didalam use case
Simbol yang digunakan
Simbol...
Partisipant / Object Lifeline
 Pada UML 1 disebut dengan nama Obyek
 Diletakkan dari kiri ke kanan
 Setiap Partisipant terhubung dengan lifeline
 Standar penamaan
 Instance Name : Class Name
Time / Lifeline
 Mewakili waktu pada arah vertikal, dimulai dari
atas ke bawah
 Garis putus-putus yang menempel di partisipant
lifeline
Action
 Mewakili sebuah eksekusi operasi dari
partisipant
 Kotak kecil segiempat di lifeline
 Panjang kotak berbanding lurus dengan durasi
activation
Message
 Message berpindah dari 1 lifeline ke lifeline
yang lain
 Message yan pertama kali muncul di SSD
terletak paling atas, kemudian message yang
berikutnya berada di bawahnya
 Terdapat 3 macam :
 Synchronus
 Asynchronus
 Reply / Return
Message…
 Synchronous
● Pesan yang dikirim oleh 1 obyek ke
obyek lain dan obyek pertama
menunggu sampai hasil aksi
selesai.
 Asynchronous
● Pesan yang dikirim oleh 1 obyek ke
obyek lain dan obyek pertama tidak
menunggu sampai hasil aksi
selesai.
 Reply/Return
● Menunjukkan nilai kembali dari
obyek ke obyek yang mengirim
pesan
Message …
 the analyst object makes a call to the system object which is an instance of
the ReportingSystem class.
 The analyst object is calling the system object's getAvailableReports
method.
 The system object then calls the getSecurityClearance method with the
argument of userId on the secSystem object, which is of the class type
SecuritySystem
 the secSystem object returns userClearance to the system object when the
getSecurityClearance method is called.
 The system object returns availableReports when the getAvailableReports
method is called.
12
Sequence and Collaboration
Diagrams 12
Fun Example Objects
13
Sequence and Collaboration
Diagrams 13
Fun Example
Sequence diagram
14
Sequence and Collaboration
Diagrams 14
Fun Example
Sequence diagram
Recursive
 Suatu Obyek yang memanggil dirinya sendiri
 Digambarkan dengan menambah kotak kecil pada
activation
 Cotoh : system object memberi pesan ke dirinya sendiri :
menentukan Laporan apa saja yang ada
Hapus Partisipant
 Partisipant bisa menghapus dirinya sendiri
atau bisa juga dihapuskan oleh object lain
Petunjuk membuat SD
1. Mengacu ke skenario Use Case / Stimulus-
Response
2. Identifikasi participant objects
3. Gambar lifelines untuk tiap object
4. Gambar duration tiap object pada lifeline
5. Tambahkan object messages dari atas ke
bawah pada diagram (time-based)
6. Check ulang diagram untuk
kelengkapannya
Guards
 Kondisi : suatu syarat agar message dikirim
 the guard is the text "[pastDueBalance = 0]." By having the
guard on this message, the addStudent message will only be
sent if the accounts receivable system returns a past due
balance of zero
Combined fragments
  digunakan untuk mengelompokkan
message, tergantung kondisi tertentu
  disebut juga Interaction Fragment
(Kerangka Interaksi)
 UML 2 specification mengidentifikasi 11
operator untuk combined fragments.
Format Combined
op (operator):
applied to the enclosed interaction(s)
(some operators require arguments, such as diagrams names,
parameters, constants and guards)
[guard]:
a boolean expression
the interaction is executed according
to the guard’s value
diagram name:
needed if we want to refer to a diagram defined elsewhere
interaction:
a (fragment of a) sequence diagram (it can
contain other frames)
if we need to enclose more interactions,
we’ll separate them with an outlined line
(see next slide)
op [:arguments]
diagram name | interaction
[ [guard] ]
Contoh
 satu set interactions dipisahkan dengan garis
putus-putus
 interaction_i dijalankan jika guard_i bernilai
benar
op
interaction_1
[guard_1]
…
interaction_n
[guard_n]
Operator Combined Fragment
 Alternatives (alt)
 choice of behaviors – at most one will execute
 depends on the value of the guard (“else” guard
supported)
 Option (opt)
 Special case of alternative  hanya berisi 2 pilihan
 Break (break)
 Represents an alternative that is executed instead of
the remainder of the fragment (like a break in a loop)
 Parallel (par)
 Concurrent (interleaved) sub-scenarios, fragmen
berjalan secara pararel
 Negative (neg)
 Identifies sequences that must not occur (interaksi
yang salah)
Operator…
 Critical Region (region)
 Fragmen tidak dapat disela dengan kejadian lain
pada participating lifeline
 Loop (loop)
 Optional guard: [<min>, <max>, <Boolean-
expression>]
 Tanpa Guard berarti tidak ada batas
Alternative
Option
if a student's past due balance equals zero, then the addStudent,
getCostOfClass, and chargeForClass messages are sent. If the student's past
due balance does not equal zero, then the sequence skips sending any of the
messages in the option combination fragment.
Loop
Ref
Ref…
Break
 almost identical in every
way to the option combined
fragment, with two
exceptions.
 a break's frame has a
namebox with the text
"break" instead of "option."
 when a break combined
fragment's message is to be
executed, the enclosing
interaction's remainder
messages will not be
executed because the
sequence breaks out of the
enclosing interaction
 Breaks are most commonly
used to model exception
handling
Pararel
Contoh SD
online-bookshop
Contoh SD Pemesanan Buku
Put in shopping cart
Verify availability
Return availability
Buy shopping cart
Verivy customer
Send order
Return Customer chek
Customer
Cart Catalog Authentication Order
Proses pemesanan buku
Contoh SD FB Otentifikasi
Diambil dari : Hendra
Diambil dari : Hendra
Latihan
1. Amati Halaman Kuliah online dan content
yang terdapat pada kuliah online beserta
inputan, proses dan outputnya
2. Berdasarkan pengamatan anda buatlah
diagram use case, scenario, activity dan
sequence.

More Related Content

Similar to Sequence Diagram.ppt (20)

PPTX
Proyek TI - Chapter 12
beiharira
 
PPT
Uml
Mrirfan
 
PPT
Pertemuan 6-1-apbo-interaction-diagram
Abi Bobon
 
PPT
Sequence Diagram
Fahmi El Hajary
 
PDF
Bab 8 interaction diagram 2010
donasiilmu
 
PPT
12655598.ppt
NovalAkbar6
 
DOCX
Uml(unified modelling language)
Adola Silaban
 
PDF
Pengenalan UML (Unified Modelling Language)
Hani Nurrahmi
 
PDF
Terapan Terapi
rindaaulutamii
 
PPT
MATERI UML(Unified Modelling Language)
Febry Mbah Man
 
PPT
bahanajaruml-150609085409-lva1-app6891.ppt
BobbyHartantoSKomMMS
 
PDF
Tukang gypsum 081381278719
tukang_gypsum
 
DOC
Lap.praktikum
Risman Gunawan
 
PDF
[RPL2] Activity Diagram
rizki adam kurniawan
 
PPTX
Materi tentang UML Diagram ya adik adik.pptx
RadityaSnju
 
PDF
Otomatisasi sistem perparkiran
Doni Andriansyah
 
PDF
Modul uml
Danu Fasalillah
 
PPTX
Diagram Class dan Diagram Object presentasi
ssusera72af9
 
PPTX
Tugas 03 0916-gunawan suyanto-1512510205
Gunawandul
 
Proyek TI - Chapter 12
beiharira
 
Uml
Mrirfan
 
Pertemuan 6-1-apbo-interaction-diagram
Abi Bobon
 
Sequence Diagram
Fahmi El Hajary
 
Bab 8 interaction diagram 2010
donasiilmu
 
12655598.ppt
NovalAkbar6
 
Uml(unified modelling language)
Adola Silaban
 
Pengenalan UML (Unified Modelling Language)
Hani Nurrahmi
 
Terapan Terapi
rindaaulutamii
 
MATERI UML(Unified Modelling Language)
Febry Mbah Man
 
bahanajaruml-150609085409-lva1-app6891.ppt
BobbyHartantoSKomMMS
 
Tukang gypsum 081381278719
tukang_gypsum
 
Lap.praktikum
Risman Gunawan
 
[RPL2] Activity Diagram
rizki adam kurniawan
 
Materi tentang UML Diagram ya adik adik.pptx
RadityaSnju
 
Otomatisasi sistem perparkiran
Doni Andriansyah
 
Modul uml
Danu Fasalillah
 
Diagram Class dan Diagram Object presentasi
ssusera72af9
 
Tugas 03 0916-gunawan suyanto-1512510205
Gunawandul
 

Recently uploaded (20)

PPTX
SEPTI ARIANI,S.Pd_MATERI MPLS_MENGENAL JURUSAN DKV_TP2025-2026.pptx
NidaAnisa3
 
PDF
MODUL AJAR DEEP LEARNING BAHASA INDONESIA KELAS 3 CP 032 REVISI 2025 KURIKULU...
AndiCoc
 
PPTX
7 Kebiasaan Anak Indonesia Hebat Presentasi Pendidikan Kuning Ilustratif_2025...
yayan216153
 
PPTX
MATERI PENGENALAN KODING DAN KA - MARITA.pptx
sititoifah37
 
PPTX
Penggunaan-Internet-dan-Media-Sosial-Sehat-serta-Pengawasan-Gawai.pptx
baher18
 
PPTX
02. PPT Fisika X - Pengukuran Panjang_Jangka Sorong.pptx
SeptiPetriati
 
PPTX
PROFIL PELAJAR PANCASILA bahasa Indonesia (PPP).ppt
PaijoSelengean
 
PPTX
MPLS Wawasan Wiyata Mandala ramah k.pptx
SMKSBhaktiNusaPlosok
 
PPTX
Pencegahan Kekerasan, Isu Napza, Judi Onlie - MPLS.pptx
sri995
 
PPTX
PPT_MPLS_Internet_Sehat_dan_Gawai di Sekolah
enggal11
 
PPTX
Kerangka Materi Membangun LBANM untuk mpls 2025.pptx
muhmukhtar53
 
DOC
CV Narasumber/Pemateri (a.n. Kanaidi, SE., M.Si., cSAP., CGRC., CBCM)_10 Juli...
Kanaidi ken
 
PDF
7 Juli - DETEKSI DINI MELALUI SKRINING KESEHATAN JIWA BAGI ANAK DAN REMAJA.pdf
Wishs3
 
PDF
Materi-Paparan-MPLS-Ramah-2025.Materi-Paparan-MPLS-Ramah-2025.pdfpdf
dewamertanadi
 
PPTX
Materi Wawasan Wiyata Mandala MPLS SMA.pptx
LaurenciusGultom1
 
PPTX
pptwawasanwiyatamandala-230718004236-3a7e7385 (1).pptx
heldyjoktetimera1
 
PPTX
01. Materi Kebijakan dan Mekanisme Akreditasi PAUD 2025 - Anggota.pptx
suhartopppptkipa
 
PDF
RUJUKAN KEGIATAN MPLS Ramah JENJANG SMA-SMK SEDERAJAT.pdf
Gustan Nur
 
PPTX
Desain_Kecernaan_InVitro_PKS_AmpasSagu.pptx
yulianingsih3622
 
PPTX
7 Kebiasaan Anak Indonesia Hebat (KAIH)_SMA (HENIE GALLY).pptx
heniesensasi
 
SEPTI ARIANI,S.Pd_MATERI MPLS_MENGENAL JURUSAN DKV_TP2025-2026.pptx
NidaAnisa3
 
MODUL AJAR DEEP LEARNING BAHASA INDONESIA KELAS 3 CP 032 REVISI 2025 KURIKULU...
AndiCoc
 
7 Kebiasaan Anak Indonesia Hebat Presentasi Pendidikan Kuning Ilustratif_2025...
yayan216153
 
MATERI PENGENALAN KODING DAN KA - MARITA.pptx
sititoifah37
 
Penggunaan-Internet-dan-Media-Sosial-Sehat-serta-Pengawasan-Gawai.pptx
baher18
 
02. PPT Fisika X - Pengukuran Panjang_Jangka Sorong.pptx
SeptiPetriati
 
PROFIL PELAJAR PANCASILA bahasa Indonesia (PPP).ppt
PaijoSelengean
 
MPLS Wawasan Wiyata Mandala ramah k.pptx
SMKSBhaktiNusaPlosok
 
Pencegahan Kekerasan, Isu Napza, Judi Onlie - MPLS.pptx
sri995
 
PPT_MPLS_Internet_Sehat_dan_Gawai di Sekolah
enggal11
 
Kerangka Materi Membangun LBANM untuk mpls 2025.pptx
muhmukhtar53
 
CV Narasumber/Pemateri (a.n. Kanaidi, SE., M.Si., cSAP., CGRC., CBCM)_10 Juli...
Kanaidi ken
 
7 Juli - DETEKSI DINI MELALUI SKRINING KESEHATAN JIWA BAGI ANAK DAN REMAJA.pdf
Wishs3
 
Materi-Paparan-MPLS-Ramah-2025.Materi-Paparan-MPLS-Ramah-2025.pdfpdf
dewamertanadi
 
Materi Wawasan Wiyata Mandala MPLS SMA.pptx
LaurenciusGultom1
 
pptwawasanwiyatamandala-230718004236-3a7e7385 (1).pptx
heldyjoktetimera1
 
01. Materi Kebijakan dan Mekanisme Akreditasi PAUD 2025 - Anggota.pptx
suhartopppptkipa
 
RUJUKAN KEGIATAN MPLS Ramah JENJANG SMA-SMK SEDERAJAT.pdf
Gustan Nur
 
Desain_Kecernaan_InVitro_PKS_AmpasSagu.pptx
yulianingsih3622
 
7 Kebiasaan Anak Indonesia Hebat (KAIH)_SMA (HENIE GALLY).pptx
heniesensasi
 
Ad

Sequence Diagram.ppt

  • 2. Sequence Diagram  Menggambarkan interaksi antar objek di dalam dan di sekitar sistem (termasuk pengguna, display, dan sebagainya) berupa message yang digambarkan terhadap waktu  Biasa digunakan untuk menggambarkan skenario atau rangkaian langkah-langkah yang dilakukan sebagai respons dari sebuah event untuk menghasilkan output tertentu.  Diawali dari apa yang men-trigger aktivitas tersebut, proses dan perubahan apa saja yang terjadi secara internal dan output apa yang dihasilkan.
  • 3. Sequence Diagram  Sequence diagram terdiri atas:  Dimensi vertikal (waktu)  Dimensi horizontal (objek-objek yang terkait).  Masing-masing objek, termasuk aktor, memiliki lifeline vertikal.  Diagram ini secara khusus berasosiasi dengan use case diagram  Memperlihatkan tahap demi tahap apa yang seharusnya terjadi untuk menghasilkan sesuatu didalam use case
  • 6. Partisipant / Object Lifeline  Pada UML 1 disebut dengan nama Obyek  Diletakkan dari kiri ke kanan  Setiap Partisipant terhubung dengan lifeline  Standar penamaan  Instance Name : Class Name
  • 7. Time / Lifeline  Mewakili waktu pada arah vertikal, dimulai dari atas ke bawah  Garis putus-putus yang menempel di partisipant lifeline
  • 8. Action  Mewakili sebuah eksekusi operasi dari partisipant  Kotak kecil segiempat di lifeline  Panjang kotak berbanding lurus dengan durasi activation
  • 9. Message  Message berpindah dari 1 lifeline ke lifeline yang lain  Message yan pertama kali muncul di SSD terletak paling atas, kemudian message yang berikutnya berada di bawahnya  Terdapat 3 macam :  Synchronus  Asynchronus  Reply / Return
  • 10. Message…  Synchronous ● Pesan yang dikirim oleh 1 obyek ke obyek lain dan obyek pertama menunggu sampai hasil aksi selesai.  Asynchronous ● Pesan yang dikirim oleh 1 obyek ke obyek lain dan obyek pertama tidak menunggu sampai hasil aksi selesai.  Reply/Return ● Menunjukkan nilai kembali dari obyek ke obyek yang mengirim pesan
  • 11. Message …  the analyst object makes a call to the system object which is an instance of the ReportingSystem class.  The analyst object is calling the system object's getAvailableReports method.  The system object then calls the getSecurityClearance method with the argument of userId on the secSystem object, which is of the class type SecuritySystem  the secSystem object returns userClearance to the system object when the getSecurityClearance method is called.  The system object returns availableReports when the getAvailableReports method is called.
  • 12. 12 Sequence and Collaboration Diagrams 12 Fun Example Objects
  • 13. 13 Sequence and Collaboration Diagrams 13 Fun Example Sequence diagram
  • 14. 14 Sequence and Collaboration Diagrams 14 Fun Example Sequence diagram
  • 15. Recursive  Suatu Obyek yang memanggil dirinya sendiri  Digambarkan dengan menambah kotak kecil pada activation  Cotoh : system object memberi pesan ke dirinya sendiri : menentukan Laporan apa saja yang ada
  • 16. Hapus Partisipant  Partisipant bisa menghapus dirinya sendiri atau bisa juga dihapuskan oleh object lain
  • 17. Petunjuk membuat SD 1. Mengacu ke skenario Use Case / Stimulus- Response 2. Identifikasi participant objects 3. Gambar lifelines untuk tiap object 4. Gambar duration tiap object pada lifeline 5. Tambahkan object messages dari atas ke bawah pada diagram (time-based) 6. Check ulang diagram untuk kelengkapannya
  • 18. Guards  Kondisi : suatu syarat agar message dikirim  the guard is the text "[pastDueBalance = 0]." By having the guard on this message, the addStudent message will only be sent if the accounts receivable system returns a past due balance of zero
  • 19. Combined fragments   digunakan untuk mengelompokkan message, tergantung kondisi tertentu   disebut juga Interaction Fragment (Kerangka Interaksi)  UML 2 specification mengidentifikasi 11 operator untuk combined fragments.
  • 20. Format Combined op (operator): applied to the enclosed interaction(s) (some operators require arguments, such as diagrams names, parameters, constants and guards) [guard]: a boolean expression the interaction is executed according to the guard’s value diagram name: needed if we want to refer to a diagram defined elsewhere interaction: a (fragment of a) sequence diagram (it can contain other frames) if we need to enclose more interactions, we’ll separate them with an outlined line (see next slide) op [:arguments] diagram name | interaction [ [guard] ]
  • 21. Contoh  satu set interactions dipisahkan dengan garis putus-putus  interaction_i dijalankan jika guard_i bernilai benar op interaction_1 [guard_1] … interaction_n [guard_n]
  • 22. Operator Combined Fragment  Alternatives (alt)  choice of behaviors – at most one will execute  depends on the value of the guard (“else” guard supported)  Option (opt)  Special case of alternative  hanya berisi 2 pilihan  Break (break)  Represents an alternative that is executed instead of the remainder of the fragment (like a break in a loop)  Parallel (par)  Concurrent (interleaved) sub-scenarios, fragmen berjalan secara pararel  Negative (neg)  Identifies sequences that must not occur (interaksi yang salah)
  • 23. Operator…  Critical Region (region)  Fragmen tidak dapat disela dengan kejadian lain pada participating lifeline  Loop (loop)  Optional guard: [<min>, <max>, <Boolean- expression>]  Tanpa Guard berarti tidak ada batas
  • 25. Option if a student's past due balance equals zero, then the addStudent, getCostOfClass, and chargeForClass messages are sent. If the student's past due balance does not equal zero, then the sequence skips sending any of the messages in the option combination fragment.
  • 26. Loop
  • 27. Ref
  • 29. Break  almost identical in every way to the option combined fragment, with two exceptions.  a break's frame has a namebox with the text "break" instead of "option."  when a break combined fragment's message is to be executed, the enclosing interaction's remainder messages will not be executed because the sequence breaks out of the enclosing interaction  Breaks are most commonly used to model exception handling
  • 32. Contoh SD Pemesanan Buku Put in shopping cart Verify availability Return availability Buy shopping cart Verivy customer Send order Return Customer chek Customer Cart Catalog Authentication Order Proses pemesanan buku
  • 33. Contoh SD FB Otentifikasi
  • 34. Diambil dari : Hendra
  • 35. Diambil dari : Hendra
  • 36. Latihan 1. Amati Halaman Kuliah online dan content yang terdapat pada kuliah online beserta inputan, proses dan outputnya 2. Berdasarkan pengamatan anda buatlah diagram use case, scenario, activity dan sequence.