Generated files use .atxt extension. ("a" as ASCII art : to NOT overide any existing .txt files!).
Here is the result:
,-.
`-'
/|\
,---. |
|Bob| / \
`-+-' Alice
| hello |
|-------------->|
| |
| Is it ok? |
|<- - - - - - - |
,-+-. Alice
|Bob| ,-.
`---' `-'
/|\
|
/ \
Unicode
The default txt format uses only plain ASCII characters. It is possible to use few extended Unicode characters to have a slightly better result. You should use the -utxt flag in the command line, or the utxt format in the Ant task.
┌─┐
║"│
└┬┘
┌┼┐
┌───┐ │
│Bob│ ┌┴┐
└─┬─┘ Alice
│ hello │
│──────────────>│
│ │
│ Is it ok? │
│<─ ─ ─ ─ ─ ─ ─ │
┌─┴─┐ Alice
│Bob│ ┌─┐
└───┘ ║"│
└┬┘
┌┼┐
│
┌┴┐
They are two drawbacks of using utxt:
The result is UTF-8 encoded, and sometimes this is an issue (mail gateway, editors...)
The used font must have the used extended characters (like Courier, Courier New...)
Complex Diagram
You can even try complex example if you wish.
@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