UML Communication diagram

+2 votes
asked Oct 8, 2017 in To be sorted by anonymous
Is there a way to create an UML Communication diagram?

Example: https://en.wikipedia.org/wiki/Communication_diagram

2 Answers

+1 vote
answered Nov 15, 2017 by mgrol (3,150 points)

Hi,

you can emulate a communication diagram like this:

Here is the code snippet for that example:

@startuml
skinparam linestyle ortho
rectangle "A" as one
rectangle "B" as two
rectangle "C" as three
rectangle "D" as four

one -right-> two: message 1-->2
two -right-> three: message 2-->3
two --> four: message 2-->4
three -[hidden]- four
@enduml

BR,

Michael

commented Nov 17, 2017 by Micha
Thank you very much, Michael! That's what I need.
commented Nov 17, 2017 by mgrol (3,150 points)
Hi Micha,

I am glad to hear. For more details you may also look here: http://plantuml.com/archimate-diagram.
BR,
Michael
0 votes
answered Nov 21 by anonymous
@startuml

actor User

rectangle KantongKuSystem {
  registrasi()
  login()
  topUp()
  transferSaldo()
  payment()
  requestInbox()
  requestHistory()
  requestProfile()
}

rectangle Registrasi {
  validateData()
  createAccount()
}

rectangle Login {
  validateLogin()
  createSession()
}

rectangle Bank {
  validateTransaction()
  confirmTransaction()
}

rectangle Database {
  updateData()
  fetchData()
}

rectangle Inbox {
  kirimNotifikasi()
  tampilkanInbox()
}

rectangle Merchant {
  validatePayment()
}

User -> KantongKuSystem : Interaksi Utama

KantongKuSystem -> Registrasi : registrasi()
Registrasi -> Database : createAccount()
Database -> Registrasi : konfirmasiRegistrasi()

KantongKuSystem -> Login : login()
Login -> Database : validateLogin()
Database -> Login : loginValid()
Login -> KantongKuSystem : sessionCreated()

KantongKuSystem -> Bank : validateTransaction()
Bank -> KantongKuSystem : transactionValid()
KantongKuSystem -> Database : updateSaldo()
Database -> KantongKuSystem : saldoUpdated()

KantongKuSystem -> Inbox : kirimNotifikasi()
Inbox -> User : notifikasiTerkirim()

KantongKuSystem -> Merchant : validatePayment()
Merchant -> KantongKuSystem : paymentValid()

KantongKuSystem -> Database : fetchData()
Database -> KantongKuSystem : returnData()

KantongKuSystem -> User : tampilkanData()

@enduml
...