UML replacement for context diagram

user3565261 picture user3565261 · May 20, 2014 · Viewed 14.9k times · Source

According to UML context diagram context diagram doesn't exists.
So my question is which one of UML diagrams is good to show something like this and how to paint this? diagram

Answer

Aleks picture Aleks · May 20, 2014

I've just found the following definition: http://en.wikipedia.org/wiki/System_context_diagram That's probably what you need. :)

A context diagram defines a boundary between the system, or part of a system, and its environment, showing the entities that interact with it.

There is no single diagram in UML that would map to this definition, but I have some good news - there are several diagrams (out of total of 14) that can show the frontier between the system and its surrounding world from different perspectives. This is much more flexible than only a context diagram.

First of all, I would mention a special UML element - a boundary. It can be used in any diagram type to show some kind of delimitation. You might want to optionally use it to visually delimit between the system and its environment, especially in situations when this is not explicit.

The following diagrams can show the boundary between the system and its environment:

  • Use case diagram (your example) support the context explicitly on the functional level. Use cases are elements of the system under development, while the actors are extern entities (systems or human users). Before mentioned boundary is often used to visually delimit between the system and its environment.
  • Component diagram is used to model some kind of software modules (applications, DBs, external systems, libraries, etc). You can use it to show both internal and external components and the way they interact. A boundary can be used to clearly draw the separation line.
  • Activity diagram can show your system/business/usage processes. Some activities can be performed internally, others externally. Here you don't need the boundary, but the so called swimlanes to depict who does what.
  • Sequence/collaboration diagrams are another option. They show the communication sequences between several objects. If you split those objects in internal and external ones and wrap them up with the boundaries, there is another context diagram. :)

UML is flexible, there are probably further options, but I think this is enough to get the idea.