# PlantUML - Beispielsammlung
:::spoiler Inhaltsverzeichnis
[toc]
:::
## Linksammlung
- [PlantUML auf Github](https://github.com/plantuml)
- [PlantUML in Liascript](https://liascript.github.io/course/?https://raw.githubusercontent.com/liaTemplates/plantuml/master/README.md#2)
## PlantUML Elemente
```plantuml
@startuml
actor A
agent B
artifact C
boundary D
card E
cloud F
component G
control H
database I
entity J
file K
folder L
frame M
interface N
node O
package P
queue Q
queue Ta
stack R
rectangle S
storage T
usecase U
@enduml
```
```plantuml
@startuml
actor actor
agent agent
artifact artifact
boundary boundary
card card
circle circle
cloud cloud
component component
control control
database database
entity entity
file file
folder folder
frame frame
interface interface
label label
node node
package package
queue queue
stack stack
rectangle rectangle
storage storage
usecase usecase
@enduml
```
[Quelle Hitchhikers Guide to PlantUML](https://crashedmind.github.io/PlantUMLHitchhikersGuide/PlantUMLSpriteLibraries/plantuml_sprites.html)
### Elemente verbinden
```plantuml
actor client
node app
database db
db --> app
app -> client
stack "sta\nck 1" as s
stack "stack 1a" as u
stack "stack 2" as t
s --> t
```
---
## Icons
```plantuml
skinparam cardBorderColor none
skinparam cardBackgroundColor none
skinparam cardShadowing false
skinparam cardSize 42
card <&key>
card "<size:42><&wrench></size>"
```
```plantuml
listopeniconic
```
---
```plantuml
sprite $foo1 {
FFFFFFFFFFFFFFF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
F0123456789ABCF
FFFFFFFFFFFFFFF
}
Alice -> Bob : Testing <$foo1{scale=5}>
```
---
## JSON
```plantuml
@startjson
["1a", "2b", "3c"]
@endjson
```
---
```plantuml
title
Example of Tree
|_ First line
|_ Bom (Model)
|_ prop1
|_ prop2
|_ prop3
|_ Last line
end title
```
---
## Use Case Diagramm
```plantuml
left to right direction
actor Guest as g
package Professional {
actor Chef as c
actor "Food Critic" as fc
}
package Restaurant {
usecase "Eat Food" as UC1
usecase "Pay for Food" as UC2
usecase "Drunk" as UC3
usecase "Review" as UC4
}
actor Admin as a
fc --> UC4
g --> UC1
g --> UC2
g --> UC3
UC3 --> a
```
```plantuml
@startuml
left to right direction
title Use-Case-Diagramm: Mau-Mau
actor "Spieler" as Spieler
actor "Kartengeber" as Kartengeber
rectangle "Mau-Mau-Spielsystem" {
usecase "Spiel starten" as UC_Start
usecase "Karten mischen und austeilen" as UC_Austeilen
usecase "Karte ablegen" as UC_Ablegen
usecase "Karte ziehen" as UC_Ziehen
usecase "Mau ansagen" as UC_Mau
usecase "Mau-Mau ansagen" as UC_MauMau
usecase "Regeln prüfen" as UC_Regeln
usecase "Spiel beenden" as UC_Ende
usecase "Zug auswerten" as UC_Zug
}
Spieler --> UC_Start
Kartengeber --> UC_Austeilen
Spieler --> UC_Ablegen
Spieler --> UC_Ziehen
Spieler --> UC_Mau
Spieler --> UC_MauMau
UC_Ablegen --> UC_Regeln : <<include>>
UC_Ziehen --> UC_Regeln : <<include>>
UC_Ablegen --> UC_Zug : <<extend>>
UC_Ziehen --> UC_Zug : <<extend>>
UC_Zug --> UC_Ende : <<include>>
@enduml
```
---
## Aktivitätsdiagramm
```plantuml
participant Administrator
participant GitLab.com
Administrator->GitLab.com: Submits an MR for review
loop CI
GitLab.com->GitLab.com: Syntax checks
end
GitLab.com->ops.gitlab.net: branch mirrored to ops.gitlab.net
loop CI
ops.gitlab.net->ops.gitlab.net: Dryrun apply on all envs
end
Administrator->GitLab.com: MR merged to master
loop CI
GitLab.com->GitLab.com: Syntax checks
end
GitLab.com->ops.gitlab.net: master mirrored to ops.gitlab.net
loop CI
ops.gitlab.net->ops.gitlab.net: Applied to non-production envs
end
loop CI
ops.gitlab.net->ops.gitlab.net: Applied to production
end
```
```plantuml
@startuml
|Kunde|
start
repeat
:Artikel ansehen;
:Artikel in den Warenkorb legen;
repeat while (weitere Artikel ansehen?) is (ja)
if (Zur Kasse gehen?) then (ja)
if (Ist Kunde registriert?) then (ja)
:Kunden-Login;
else (nein)
:Gast-Bestellung;
endif
:Adresse eingeben;
:Zahlungsart wählen;
:Zahlungsart eingeben;
:Kaufauftrag erteilen;
else (nein)
:Vorgang abbrechen;
|Onlineshop|
:Bestellung bestätigen;
:Rechnung erstellen;
:Ware packen;
:Ware versenden;
endif
stop
@enduml
```
```plantuml
@startuml
|Kunde|
start
:Artikel auswählen;
:Warenkorb anzeigen;
if (Warenkorb bearbeiten?) then (ja)
:Warenkorb bearbeiten;
endif
:Bestellung abschicken;
|Onlineshop|
:Bestellung erhalten;
:Bestellung prüfen;
if (Bestellung korrekt?) then (ja)
:Zahlungsinformationen überprüfen;
if (Zahlung erfolgreich?) then (ja)
:Bestellung verarbeiten;
:Bestätigung an Kunden senden;
else (nein)
:Zahlungsfehler behandeln;
endif
else (nein)
:Bestellfehler behandeln;
endif
stop
|Kunde|
stop
@enduml
```
```plantuml
@startuml
if (foo) then
:error;
kill
endif
:foo2;
@enduml
```
## Aktivitätsdiagramm (beta von PlantUML)
```plantuml
title Geldautomat Ablauf
|#eeeeee|Kunde|
|#c4c9cd|Geldautomat|
|Kunde|
start
:Karte eingeben;
|Geldautomat|
:Karte prüfen;
if () is (Karte gültig) then
|Kunde|
:PIN eingeben;
|Geldautomat|
:PIN überprüfen;
if () is (PIN gültig) then
|Kunde|
:Betrag eingeben;
|Geldautomat|
fork
:Karte ausgeben;
fork again
:Geld ausgeben;
end fork
|Kunde|
fork
:Karte entnehmen;
fork again
:Geld entnehmen;
end fork
stop
else (PIN ungültig)
|Geldautomat|
:Karte einbehalten;
stop
endif
else (Karte ungültig)
|Geldautomat|
:Karte einbehalten;
stop
```
## Zustandsdiagramm
```plantuml
title somethingf
|#ffffff|p1|
|#c4c9cd|p2|
|#daf0fe|Backend|
|Backend|
start
:something;
if (open) then (yes)
:generate open data;
split
#3f3:Mail to p1\nMAIL ID: **3010**|
|p1|
:Receive Mail **3010**;
detach
split again
|Backend|
#3f3:Mail to p2\nMAIL ID: **3006**|
|p2|
:Receive Mail **3006**;
detach
end split
endif
|Backend|
#HotPink:something else>
--> [*]
```
## Sequenzdiagramm
```plantuml
actor Client
Client ++
Client -> index ++ : HTTP request
index -> Router ++ : CallController($requested_page, $method)
Router -> MachineController ++ : addMachine()
MachineController -> Model ++ : createMachine()
Model --> MachineController : machine
deactivate Model
MachineController -> View ++ : rednerView(machine):Response
View --> MachineController : viewResponse
deactivate View
MachineController --> Router : viewResponse
deactivate MachineController
Router --> index : Response
deactivate Router
index -> ResponseHandler ++ : sendResponse(response)
ResponseHandler --> index : HTTP response
deactivate ResponseHandler
index --> Client : HTTP response
deactivate index
deactivate Client
```
---
## Organigramm
```plantuml
@startwbs
<style>
wbsDiagram {
// all lines (meaning connector and borders, there are no other lines in WBS) are black by default
Linecolor black
arrow {
// note that connector are actually "arrow" even if they don't look like as arrow
// This is to be consistent with other UML diagrams. Not 100% sure that it's a good idea
// So now connector are green
LineColor green
}
:depth(0) {
// will target root node
BackgroundColor White
RoundCorner 10
LineColor red
// Because we are targetting depth(0) for everything, border and connector for level 0 will be red
}
arrow {
:depth(2) {
// Targetting only connector between Mexico-Chihuahua and USA-Texas
LineColor blue
LineStyle 4
LineThickness .5
}
}
node {
:depth(2) {
LineStyle 2
LineThickness 2.5
}
}
boxless {
// will target boxless node with '_'
FontColor darkgreen
}
}
</style>
*[#ddd] Leitung
**[#ffdae2] Abteilung 1
***[#f36c89] "Stelle 1" as A
***[#f36c89] Stelle 2
***[#f36c89] actor "Stelle 3"
**[#f36c89]:Abteilung
** Abteilung X
2asdfasdf
adsf;
***[#f36c89] "Stelle 4" as C
***[#f36c89]_:Stelle 5
sdada
asd
;
***[#f36c89] "Stelle 6" as B
***[#f36c89]< Stelle 7
A --> B
B --> C
@endwbs
```
## ERD
Parameter
* Diagramm von link nach rechts `left to right direction`
* ' avoid problems with angled crows feet
* (nicht notwendig) Schatten entfernen `skinparam shadowing false`
* ' hide the (E) in the entity name
<!--' Notation: Funktionalität/Kardinalität und (min/max)-->
```plantuml
left to right direction
hide circle
skinparam class {
ArrowColor #cccccc
BorderColor #eeeeee
}
entity Address
entity Student
entity Subject
entity Mark
<> r1
<> r2
' Notation: Funktionalität/Kardinalität und (min/max)
Address "1" -- r1
r1 -- "n" Student
Student "n" -- r2
r2 -- "m" Subject
r2 - Mark
```
```plantuml
left to right direction
hide circle
skinparam linetype ortho
skinparam shadowing false
entity Address {
<&key> **id** : char(5)
--
street : varchar(255)
zipCode : char(5)
city : varchar(255)
country : varchar(255)
...
}
entity Student {
<&key> **id** : char(5)
--
firstName : varchar(255)
lastName : varchar(255)
...
}
entity Subject {
<&key> **id** : char(2)
--
name : varchar(255)
...
}
entity Mark {
--
mark : float
...
}
<> r1
diamond r2
' Notation: Funktionalität/Kardinalität und (min/max)
Address "**1** (1,*)" -- r1
r1 -- "**n** (1,1)" Student
Student "**n** (0,*)" -- r2
r2 -- "**m** (0,*)" Subject
r2 - Mark
```
## Datenmodell
```plantuml
left to right direction
hide circle
'skinparam linetype ortho
'skinparam roundcorner 10
'skinparam shadowing true
'skinparam handwritten true
'skinparam class {
' BackgroundColor white
' ArrowColor #666666
' BorderColor #000000
'}
entity "Kunde" as Kd {
Kd_Id (PK)
--
Kd_Firma
Kd_Straße
Kd_PLZ
Kd_Ort
}
entity "Rechnung" as Rg {
Rg_Id (PK)
--
Rg_Kdid (FK)
Rg_Datum
Rg_Nummer
}
entity " RechnungsPosition " as RgPos {
RgPos_Id (PK)
--
RgPos_RgId (FK)
RgPos_ArtId (FK)
RgPos_Menge
RgPos_Preis
}
entity "Artikel" as Art {
Art_Id (PK)
--
Art_Nummer
Art_Bezeichung
Art_Preis
}
' Beziehungen '
Kd "1" -- "n" Rg
Rg "1" -- "n" RgPos
RgPos "n" -- "1" Art
```
## Gannt-Diagramm
```plantuml
@startgantt
hide footbox
Project starts the 2024-12-01
[Task1] lasts 9 days
sunday are closed
note bottom
memo1 ...
end note
[Task2] lasts 10 days
[Task2] starts 7 days after [Task1]'s end
note bottom
memo1 ...
end note
-- Separator title --
[M1] happens on 5 days after [Task1]'s end
-- end --
@endgantt
```
## Salt Wireframe
https://plantuml.com/de/salt
```plantuml
@startsalt
mainframe This is a **mainframe**
{+
Login | "MyName "
Password | "**** "
[Cancel] | [ OK ]
}
@endsalt
```
---
```plantuml
@startsalt
{+
{* File | Edit | Source | Refactor }
{/ General | Fullscreen | Behavior | Saving }
{
{
Open image in: | ^Smart Mode^
}
[X] Smooth images when zoomed
[X] Confirm image deletion
[ ] Show hidden images
}
[Close]
}
@endsalt
```
```plantuml
@startsalt
{+
{* File | Edit | Source | Refactor
Refactor | New | Open File | - | Close | Close All
}
{/ General | Fullscreen | Behavior | Saving }
{
{
Open image in: | ^Smart Mode^
}
[X] Smooth images when zoomed
[X] Confirm image deletion
[ ] Show hidden images
}
[Close]
}
@endsalt
```
---
## EBNF
mehr Infos:
https://de.wikipedia.org/wiki/Erweiterte_Backus-Naur-Form
```plantuml
@startebnf
Ziffer = "0" | "1" | "2" | "..." | "9";
Buchstabe = "A" | "B" | "C" | "D" | "…" | "Z" | "a" | "b" | "…" | "z";
Zahl = Ziffer, { Ziffer | "." };
Text = Buchstabe, { Buchstabe | Ziffer | "_" };
TrueFalse = "true" | "false" ;
Term =
"(", Aussage, ")" |
Zahl | Text | TrueFalse | "-", Term ;
Produkt = Term | Term, "*", Term ;
Quotient = Term | Term, "/", Term ;
ProduktQuotient = Produkt | Quotient ;
Summe = ProduktQuotient | ProduktQuotient, "+", ProduktQuotient ;
Differenz = ProduktQuotient | ProduktQuotient, "-", ProduktQuotient ;
SummeDifferenz = Summe | Differenz ;
Vergleichsoperator = "<" | ">" | "==" | "<=" | ">=" | "!=" ;
Aussage =
SummeDifferenz |
SummeDifferenz, Vergleichsoperator, SummeDifferenz ;
Zuweisung = Text, "=", Aussage;
Wiederholung = "while", "(", Aussage, ")", "{", Sequenz, "}";
Ausgabe = "print", "(", Aussage, ")" ;
Anweisung = Zuweisung | Wiederholung | Ausgabe ;
Sequenz = { Anweisung };
Programm = Sequenz ;
@endebnf
```
---
```plantuml
@startebnf
BinaryTree =
Identifier, "(", BinaryTree, ")(", BinaryTree, ")" |
[Identifier];
Identifier = Letter, { ( Letter | Digit ) } ;
Letter ="A" | "B" | "C" | "..." | "Z" ;
Digit = "0" | "1" | "2" | "..." | "9" ;
@endebnf
```
---
```plantuml
@startebnf
Ziffer = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
Buchstabe = "A" | "B" | "C" | "…" | "Z" | "a" | "b" | "…" | "z";
Zahl = Ziffer, { Ziffer | "." } ;
Text = Buchstabe, { Buchstabe | Ziffer | "_" };
Term =
"(", Summe, ")" |
Zahl |
Text |
"-", Term;
Produkt = Term | Term, "*", Term;
Quotient = Term | Term, "/", Term ;
ProduktQuotient = Produkt | Quotient;
Summe = ProduktQuotient | ProduktQuotient, "+", ProduktQuotient;
Differenz = ProduktQuotient | ProduktQuotient, "-", ProduktQuotient;
@endebnf
```
---
```plantuml
@startebnf
Programm = PROGRAM, Bezeichner ,
BEGIN ,
{ Zuweisung, ";" } ,
END, "." ;
Zuweisung = Bezeichner, ":=", ( Zahl |
Bezeichner |
String ) ;
Bezeichner = Buchstabe, { ( Buchstabe | Ziffer ) } ;
Zahl = [ - ], Ziffer, { Ziffer } ;
'String = ", AlleZeichen - " , " ;
Buchstabe =
"A" | "B" | "C" | "D" | "E" | "F" | "G"
| "H" | "I" | "J" | "K" | "L" | "M" | "N"
| "O" | "P" | "Q" | "R" | "S" | "T" | "U"
| "V" | "W" | "X" | "Y" | "Z" ;
Ziffer =
"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
AlleZeichen = ? alle sichtbaren Zeichen ? ;
@endebnf
```
:::spoiler EBNF-Beispiele
```plantuml
@startebnf
ClassDeclaration =
NormalClassDeclaration |
EnumDeclaration |
RecordDeclaration;
NormalClassDeclaration =
{ClassModifier},
"class",
TypeIdentifier,
[TypeParameters],
[ClassExtends],
[ClassImplements],
[ClassPermits],
ClassBody;
ClassModifier = Annotation | "public" | "protected" | "private" | "abstract" | "static" | "final" | "sealed" | "non-sealed" | "strictfp";
TypeParameters = "<", TypeParameterList, ">";
TypeParameterList = TypeParameter, {",", TypeParameter};
ClassExtends = "extends", ClassType;
ClassImplements = "implements", InterfaceTypeList;
InterfaceTypeList = InterfaceType, {",", InterfaceType};
ClassPermits = "permits", TypeName, {",", TypeName};
ClassBody = "{", {ClassBodyDeclaration}, "}";
ClassBodyDeclaration =
ClassMemberDeclaration |
InstanceInitializer|
StaticInitializer |
ConstructorDeclaration;
ClassMemberDeclaration =
(FieldDeclaration |
MethodDeclaration |
ClassDeclaration |
InterfaceDeclaration),
";";
FieldDeclaration = {FieldModifier}, UnannType, VariableDeclaratorList, ";";
FieldModifier = Annotation | "public" | "protected" | "private" | "static" | "final" | "transient" | "volatile";
VariableDeclaratorList = VariableDeclarator, {",", VariableDeclarator};
VariableDeclarator = VariableDeclaratorId, ["=", VariableInitializer];
VariableDeclaratorId = Identifier, [Dims];
VariableInitializer = Expression | ArrayInitializer;
UnannType = UnannPrimitiveType | UnannReferenceType;
UnannPrimitiveType = NumericType | boolean;
UnannReferenceType = UnannClassOrInterfaceType | UnannTypeVariable | UnannArrayType;
UnannClassOrInterfaceType = UnannClassType | UnannInterfaceType;
UnannClassType =
(TypeIdentifier, [TypeArguments]) |
(PackageName, ".", {Annotation}, TypeIdentifier, [TypeArguments]) | (UnannClassOrInterfaceType, ".", {Annotation}, TypeIdentifier, [TypeArguments]) |
(TypeIdentifier, [TypeArguments]) |
(TypeIdentifier, [TypeArguments]);
UnannInterfaceType = UnannClassType;
UnannTypeVariable = TypeIdentifier;
UnannArrayType = (UnannPrimitiveType, Dims) | (UnannClassOrInterfaceType, Dims) | (UnannTypeVariable, Dims);
MethodDeclaration = {MethodModifier}, MethodHeader, MethodBody;
MethodModifier = Annotation | "public" | "protected" | "private" | "abstract" | "static" | "final" | "synchronized" | "native" | "strictfp";
MethodHeader = (Result, MethodDeclarator, [Throws]) | (TypeParameters, {Annotation}, Result, MethodDeclarator, [Throws]);
Result = UnannType | "void";
MethodDeclarator = Identifier, ( [ ReceiverParameter, "," ], [FormalParameterList] ), [Dims];
ReceiverParameter = {Annotation}, UnannType, [Identifier, "."], "this";
FormalParameterList = FormalParameter, {",", FormalParameter};
FormalParameter = ({VariableModifier}, UnannType, VariableDeclaratorId) | VariableArityParameter;
VariableArityParameter = {VariableModifier}, UnannType, {Annotation}, "...", Identifier;
VariableModifier = Annotation | "final";
Throws = "throws", ExceptionTypeList;
ExceptionTypeList = ExceptionType, {",", ExceptionType};
ExceptionType = ClassType | TypeVariable;
MethodBody = Block | ";";
InstanceInitializer = Block;
StaticInitializer = "static", Block;
ConstructorDeclaration = {ConstructorModifier}, ConstructorDeclarator, [Throws], ConstructorBody;
ConstructorModifier = Annotation | "public" | "protected" | "private";
ConstructorDeclarator = [TypeParameters], SimpleTypeName, ( [ReceiverParameter, ","], [FormalParameterList] );
SimpleTypeName = TypeIdentifier;
ConstructorBody = { [ExplicitConstructorInvocation], [BlockStatements] };
ExplicitConstructorInvocation =
(
[TypeArguments], "this", "(", [ArgumentList], ")", ";" ) |
([TypeArguments], "super", "(", [ArgumentList], ")", ";" ) |
(ExpressionName, ".", [TypeArguments], "super", "(", [ArgumentList], ")", ";" ) |
(Primary, "." [TypeArguments], "super", "(" [ArgumentList], ")", ";";
EnumDeclaration = {ClassModifier}, "enum", TypeIdentifier, [ClassImplements], EnumBody;
EnumBody = "{", [EnumConstantList], [","], [EnumBodyDeclarations], "}";
EnumConstantList = EnumConstant, {",", EnumConstant};
EnumConstant = {EnumConstantModifier}, Identifier, ["(", [ArgumentList], ")"], [ClassBody];
EnumConstantModifier = Annotation;
EnumBodyDeclarations = ";", {ClassBodyDeclaration};
RecordDeclaration = {ClassModifier}, "record", TypeIdentifier, [TypeParameters],
RecordHeader, [ClassImplements], RecordBody;
RecordHeader = "(", [RecordComponentList], ")";
RecordComponentList = RecordComponent, {",", RecordComponent};
RecordComponent = (RecordComponentModifier}, UnannType, Identifier) | VariableArityRecordComponent;
VariableArityRecordComponent = {RecordComponentModifier}, UnannType, {Annotation}, "...", Identifier;
RecordComponentModifier = Annotation;
RecordBody = "{", {RecordBodyDeclaration}, "}";
RecordBodyDeclaration = ClassBodyDeclaration | CompactConstructorDeclaration;
CompactConstructorDeclaration = {ConstructorModifier}, SimpleTypeName, ConstructorBody;
@endebnf
```
:::
```plantuml
' ======= the actors =========
actor :Left 1: as Left1 << Human >> #f8fdff
actor :Right 1: as Right1 << Stereotype >>
actor :Left 2: as Left2 << Human >> #eaf0f9
actor :Left 3: as Left3 << Human >> #eaf0f9
actor :Left 4: as Left4 << Human >> #eaf0f9
actor :Left 5: as Left5 #eaf0f9
actor :Right 3: as Right3 #eaf0f9
actor :Right 2: as Right2 #eaf0f9
rectangle "My Rectangle" #C0C0C0 {
left to right direction
' ====== the use cases =========
(Use case A) as (UseCaseA) #83d3f6
(Use case B) as (UseCaseB) #83d3f6
(Use case C) as (UseCaseC) #83d3f6
(Use case D) as (UseCaseD) #83d3f6
(Use case E) as (UseCaseE) #83d3f6
(Use case F) as (UseCaseF) #7a97ca
(Use case G) as (UseCaseG) #7a97ca
(Use case H) as (UseCaseH) #7a97ca
(Use case I) as (UseCaseI) #ffcb0c
(Use case J) as (UseCaseJ) #ffcb0c
(Use case K) as (UseCaseK) #ffcb0c
(Use case L) as (UseCaseL) #ffcb0c
' Prevent PlantUML from re-ordering these items
together {
(Use case M) as (UseCaseM) #a4e148
(Use case N) as (UseCaseN) #a4e148
(Use case O) as (UseCaseO) #a4e148
}
' ==== the use case links. Note '---' means longer line ======
' These Actors are positioned on the left hand side.
' Note the Actor is referenced first, and the Use-Case second.
Left1 --- (UseCaseA)
Left1 -- (UseCaseB)
Left1 -- (UseCaseC)
Left1 -- (UseCaseD)
Left1 -- (UseCaseE)
Left2 -- (UseCaseF)
Left2 -- (UseCaseG)
(UseCaseF) .> (UseCaseA) : << extends >>
(UseCaseG) .> (UseCaseA) : << extends >>
Left3 -- (UseCaseG)
Left3 -- (UseCaseH)
(UseCaseH) .> (UseCaseD) : << extends >>
Left4 -- (UseCaseI)
Left4 -- (UseCaseJ)
Left4 -- (UseCaseK)
Left4 -- (UseCaseL)
Left5 -- (UseCaseM)
' These dotted lines will cause a better placement of the
' Use-Cases, compared to using the normal non-dotted lines.
(UseCaseM) <. (UseCaseN)
(UseCaseO) .> (UseCaseM)
' These Actors are positioned on the right hand side.
' Note the Use-Case is referenced first, and the Actor second.
(UseCaseN) --- Right3
(UseCaseA) --- Right1
(UseCaseD) --- Right2
}
```
<a class="socialbar__link" href="https://open.spotify.com/show/3mY1AoH7RwoEQ1LyyXtCoT?si=5ec5ef352b604db5" title="Spotify" aria-label="Spotify" target="_blank" rel="noopener nofollow">
<title id="titleSpotify">Spotify</title>
<svg aria-labelledby="titleSpotify" role="img" id="Bold" fill="black" enable-background="new 0 0 24 24" width="29" height="29" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="m12 24c6.624 0 12-5.376 12-12s-5.376-12-12-12-12 5.376-12 12 5.376 12 12 12zm4.872-6.344v.001c-.807 0-3.356-2.828-10.52-1.36-.189.049-.436.126-.576.126-.915 0-1.09-1.369-.106-1.578 3.963-.875 8.013-.798 11.467 1.268.824.526.474 1.543-.265 1.543zm1.303-3.173c-.113-.03-.08.069-.597-.203-3.025-1.79-7.533-2.512-11.545-1.423-.232.063-.358.126-.576.126-1.071 0-1.355-1.611-.188-1.94 4.716-1.325 9.775-.552 13.297 1.543.392.232.547.533.547.953-.005.522-.411.944-.938.944zm-13.627-7.485c4.523-1.324 11.368-.906 15.624 1.578 1.091.629.662 2.22-.498 2.22l-.001-.001c-.252 0-.407-.063-.625-.189-3.443-2.056-9.604-2.549-13.59-1.436-.175.048-.393.125-.625.125-.639 0-1.127-.499-1.127-1.142 0-.657.407-1.029.842-1.155z"></path></svg>
</a>
## Sudoku
```plantuml
@startuml
sudoku 334
@enduml
```
## Startboard
```plantuml
@startboard
Activity 1
+User Task 1a
++Story 1 Release 1
++Story 2 Release 1
+User Task 1b
++Story 3 Release 1
+++Story 4 Release 1
++++Story 5 Release 2
Activity 2
+User Task 2
+++Story 6 Release 1
+++Story 7 Release 1
+++Story 8 Release 2
Activity 3
+User Task 3
++++Story 9 Release 2
++++Story 10 Release 3
@endboard
```
```plantuml
@startboard
!option handwritten true
scale .75
A1 ff
+
+U1.1
++S1 R1
++S1 R2
+U1.2
A2
@endboard
```
```plantuml
@startboard
A1
U1.1
S1 R1
S1 R2
U1.2
A2
@endboard
```
## Git
```plantuml
@startgit
* a0f65180 (origin/cds/issue700) Layered: Clarified code. #700
* 23a9f435 Layered: Fix wrong hierarchy handling. #700
| * 9037d534 (HEAD -> master, origin/master) Build: Properly sign Maven artifacts. #722
|/
* 91fc1c7b Build: Mount Jenkins home. #722
* 4fe6df1e Build: Add HOME env var to maven container. #722
@endgit
```
```plantuml
@startgit
* a0f65180 (origin/cds/issue700) Layered: Clarified code. #700
* 23a9f435 Layered: Fix wrong hierarchy handling. #700
| * 9037d534 (HEAD -> master, origin/master) Build: Properly sign Maven artifacts. #722
|/
* 91fc1c7b Build: Mount Jenkins home. #722
* 4fe6df1e Build: Add HOME env var to maven container. #722
@endgit
```
```plantuml
@startmindmap
+ OS
++ Ubuntu
+++ Linux Mint
+++ Kubuntu
+++ Lubuntu
+++ KDE Neon afsadfasd
++ LMDE
++ SolydXK
++ SteamOShihhjnjnjknjkmklmk
++ Raspbiansdfg
-- Windows 95
-- Windows 98
-- Windows NT
--- Windows 8
--- Windows 10
---_ Windows 11
---[#red] Windows 12
* ff
** ffs
** aasd
@endmindmap
```
```markmap
# [Uni OL](uni-ol.de)
## IT
## OER
### "Sabine" S
## KI
## Lars
### JAde HS
## "Rico" R
### OER
## Uni Bremen
```
## Ports
```plantuml
@startuml
cloud Internet
rectangle PC {
port p80
port p123
port p21
file f1
}
Internet --> p80
Internet --> p123
Internet --> p21
p21 --> f1
p123 --> f1
@enduml
```
## osa
```plantuml
@startuml
hide stereotype
!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml
!include osaPuml/Hardware/all.puml
!include osaPuml/Misc/all.puml
!include osaPuml/Server/all.puml
!include osaPuml/Site/all.puml
' Users
osa_user_green_developer(Mary, "Mary", "Product team", "Developer")
osa_user_green_operations(Ivan, "Ivan", "IT Team", "Server Admin")
osa_user_green_business_manager(Bob, "Bob", "Accounts team", "Manager")
@enduml
```
```plantuml
@startuml
!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml
!include osaPuml/Hardware/all.puml
!include osaPuml/Misc/all.puml
!include osaPuml/Server/all.puml
!include osaPuml/Site/all.puml
listsprites
footer %filename() rendered with PlantUML version %version()\nThe Hitchhiker’s Guide to PlantUML
@enduml
```
## übergreifendes Beispiel
```plantuml
@startuml
'hide footbox
participant "Bob on\nseveral lines" as Bob
actor Alice
Bob -> Alice : hello
note right of Alice
this is a note
end note
Alice -> Bob : Is it ok\nwith a message that is\non several lines?
note right
This other note
should work
on several lines
end note
== This is a separation ==
Bob -> Last : Yes it works!
Last -> Last : working in progress
note left : this is\nanother note
Last --> Last : working in progress
Last --> Bob : done
opt dummy comment
Bob -> Last : Error\nOn\nSeveral\nLine
Last --> Bob : None
else
Last --> Bob : None
Last -> Bob : None
else other
Last -> Bob : None
note over Alice, Last
This is a long note
over Alice and Last
end note
Last -> Bob : None
Last -> Bob : None
end
@enduml
```
## Ditaa
```plantuml
@startditaa
GRO Architecture
-----------------------------------------------------------------------------------------------------
Top Modules
/----------\
| GUI |
| cRED |
+----------+
---------=----------------------------------------------------------------------------------=--------
+----------+ +-----------\/-----------------\/--------+
| UCI | |LUCI-SHARED|| SDK-LIBC-SCRIPT || DNSMASQ|
| c516 | | cBLU || cBLU || cBLU |
+----------+ +-----------/\-----------------/\--------+
-----------------------------------------------------------------------------------------------------
Lower Modules
+-----------------------------------------------------------------------------------------------+
| netfilter |
| +------------------+ |
| | Access Control | |
| | c277 | |
| +------------------+ |
| cA7A |
+-----------------------------------------------------------------------------------------------+
n
+-----------+ +--------------+
|SDK-LIBC | | Busybox |
|cBLU | | Driver cPNK |
+-----------+ +--------------+
+---------+ /--------\ +-------+
| cBLU +--+cAAA +---+Version|
| | | Data | | V3 |
| +----+ | Base | |cRED{d}|
| |cPNK| | {s}| +-------+
| | | \---+----/
+----+----+
@endditaa
```
```plantuml
@startditaa
+-----------+ +---------+
| PLC | | |
| Network +<------>+ PLC +<---=---------+
| cRED | | c707 | |
+-----------+ +----+----+ |
^ |
| |
| +----------------|-----------------+
| | | |
v v v v
+----------+ +----+--+--+ +-------+---+ +-----+-----+ Windows clients
| | | | | | | | +----+ +----+
| Database +<----->+ Shared +<---->+ Executive +<-=-->+ Operator +<---->|cYEL| . . .|cYEL|
| c707 | | Memory | | c707 | | Server | | | | |
+--+----+--+ |{d} cGRE | +------+----+ | c707 | +----+ +----+
^ ^ +----------+ ^ +-------+---+
| | |
| +--------=--------------------------+
v
+--------+--------+
| |
| Millwide System | -------- Data ---------
| cBLU | --=----- Signals ---=--
+-----------------+
@endditaa
```
```plantuml
@startditaa
+-----+
|{d} |
| |
| |
+-----+
+-----+
|{s} |
| |
| |
+-----+
+-----+
|{io} |
| |
| |
+-----+
Rounded Corners:
/--+
| |
+--/
Tags:
+-----+
|{d} |
| |
| |
+-----+
+-----+
|{s} |
| |
| |
+-----+
+-----+
|{io} |
| |
| |
+-----+
Dashed Lines:
+----+
: |
|{s} |
+----+
/----\
| |
| |
\-=--+
----+
:
|
v
Point Markers:
*----*
| |
* *
| |
*----*
/--*
|
-*--+
Text Handling:
/-----------------\
| Things to do |
| cGRE |
| o Cut the grass |
| o Buy jam |
| o Fix car |
| o Make website |
\-----------------/
Color codes:
/-------------+-------------\
|cRED RED |cBLU BLU |
+-------------+-------------+
|cGRE GRE |cPNK PNK |
+-------------+-------------+
|cBLK BLK |cYEL YEL |
\-------------+-------------/
/----\ /----\
|cFFF| |cEC2|
| | | |
\----/ \----/
/----\ /----\
|c1FF| |c1AB|
| | | |
\----/ \----/
+--------+
0 | | <- start
+--------+
1 | | <- q scans from start to end
+--------+
~ ..... ~
+--------+
| | <- end
+--------+ |
| | |
+--------+ |__ rest of the
~ ..... ~ | allocated memory
n | | |
+--------+ |
@endditaa
```
---
```plantuml
@startditaa
+------+----+----+----+----+----+----+
| xxxx | yy | zz | 00 | tt | 11 | ss |
+------+----+----+----+----+----+----+
^ ^ ^ ^ ^ ^ ^
| | | | | | |
| | | | | | +--- storage registry
| | | | | +-------- always set to 1
| | | | +------------- temp value
| | | +------------------ always zeroed
| | +----------------------- zero flag value
| +---------------------------- y register
+----------------------------------- x address
@endditaa
```
### Wirtschaftskreislauf
## XEarth (Implementierung)
```plantuml
@startuml
xearth(300,300)
gridP = true
gridDivision = 8
gridPixelDivision = 8
@enduml
```
```plantuml
@startuml
xearth(600,600)
52.53 13.42 "Berlin" // Germany
31.05 31.25 "Cairo" // Egypt
@enduml
```
```plantuml
@startuml
skinparam style strictuml
entity Admin {
AdminID : int
Username : string
Password : string
Email : string
Role : string
}
entity Article {
ArticleID : int
Title : string
Content : string
CreatedDate : datetime
ModifiedDate : datetime
Status : string
Category : Category
}
entity Category {
CategoryID : int
Name : string
Description : string
}
entity Comment {
CommentID : int
Article : Article
User : User
CommentText : string
CreatedDate : datetime
}
entity User {
UserID : int
Username : string
Email : string
Password : string
Role : string
}
entity Tag {
TagID : int
Name : string
Description : string
}
Article -- "1" Category
Article "0.." -- "0.." Comment
Comment "1" -- "1" User
Tag "0.." -- "0.." Article
@enduml
```