umlcomponent-diagram

How do I visualize in an UML 2.0 Component Diagram that a file is created and used by some components?


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".


Solution

  • 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)