Context Map Generator


Our Context Map generator produces graphical representations of Context Mapper DSL (CML) Context Maps. The visualization of the generated Context Maps is inspired by the illustration style proposed by Vernon and Brandolini.


The following CML Context Map represents the DDD cargo sample application (find the complete CML file here):

ContextMap DDDSampleMap {
  contains CargoBookingContext
  contains VoyagePlanningContext
  contains LocationContext

  CargoBookingContext [SK]<->[SK] VoyagePlanningContext

  CargoBookingContext [D]<-[U,OHS,PL] LocationContext

  VoyagePlanningContext [D]<-[U,OHS,PL] LocationContext

Using our generator produces the following graphical Context Map for you:

DDD Cargo Sample Application Context Map

As a second example, the following Context Map represents our insurance company example (find the complete CML file here):

ContextMap InsuranceContextMap {
  state = TO_BE

  /* Add bounded contexts to this context map: */
  contains CustomerManagementContext, CustomerSelfServiceContext, PrintingContext
  contains PolicyManagementContext, RiskManagementContext, DebtCollection

  /* Define the context relationships: */

  CustomerSelfServiceContext [D,C]<-[U,S] CustomerManagementContext {
    exposedAggregates = Customers

  CustomerManagementContext [D,ACL]<-[U,OHS,PL] PrintingContext {
    implementationTechnology = "SOAP"
    downstreamRights = INFLUENCER
    exposedAggregates = Printing

  PrintingContext [U,OHS,PL]->[D,ACL] PolicyManagementContext {
    implementationTechnology = "SOAP"
    exposedAggregates = Printing

  RiskManagementContext [P]<->[P] PolicyManagementContext {
    implementationTechnology = "RabbitMQ"

  PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
    implementationTechnology = "RESTfulHTTP"
    exposedAggregates = Customers

  DebtCollection [D,ACL]<-[U,OHS,PL] PrintingContext {
    implementationTechnology = "SOAP"
    exposedAggregates = Printing

  PolicyManagementContext [SK]<->[SK] DebtCollection {
    implementationTechnology = "Shared Java Library, Communication over RESTful HTTP"

Our generator produces the following graphical result for the above Context Map:

Insurance Company Example Context Map

Generating Context Maps

The generators can be called from the context menus of the CML editors in VS Code or Eclipse. A documentation how to call the generators can also be found here.

Note: All generator outputs will be generated into the src-gen folder.

System Requirements for this Generator

The generator requires Graphviz to be installed on your system because it uses it behind the scenes:

  • Ensure Graphviz is installed on your machine.
  • Verify that the binaries of the Graphviz installation are part of your PATH environment variable and can be called from the command line, for instance by executing dot -V from the command line.
    • In Windows this is not the case after the installation of Graphviz. The default installation path is C:\Program Files (x86)\GraphvizX.XX, which means you have to add C:\Program Files (x86)\GraphvizX.XX\bin to your PATH variable.