When we've started PlantUML in 2009, the very first UML diagram type that we have addressed at that time
was
Sequence Diagrams.
At the beginning, capabilities were very limited. The layout engine used for Sequence Diagrams was pretty simple, but this was enough to do
basic diagrams.
Then more and more people begin to use PlantUML and ask for new features. We add those features (group, activation, note, encompass...)
by adding some code in the existing layout engine, but we did not change its roots.
So you know the story : the code is getting more and more complex. It begins to be difficult to maintain.
The initial simplicity is gone, because some initial architecture decisions
were not good regarding the new capabilities.
Moreover, some features (especially for parallel message, see
pending wanted features)
are almost impossible to implements with the current "Puma" architecture.
This is the bad news.
The good news is that we are willing to overcome those issues.
So we've read many things about design patterns to define a better software archicture.
And we need some courage too!
So a new layout engine has been added to PlantUML. The codename of this architecture is "Teoz", and it has been integrated
as alpha version in PlantUML version 8019.
By default, the old "Puma" layout engine is still used, but you can turn on Teoz engine using some
!pragma
directive :
🎉 Copied!
|
@startuml
!pragma teoz true
Alice -> Bob : hello
& Bob -> Charlie : hi
@enduml
|
Many things are not working with this first version. We are not even sure that the proposed syntax (use of
&
) is a good idea.
So we need feedback from the community:
please use the Q&A forum, putting a Teoz tag in your questions.
We would like to have a complete overview of what users wants to do, to be sure to design some Teoz engine able to handle all new features.
Thanks for your feedback!
With
teoz
it is possible to add anchors to the diagram and use the anchors to specify duration time.
🎉 Copied!
|
@startuml
!pragma teoz true
{start} Alice -> Bob : start doing things during duration
Bob -> Max : something
Max -> Bob : something else
{end} Bob -> Alice : finish
{start} <-> {end} : some time
@enduml
|
You can use the
-P
command-line option to specify the pragma:
java -jar plantuml.jar -Pteoz=true
[Ref. GH-582]
With
teoz
it is possible to have nested boxes for sequence:
🎉 Copied!
|
@startuml
!pragma teoz true
box "component"
box "sub1"
participant a
endbox
box "sub2"
participant b
endbox
end box
@enduml
|
🎉 Copied!
|
@startuml
!pragma teoz true
box "component"
box "sub1\n\n"
participant a
box "subsub1"
participant suba
end box
endbox
box "sub2"
participant b
endbox
end box
@enduml
|
[Ref. QA-4957, GH-172]