Embed sub diagrams (of all type, especially Mindmap or WBS) in (all type of) diagram

0 votes
asked Jul 27, 2020 in Wanted features by The-Lu (65,440 points)
edited Jul 27, 2020 by The-Lu

Hello PlantUML team,

From:

Then:

  • How to insert Mindmap or WBS diagrams in other diagrams?
  • Could you improve the sub-diagram or embedded diagram features for all type of diagram?

We don't know what would be the best syntax, like with salt or not:

{{
salt
{
...
}
}}

Here is a little sum-up of existing behavior:

sub-diagram →
↓ host-diagram
ActivityClassDeploymentGanttMindMapSequenceStateWBSWireframe (salt)
ActivityOKOKOKKO with @startgantt:


OK without @startgantt:
KO
[Click to see on PlantUML server...]
OKOKKO

[Click..]
Class (note on class)
or Deployment
or MindMap
OKOKOKidemKOOKOKKOOK
Sequence
or State
or WBS
OK
(on oneline)
OK
(on oneline)
OK
(on oneline)
idemKOOKOKKOOK
Gantt or Wireframe N/AN/AN/AN/AN/AN/AN/AN/AN/A

Thanks for yours works,
Regards,
Th.

related to an answer for: embed sub diagrams in diagram like a note

1 Answer

0 votes
answered Sep 22, 2020 by plantuml (295,000 points)

With last beta http://beta.plantuml.net/plantuml.jar you can now have :

or:

We did not test all combinaisons... :-)

commented Sep 22, 2020 by The-Lu (65,440 points)

Hello plantuml,

Marvellous...

FYI, on SVG output, the second example gives a java.lang.NullPointerException:

SVG:

(See SVG link.. on PlantUML server)

 PNG:

Thanks for your support,
Regards,
Th.

commented Sep 23, 2020 by The-Lu (65,440 points)

Hello PlantUML team,

Another open question:

If you allow (no return line before wbs or mindmap and return line mandatory before salt):

@startuml
legend

{{wbs
* root
** level1
** level1
}}

{{mindmap
* root
** level1
** level1
}}

'and

{{
salt
{
[Example button]
[X] Checked box
}
}}

end legend
@enduml

→  Link to PlantUML online server

Could you allow (return line or not) :

{{
wbs
...
}}

or

{{salt
...
}}

?

In order to have a consistent behaviour between salt, wbs or mindmap.

That is an open question, to debate...

Regards,
Th.

commented Oct 15, 2023 by danespin (200 points)

Hello, according with the table by The-Lu and the comment from plantuml saying they did not test all combinations, I interpret should be possible to embed a class diagram into a deployment diagram, right?

What I want to do, is to represent an Oracle object-relational database containing types, stored procedures, and object tables. I started trying to plot the ADT (Abstract Data Type, the term used by Oracle for object data types i.e. classes) as a stereotype like this:

@startuml

database "My Object Database" {

    package Types {

{{

    class ParentClass <<ADT>>

}}

    }

}

@enduml

But it's not working, check the link

https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000

What I'm doing wrong?

commented Oct 15, 2023 by danespin (200 points)

I figured out how to fix my syntax, leaving it here for the posterity in case it helps someone else:

@startuml

database "My Object DB" as n {

    package Types [

        {{

            hide circles

            hide empty fields

            hide empty methods

            class Person <<ADT>>

            class PersonTable <<object table>>

            PersonTable .l. Person : created from >

        }}

    ]

}

@enduml

Here is how it renders (copied from online server enabling dark mode switch there)

PlantUML diagram

Link to online server:

https://www.plantuml.com/plantuml/dumla/TP0nJeP048NxFSKB1-00XX0qj4OBEcCnx0w2xh9aPom8uUuY4ZNyuLNpydrJp5IYbFGpUED8gILXP8ypdjftjehw8GC9HYm6MoQo7_J6QEQ91Iy6HvOT_wOV7CCEoNgMMy1XqXdTmDvTqi3QnnEsdaJmp4dYYAAuhvkol1GQQZrlLlovGx_hIVylvZu_EkvW4vEoGvTYmD_EkkxZgrbDnQFRNlO5

commented Oct 15, 2023 by The-Lu (65,440 points)

Hello D., and all,

In this case even no need for sub-diagrams, see:

@startuml
database "My Object DB" as n {
    package Types {
            hide circles
            hide empty fields
            hide empty methods
            class Person <<ADT>>
            class PersonTable <<object table>>
            PersonTable .l. Person : created from >
    }
}
@enduml

Enjoy,
Regards,
Th.

commented Oct 16, 2023 by danespin (200 points)
Ohh! That's much cleaner and elegant! Many thanks @The-Lu!
...