Activity diagramm special label layout, Output signal is needed

0 votes
asked Aug 23, 2022 in Question / help by GM1
Hi,

i have a problem an tried it to solve it the last 2 days.

I want to desing an activity diagramm/ flow chart like this

Step1

Step2

Step3 --------->Output of step 3

Step4

I can't draw/programm an arrow which start direct out of the label/ box "Step3" . The other problem ist the label "Output of step 3" i can't design it without layout problems

My current code:

@startuml Test1

title Flowchart

|System 1|
start
:Step1;
:Step2;
split
:Step3;
|System 2|
split again
:Output of Step3;
detach
|System 1|
end split
:Step 4;

stop

@enduml

Thanks for your help

1 Answer

0 votes
answered Aug 24, 2022 by MG1

thanks at the user from stackoverflow 

https://stackoverflow.com/questions/73456501/plantuml-activity-diagram-special-box-layout-output-is-needed

Activity Diagrams in UML have certain rules. Using split is probably a bad idea, as it's intended for the SDL aspect of PlantUML.

Perhaps you can try with fork if you want to show the output in a separate swimlane:

@startuml Test1

title Flowchart
|System 1|
start
:Step1;
:Step2;
:Step3;
fork
:Step 4;
|System 2|
fork again
:Output of Step3]
stop
|System 1|
end fork
stop

@enduml

enter image description here

I put a stop at the end of the output (which is now an object using the ] ending) to prevent the line rejoining the flow in System 1.

Another alternative is to use the legacy syntax for Activity diagrams, which doesn't allow for swimlanes, but can do partitions.

@startuml Test2

title Flowchart
partition "System 1" {
 (*) --> "Step 1"
 --> "Step 2"
 --> "Step 3"
 --> "Step 4"
 --> (*)
}
partition "System 2" {
    "Step 3" -> "<< object >>\nOutput of Step 3"
}

@enduml

enter image description here

In the legacy syntax for Activity Diagrams, it's not possible (as far as I know) to make an "object" (rectangle) shape.

...