Skip to content

Latest commit

 

History

History
40 lines (35 loc) · 1.48 KB

examples.md

File metadata and controls

40 lines (35 loc) · 1.48 KB

Examples

The following examples shall be transformed to UML.

Example 1

Plantuml:

@startuml
title Weather API

actor "bob : User" as bob
participant "node0 : Webserver" as node0
participant ": WeatherAPI"
actor "alice : User" as alice

bob -> node0: getWeather(location='Augsburg')
node0 -> ": WeatherAPI" : getWeatherData(long=48.360455, lat=10.901283)
node0 <<-- ": WeatherAPI" : getWeatherData(validFor: 2000) : 'sunny'
bob <<-- node0: getWeather : 'sunny'

alice -> node0: getWeather(location='München')
alice <<-- node0: getWeather : 'sunny'
@enduml

PlantUML Diagram

Example 2

Plantuml:

@startuml
participant "key1 : Key"
participant "lock : Lock" as lock
key1 ->> lock: unlock()
lock -> key1 : getKey()
lock <<-- key1 : getKey: 'bew8n4ci2l4nvuy8'
lock -> lock: validateKey('bew8n4ci2l4nvuy8')
lock -->> lock: validateKey: true
lock ->> lock: open()
@enduml

PlantUML Diagram