Reputation: 845
I am trying to write the following flow:
The activity I describe consists in two binaries. The first one takes in input one file, and generates several (let's say two). These two files, plus another one from the environment, are fed to a second binary, which will generate an output file.
I would like to use plantuml to describe this, but the documentation doesn't really help - it doesn't go to the inputs/outputs of activities.
I can draw files with file myFile
, but I didn't manage to link them to boxes. Should I rather use a usecase diagram or an activity diagram for this? Can someone show me how to draw an arrow from a file
to a (binary)
?
I am now standing with
@startuml
file myFile
(firstBinary)
@enduml
which doesn't really do what I want.
Upvotes: 0
Views: 2106
Reputation: 3507
Should I rather use a use case diagram or an activity diagram for this?
The closest diagram associated with what you are trying to depict would be a process flow diagram with work product/artifact dependencies. In essence, your binaries are processes that depend on artifacts (files) and create new ones. However, not everything we want to describe fits neatly into a particular diagram type, nor should it have to.
Since PlantUML uses GraphViz to render diagrams, you can always use the DOT language to specify these relationships directly. For example,
@startuml
digraph a {
InFile1 [shape=note]
Binary1 [shape=ellipse]
TmpFile1 [shape=note]
TmpFile2 [shape=note]
TmpFile3 [shape=note]
Binary2 [shape=ellipse]
EnvFile [shape=note]
OutFile [shape=note]
InFile1 -> Binary1
Binary1 -> TmpFile1
Binary1 -> TmpFile2
Binary1 -> TmpFile3
TmpFile1 -> Binary2
TmpFile2 -> Binary2
TmpFile3 -> Binary2
EnvFile -> Binary2
Binary2 -> OutFile
}
@enduml
would result in the following diagram.
DOT is no more complex than PlantUML's language, though when diagrams get large, a good understanding is certainly a benefit. You can get more information on DOT language at Graphviz's Documentation site.
Upvotes: 2