Can't combine one sequence and one activity diagram in a single file

+1 vote
asked Mar 16, 2022 in Question / help by Gérald
Hello

Let's consider two diagrams:

1) sequence

        @startuml
        participant component1
        participant component2
        component1->component2 : message
        @enduml

2) activity

        @startuml
        start
        :test;
        stop
        @enduml

Each one can be generated independently (1 or 2) and I can combine them multiple times in the same file (1 + 1 or 2 + 2) but I cannot mix them (1 + 2 or 2 + 1) in plantuml web server.

Do I do anything wrong in the writing or is there a bug ?

1 Answer

0 votes
answered Mar 16, 2022 by The-Lu (64,760 points)

Hello G.,

The `PlantUML online web server ` accepts only one diagram...

What are your usecases ?

And if you would like to combine multiple times, you must use sub-diagram, as:

@startuml
label l1 [
{{
participant component1
participant component2
component1->component2 : message
}}
]

label l2 [
{{
start
:test;
stop
}}
]
@enduml

If that can help,
Regards,
Th.

commented Mar 16, 2022 by Gérald
Hi Th.

Thanks for your quick answer !

I confirm that this helped me because I did not know that the web server version does not support multiple diagrams... and I did not know the sub-diagram syntax.

So those two answers will definitively help me :)
...