I have some code like this:
class A
{
void update()
{
update1();
update2();
}
}
and I'd like to draw it in plantuml.
I tried something like this:
@@startuml
autoactivate on
A -> A : update
A -> A : update1
return
A -> A : update2
return
@@enduml
then I got uml diagram like this:
I don't like the dotted lines (return message). but if I remove the return message, the message levels (hierarchy) will be messed up. they are not on the same level any more.
@@startuml
autoactivate on
A -> A : update
A -> A : update1
A -> A : update2
@@enduml
I want update1
and update2
to be on the same level.
Using autoactivate on the return are mandatory
Doing :
@@startuml
A -> A : update
activate A
A -> A : update1
activate A
deactivate A
A -> A : update2
activate A
deactivate A
return
@@enduml
the result is :
or replacing the last return by deactivate :
@@startuml
A -> A : update
activate A
A -> A : update1
activate A
deactivate A
A -> A : update2
activate A
deactivate A
deactivate A
@@enduml
Of course an other way is to use a UML modeler rather than a drawer