I want to build something like this using PlantUML:
But I'm only able to build this:
This is my code:
@startuml
start
:Init;
fork
:Treatment 1;
fork again
:Treatment 2;
end fork
@enduml
I want to build something like this using PlantUML:
But I'm only able to build this:
This is my code:
@startuml
start
:Init;
fork
:Treatment 1;
fork again
:Treatment 2;
end fork
@enduml
As far as I understand Activity Diagrams
@startuml
|Control|
:Init;
fork
|#AntiqueWhite|Swimlane1|
'start
:foo1;
'stop
fork again
|Swimlane2|
'start
:foo2;
:foo3;
'stop
|Control|
end fork
stop
@enduml
The PlantUML layout also isn't ideal, since the fork line stays only in the swimlane of the Control process.
This is possible by combining an extra column for forking and hiding the start arrows:
@startuml
| |
|a| Swim1
|b| Swim2
|c| Swim3
| |
fork
|a|
-[hidden]->
start
if (A?) then (no)
stop
else (yes)
if (B?) then (no)
stop
else (yes)
:C;
endif
endif
stop
fork again
|b|
-[hidden]->
start
:Process 2;
stop
fork again
|c|
-[hidden]->
start
:Process 3;
stop
| |
end fork
@enduml
Would like to add
skinparam activityBarColor white
skinparam swimlaneBorderColor white
to Mazzy's answer, if you don't mind missing borders of the lanes and don't need additional forks in your diagram.
or invert the lane background color
Not a complete solution but:
@startuml
start
:Init;
fork
start
:Treatment 1;
end
fork again
start
:Treatment 2;
end
end fork
@enduml
see also: