In the course of every project that a business analyst encounters, unknown risks and requirements will inevitably arise. The question is when—will they arise during requirements discovery (ideal), or after the project has been deployed (resulting in managerial consternation and costly fixes)? Context diagrams are instrumental in unearthing unknown requirements during the discovery phase, both by forcing an analyst to think through the context (thus the moniker context diagram) of a project methodically and by enabling stakeholders to do so as well. As one site aptly notes, “Context diagrams can save a project from some very nasty surprises.”  Given the return that an analyst gets on her investment (helping to ensure a project’s proper direction), the creation of context diagrams is well worth her time.
What is a context diagram?
A context diagram is a graphic design that clarifies the interfaces and boundaries of the project or process at hand. It not only shows the process or project in its context, it also shows the project’s interactions with other systems and users. According to Wikipedia, a context diagram is “is the highest level view of a system . . . showing a . . . system as a whole and its inputs and outputs from/to external factors.” Further, a context diagram “shows the interactions between a system and other actors with which the system is designed to interface. System context diagrams can be helpful in understanding the context which the system will be part of.”
Here is an example of a context diagram:
A context diagram will fall into one of two categories of rigor:
The first lacks any formal structure; an object is simply placed in its context, showing its interaction with external entities from a high level. This type of context diagram is normally produced by those who have not had formal training in producing context diagrams, but who, for a presentation or marketing purposes, want to show an object or system in its context. This may also be used in informal settings even by context diagram experts.
The second type is a bit more rigid, drawing from the same rules, syntax, and symbols established for data flow diagrams. In this instance, the context diagram is a subset of a data flow diagram with the context diagrams being the simplest form of data flow diagrams.
A project can have/use multiple context diagrams – for distinct processes - which can be revised as more information is discovered or requirements change. Context diagrams are normally included in requirements documents.
Why is a context diagram beneficial?
Context diagrams are instrumental in advancing the thinking process and triggering memory recall of subject matter expects who create and study them. (To that end, a project may have multiple revised context diagrams that are versioned and archived, or they may be for brainstorming only and never make it off the white board.) A context diagram will also reveal omissions and errors in a business plan or business requirements so that any necessary corrections can be brought to light and addressed before a project is deployed. Kossiakoff wrote, “The objective of a system context diagram is to focus attention on external factors and events that should be considered in developing a complete set of system requirements and constraints.” The goal is to get feedback from a project’s stakeholders and identify any missing pieces while the project is still in the discovery stage.
In addition, a context diagram may serve to unambiguously and quickly define a project’s scope. It facilitates the discovery and/or confirmation of high-level events that trigger the process, including external entities that interact with project or process, inputs to and outputs from the project or process, and initial sub-process requirements.
What are events?
When it is mentioned that a context diagram facilitates the discovery of high-level events, that simply means that a context diagram helps its creator and viewers discover all of the occurrences or happenings to which our system must respond. According to Yourdon, an event may be flow-oriented, meaning it is related to a data flow (i.e., customer credit data enters the system so the credit report is updated); temporal, meaning it occurs at a predictable point in time (i.e., time sheets process at 3:00 p.m. CST), or a control event, meaning it is an expected event that happens at a particular point in time, but the time is not planned or known ahead of time (i.e., deliveries arrive from overseas).
What are the parts of a context diagram?
Context diagrams are made up of simple parts: boxes and lines. According to Wikipedia, “Context diagrams can be developed with the use of two types of building blocks: labeled boxes, one in the center representing the system and around it multiple boxes for each external actor, and relationship, labeled lines between the entities and system”. The two most common ways of displaying these are the Gane-Sarson and Yourdon-De Marco symbol sets. (A bit more information about those is available here.) Visio will accommodate either symbol set.
The main parts of a context diagram are:
The process, represented as a rounded rectangle, which shows a given process or activity at its highest level. A process must react in a preplanned way, and indicates where data is transformed, stored, or distributed. (The top portion of the rectangle is often reserved for the process number.) Examples of how this may look are below.
The external entity may be an actor (person or thing) that either triggers the process or receives output from the process. An external entity may also be either a data source and/or destination. External entities are represented as rectangular boxes. A few examples are below.
Data flows, represented as arrows, are the connectors between the main process and the various external entities and show data flow among them. Again, an example is below.
An example of these parts displayed together as a context diagram is below:
What does a context diagram not include?
Since a context diagram is somewhat high-level and focused on the context of the process at hand, it does not include any information that is not directly related to that process’s straightforward system. This means that data sources, external communications, alternative scenarios, or anything not part of the main function or system you are diagramming does not need to be included. While these may be included in a traditional flowchart, they are extraneous to a context diagram.
Additionally, a context diagram will never show work flows or actors who initiate data flows (but it will show the direction of the flow). Context diagrams are not the same as use case diagrams; they do not show the entire process with actors, etc. They only show the process at hand in its context.
How do you create a context diagram?
You can create a context diagram by following eight straightforward steps. Because of the fluid and transformative nature of most context diagrams, a whiteboard may be the best tool to begin their creation. Once the diagram is more concrete, it may become an artifact using Visio or some other tool which supports context diagrams:
Context Diagram pitfalls to avoid
Examine your context diagram to be sure that none of the following were inadvertently included:
Internal actors who initiate data flows or processes (as mentioned above, these have no place in a context diagram)
“Black holes,” meaning many inputs into the process are depicted but no outputs.
Or the converse, “miracles,” many outputs come out of the process, but nothing goes in
“Isolated entities,” meaning external entities are shown but not linked
Entity-to-entity data flows with no process in between
1: Using a white board or other flexible writing tool, draw a context diagram for the highest level process at hand (known as level 0). Once this is completed, that high-level process may be further decomposed into sub-processes. If the sub-processes are fairly independent of each other, they may each be made into a separate context diagrams (not on level 0) with their own external entities and data flows. If they are sufficiently complex, each of these sub-processes may be decomposed into further sub-processes. This technique is topic for a later article on data flow diagrams.
2: For each distinct high-level process (or system, functional area being studied) draw the process that acts upon the input. Place the process in the center of your white board. Label each process with a unique numeric identifier (example: 1.0, 2.0) that will enable easy reference and revision in your requirements. Use a verb-noun structure to label the process. An example would be “Take orders.” (Ignore the inner workings of the process for this and future steps.)
3: Next, you will identify and document all external entities that are sources of data to the process you just listed. List all the external entities you can think of on the margin of the document. Use nouns to indicate who these entities are. (Examples would be vendors and consumers.) Place the first source onto the diagram, and check it off your list. (You will methodically add the other sources later.)
4: Next, capture the interactions between this first listed source and the process. Determine what input(s) the source provides into the process. Draw the arrow (relationship) and label it accordingly. Determine what output the process returns to the source (if any), and draw it accordingly.
5: Now document the additional sources you’ve already listed and their data flows. Determine for each of the remaining sources if it does something different from the source(s) already placed on your diagram. If a source initiates the same input into the process as a previous source, group them. Otherwise, place it into its own box and draw the data flow. Repeat until all sources are off your list.
6: Identify and document additional external entities and don’t forget about entities which need data from the process being studied. Use nouns to indicate who these entities are (Example: “Credit Bureau”). Draw their inputs and outputs. Don’t worry if you don’t know all of these. Capture whatever you can and move on to the next step.
7: Identify and document high-level events. For each context diagram, brainstorm these by asking, “How could a source interact with this process?” Document these events on the margin of your context diagram. High-level events will be used as inputs.
8: Capture additional requirements. If you happen to discover a requirement during the creation of a context diagram, be sure to note it either in your requirements document (be sure to note its source as the context diagram) or in a separate requirements repository designed specifically for requirements unearthed from the creation of context diagrams.
If you are not already including context diagrams as a routine part of your requirements discovery and analysis, you are missing a key tool in your arsenal for ensuring a project’s success. Context diagrams are powerful tools for eliciting facts about a process are system. However, to be effective, they must be created for their intended purpose, include their own inherent characteristics, and not be confused with use cases, flowcharts, or similar tools. When used as intended, context diagrams are a potent tool for ensuring a project’s success.
More on Context Diagrams:
Author: Morgan Masters is Business Analyst and Staff Writer at ModernAnalyst.com, the premier community and resource portal for business analysts. Business analysis resources such as articles, blogs, templates, forums, books, along with a thriving business analyst community can be found at http://www.ModernAnalyst.com