Is there a way to embed one kind of diagram into another?

0 votes
asked Nov 16, 2018 in Wanted features by Abel
It will be interesting the make a combination of say swimlanes and sequences. Is this even possible?
commented Nov 17, 2018 by albert (3,520 points)
Can you be a bit more explicit and show in a small example what you have tried sofar. There are possibilities as far as I know.
commented Nov 19, 2018 by Abel Gladstone Mangam
Hello,
I was looking at implementing a small state machine in a swim lane. This is what I tried.

@startuml

|swimLane-1|
start
[*]-->Init
Init-->Start:DeviceStartUp()
Start-->End:DeviceStop()
End-->[*]
|swimLane-2|
DeviceInterrupt-->DataAvailable: QueuePost(Data)
stop

@enduml

I also tried a few variants of the above example with no luck. May be I was trying something that is usually done in a different way ( like Using a sequence). I am new to this. Any suggestions would be helpful.
commented Nov 27, 2018 by mgrol (3,150 points)
Hi,

in general there is "allow_mixing" that allows you for some UML diagrams to mix elements.

IMHO your example is currently not possible (@plantuml please correct me if I am wrong.).  The only way is to work with references between two separate diagrams. If you just wanted have elements together think about grouping those.

What you currently try to do is a mix of activity diagram and state machine.  Both service a similar purpose but with a different angle. This is a short but good read about it https://www.visual-paradigm.com/guide/uml-unified-modeling-language/state-machine-diagram-vs-activity-diagram/  This might give you an idea how to implement your idea in one type of diagram. Think about the fact that sometimes mixing different types of UML diagrams result in cluttered graphics (just my 2 cents).


BR,
Michael

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...