1

I have two components. The first one is creating a file, which is used by the second component.

How do I visualize this in a UML 2.0 Component Diagram?

enter image description here

The image above shows how I am trying to achieve it, but I am certain that it is wrong. My component "Export Data" is creating a *.csv which is used by the component "Initial Data Import".

bruno
  • 32,421
  • 7
  • 25
  • 37
  • <> and <> are two default abstractions from UML. The top realization is wrong. – qwerty_so Aug 19 '20 at 13:49
  • Thank you for your comment. I was pretty certain, that it is wrong. But how would you actually do it, or is it something you wouldn't do in a component diagram at all? But then I wonder how I should represent this relationship between those two components. Please be reminded, that I am new with this topic. – Moritz Kampfinger Aug 19 '20 at 14:11

1 Answers1

2

You cannot through a component diagram, but you can through a deployment diagram : a generated file is supported by an artifact in UML, and a deployment diagram allows to show both the artifact and your components

There is no predefined dependency from a component to an artifact to indicate the component creates/uses the artifact, but may be your tool allows to use the dependencies with the keyword use and the stereotype create

enter image description here

(Warning In BoUML I can have a dependency from an artifact to a component typically for a manifestation, but I do not allow them in the reverse order (probably because I forgot to allow them) so the diagram above cannot be made using BoUML and I edited by hand the picture to reverse the dependencies)

bruno
  • 32,421
  • 7
  • 25
  • 37
  • Thank you for your fast response. A deployment diagram models the physical deployment of artifacts on nodes. I think that this is not fitting for my purpose. So I wonder if there is a "workaround" for achieving what I want with a component diagram. Or is it considered to be wrong, what I am trying to achieve? – Moritz Kampfinger Aug 19 '20 at 14:03
  • 1
    @MoritzKampfinger the fact a component uses/creates a file is fully out of the scope of what is shown in a component diagram whose show the modular structure of your system. – bruno Aug 19 '20 at 14:33
  • @MoritzKampfinger I edited my answer with a deployment diagram produced by my tool then modified by hand – bruno Aug 19 '20 at 14:47
  • 1
    Note that UML diagrams are not limited to showing only certain elements (except probably sequence and timing diagrams). The diagram categories are there more for convenience (and of couse practical modeling domains). – qwerty_so Aug 19 '20 at 15:57