Last active
August 29, 2015 14:19
-
-
Save georgiana-gligor/e7f34c232e63b770988f to your computer and use it in GitHub Desktop.
demo.puml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
actor PayRollCron | |
participant PayDayTransaction | |
participant PayRoll | |
participant PayRollDatabase | |
participant Employee | |
participant PayCheck | |
@enduml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
' define diagram participants | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
actor PayRollCron | |
participant PayDayTransaction | |
participant PayRoll | |
participant PayRollDatabase | |
participant Employee | |
participant PayCheck | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
' describe sequence of events | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
PayRollCron->PayDayTransaction: initialise(today) | |
PayRollCron->PayDayTransaction: execute | |
activate PayDayTransaction | |
PayDayTransaction->PayRoll: get | |
PayRoll->PayRollDatabase: new | |
activate PayRollDatabase | |
PayRollDatabase-->PayDayTransaction | |
PayDayTransaction->PayRollDatabase: find_employees | |
PayRollDatabase-->PayDayTransaction: employees | |
deactivate PayRollDatabase | |
PayDayTransaction->PayDayTransaction: for each employee e | |
activate PayDayTransaction | |
PayDayTransaction->Employee: pay_date(date) ? | |
Employee-->PayDayTransaction: true | |
PayDayTransaction->Employee: calculate_pay(date) | |
Employee-->PayDayTransaction: amount | |
PayDayTransaction->PayCheck: new (amount) | |
PayCheck-->PayRoll: check | |
PayDayTransaction->Employee: send_pay(check) | |
deactivate PayDayTransaction | |
PayDayTransaction-->PayRollCron: | |
deactivate PayDayTransaction | |
@enduml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
' define diagram participants | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
actor PayRollCron | |
participant PayDayTransaction | |
participant PayRoll | |
participant PayRollDatabase | |
participant Employee | |
participant PayCheck | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
' formatting options | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
hide footbox | |
autonumber | |
skinparam sequence { | |
ParticipantBorderColor black | |
ParticipantBackgroundColor #A9DCDF | |
ParticipantFontName Futura | |
ParticipantFontSize 15 | |
ActorBackgroundColor #A9DCDF | |
ActorBorderColor black | |
ArrowFontName Futura | |
} | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
' describe sequence of events | |
''''''''''''''''''''''''''''''''''''''''''''''''' | |
PayRollCron->PayDayTransaction: initialise(today) | |
PayRollCron->PayDayTransaction: execute | |
activate PayDayTransaction | |
PayDayTransaction->PayRoll: get | |
PayRoll->PayRollDatabase: new | |
activate PayRollDatabase | |
PayRollDatabase-->PayDayTransaction | |
PayDayTransaction->PayRollDatabase: find_employees | |
PayRollDatabase-->PayDayTransaction: employees | |
deactivate PayRollDatabase | |
PayDayTransaction->PayDayTransaction: for each employee e | |
activate PayDayTransaction | |
PayDayTransaction->Employee: pay_date(date) ? | |
Employee-->PayDayTransaction: true | |
PayDayTransaction->Employee: calculate_pay(date) | |
Employee-->PayDayTransaction: amount | |
PayDayTransaction->PayCheck: new (amount) | |
PayCheck-->PayRoll: check | |
PayDayTransaction->Employee: send_pay(check) | |
deactivate PayDayTransaction | |
PayDayTransaction-->PayRollCron: | |
deactivate PayDayTransaction | |
@enduml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment