1

Can I use directed named association on component diagram to show fact that "sys A" sends data to "sys B"?

Example:
diagram

user3565261
  • 344
  • 1
  • 6
  • 19

3 Answers3

2

No, you should use general purpose dependency instead, with optional title.

enter image description here

However, the title is not very common in this context. Better use some other diagrams (sequence for example) to show the communication details (e.g. open connection, send data, close connection, etc).

If there is a well defined interface between those systems, you can indicate that as well like this:

enter image description here

Association is used between two classes to show that their instances are potentially connected (again, not for data flow indication).

Aleks
  • 5,674
  • 1
  • 28
  • 54
  • Changing association to dependency with the same title will make this example correct? – user3565261 May 28 '14 at 08:24
  • It's important for me to show that sys A does something (in this case "sends data") to sys B. I have to name this operation. – user3565261 May 28 '14 at 08:28
  • Downvoted. Dependency is completely wrong for the posed question, and the second example does not use EA's actual ball-and-socket notation but something constructed manually. – Uffe May 30 '14 at 12:54
  • @Uffe, dependency is perfectly valid in this situation. Now I've noticed your answer and you also used dependency, only stereotyped. I don't like to use these dependency stereotypes (personal taste) and prefer other mechanisms (like interaction or sequence diagrams) to show the data flow. Regarding the ball-and-socket notation, first of all it is not "EA's actual notation", but rather UML formal notation. My example is perfertly correct representation of a dependency between a component and an interface, while your example is syntatically wrong. I will explain it further as a comment there. – Aleks May 30 '14 at 13:11
0

In UML 2.0 the concept behind association is vague, read this article: http://www.uml-diagrams.org/uml-core.html (search for "Semantic Relationship"). Association denotes a "semantic relationship" between two components, and I think it wouldn't be appropriate for data flow. I think that even dependency isn't appropriate for data flows: maybe the client depends from the supplier, maybe the opposite is true... so the arrow can be very confusing. The lollipop notation is the best, IMHO: it shows clearly that there is a component providing an interface, and another one requiring it. You can use stereotypes on the interface to show the type of communication/data transfer, and labels to make clear what data is transferred. The book "Documenting Software Architectures" adopts another style, using prevalently associations: see p.145. It's similar to your initial proposal, but with explicit roles and without arrows. I think isn't a really satisfactory solution, without stereotypes...

CptWasp
  • 459
  • 2
  • 13
-1

If sys A sends information to sys B and you're not interested in how exactly the transmission takes place, then that is a classic application of the Information Flow connector.

A Dependency would in this case say that sys A needs (is dependent on) sys B for something. An Information Flow often (but not always) goes in the opposite direction of a Dependency, since it is typically the receiver that needs the sender.

There are many different ways of showing these types of relationships, and the best one depends on the situation. If your focus is on the type of information being transmitted, then Information Flow is the best fit. If your focus is on the way the transmission takes place, something with an Interface, possibly an Assembly, is better.

EA actually allows you to specify an Information Flow over an Assembly, so you could even combine the two. It's all down to what exactly you want to express.

enter image description here

Uffe
  • 10,396
  • 1
  • 33
  • 40
  • Nice explanation of Information Flow. Would be usefull, but I do not want to show data flow, but dependency, which in my example was "sends data"(A puts data to B) but it also could be "gives tasks" etc. so I still think that Aleks's answer with named dependency is more correct. – user3565261 May 30 '14 at 13:02
  • The bottom diagram is syntactically not correct. It uses kind of mix between two related, but very different connector types: dependency and assembly (so called "ball-and-socket"). Valid relationship between required and provided interfaces of two components is dependency, not assembly. Assembly is, in turn, used between two INSTANCES of components to illustrate their run-time link via interfaces. See the page 196 of UML spec for some examples. – Aleks May 30 '14 at 13:19