2

for a while I'm using PlantUML to create sequence diagram. Everything works fine ... but looked a bit boring and "geek"-like.

So I google for nice sprites and found PlantUML Icon-Font Sprites on GitHub. I included the sprites successfully in my sequence diagram but as soon as I used them, I got a syntax error. After some investigation, I discovered that PlantUML tries to create state diagrams and certain elements of the sequence diagram (like the separator) are not valid.

So my two questions:

  1. How does PlantUML decide which diagram type to draw?
  2. How can I change this to sequence diagrams?

Example

@startuml
!pragma teoz true
skinparam defaultTextAlignment center

!include puml-icons/common.puml
!include  puml-icons/font-awesome-5/user.puml

hide footbox
/'FA5_USER(Alice, Alice)
FA5_USER(Bob, Bob)'/

Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@enduml

Sequence diagram

@startuml
!pragma teoz true
skinparam defaultTextAlignment center

!include puml-icons/common.puml
!include  puml-icons/font-awesome-5/user.puml

hide footbox
FA5_USER(Alice, Alice)
FA5_USER(Bob, Bob)

Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@enduml

enter image description here

allwi
  • 101
  • 6
  • In the last comment of the issue: https://github.com/tupadr3/plantuml-icon-font-sprites/issues/2 I read "This is now included in V1.2017.19", did you try the direct from plantuml? I tried the example they gave themselves but this doesn't work ( :-( ) – albert Sep 26 '19 at 09:31
  • Hi @albert, Well, the example works for me ... but it's not what the question was because also the new syntax create the same diagram style and not a sequence diagram as I intend to. – allwi Sep 27 '19 at 01:19
  • It was just a wild guess from my side and I see that the discussion is already going on at https://forum.plantuml.net/10244/selecting-the-diagram-style. FWIW with the mentioned github issue a new example has been posted. – albert Sep 27 '19 at 07:57

1 Answers1

0

See How can a PlantUML document specify its diagram type?

And Examples on https://plantuml.com/commons that gives an idea how PlantUML decides what diagram to generate.

You can use hidden elements of specific type, like component for deployment diagram, to point PlantUML into right direct, when there is mix.

Paul Verest
  • 60,022
  • 51
  • 208
  • 332