Skip to content
CONTEXT MAPPER
  • Docs
  • Language Reference
  • Generators
  • News
  • Background
  • Get Involved
    Introduction
    • Welcome
    • Getting started
    • Create CML Project
    • Examples
    • Usage as Library
    • Frequently Asked Questions
    Language Reference (Core)
    • CML Reference - Introduction
    • Language Semantics
    • Context Map
    • Bounded Context
    • Domain and Subdomain
    • Domain Vision Statement
    • Partnership
    • Shared Kernel
    • Customer/Supplier
    • Conformist
    • Open Host Service
    • Anticorruption Layer
    • Published Language
    • Responsibility Layers
    • Knowledge Level
    • Aggregate
    • Tactic DDD Syntax
    • Application and Process Layer
    • User Requirements
    • Stakeholders
    • Value Registers
    • Imports
    Analysis and Design Transformations
    • Rapid Object-oriented Analysis and Design
    • Story Splitting (PoC)
    • Stakeholder and Value Modelling Transformations
    Architectural Refactorings (ARs)
    • Architectural Refactorings
    • AR-1: Split Aggregate by Entities
    • AR-2: Split Bounded Context by Features
    • AR-3: Split Bounded Context by Owner
    • AR-4: Extract Aggregates by Volatility
    • AR-5: Extract Aggregates by Cohesion
    • AR-6: Merge Aggregates
    • AR-7: Merge Bounded Contexts
    • AR-8: Extract Shared Kernel
    • AR-9: Suspend Partnership
    • AR-10: Change Shared Kernel to Partnership
    • AR-11: Change Partnership to Shared Kernel
    Value-Driven Analysis and Design
    • Value-Driven Analysis and Design (VDAD) Support
    Service Cutter
    • Context Map Suggestions with Service Cutter
    • Service Cutter Configuration File (.servicecutter.yml)
    Reverse Engineering
    • Context Map Discovery
    Generators
    • Generators Overview
    • Context Map Generator
    • PlantUML Generator
    • BPMN Sketch Miner Generator
    • MDSL (Micro-)Service Contracts Generator
    • Service Cutter Generators
    • Generic Generator (Templating)
    Tutorials
    • Model Event Storming Results in Context Mapper
    • Event Sourcing and CQRS Modeling in Context Mapper
    • Generate Microservices From Context Map Using JHipster
    • Systematic Service Decomposition with Context Mapper and Service Cutter
    • Validating the Implementation against the Model (with ArchUnit)
    IDE Plugins and Extensions
    • Visual Studio Code Extension
    • Online IDE (no longer supported)
    • Eclipse Plugin
    • Feature Support

    Context Map Generator

    Introduction

    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.

    Examples

    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 {
      type = SYSTEM_LANDSCAPE
      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

    Besides Context Maps of the type SYSTEM_LANDSCAPE, CML allows you to create maps that illustrate which development teams work on which subsystems or components (Context Map type ORGANZATIONAL). The following CML example illustrates how this can be done:

    ContextMap InsuranceTeamMap {
      type = ORGANIZATIONAL
      state = TO_BE
    
      /* Add contexts that represent subsystems/components to this organizational map: */
      contains CustomerManagementContext, CustomerSelfServiceContext, PolicyManagementContext, RiskManagementContext
    
      /* Add teams to this organizational map: */
      contains CustomersBackofficeTeam, CustomersFrontofficeTeam, ContractsTeam
    
      /* Define the subsystem/component relationships: */
    
      CustomerSelfServiceContext [D,C]<-[U,S] CustomerManagementContext
    
      PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext
    
      PolicyManagementContext [P]<->[P] RiskManagementContext
    
      /* Define the team relationships: */
    
      CustomersBackofficeTeam [U,S]->[D,C] CustomersFrontofficeTeam
    
      CustomersBackofficeTeam [U]->[D] ContractsTeam
    
    }
    
    /* Team Definitions */
    BoundedContext CustomersBackofficeTeam realizes CustomerManagementContext {
      type = TEAM
      domainVisionStatement = "This team is responsible for implementing the customers module in the back-office system."
    }
    
    BoundedContext CustomersFrontofficeTeam realizes CustomerSelfServiceContext {
      type = TEAM
      domainVisionStatement = "This team is responsible for implementing the front-office application for the insurance customers."
    }
    
    BoundedContext ContractsTeam realizes PolicyManagementContext, RiskManagementContext {
      type = TEAM
      domainVisionStatement = "This team is responsible for implementing the contract-, policy-, and risk-management modules in the back-office system."
    }
    
    /* Subsystem/component definitions */
    BoundedContext CustomerManagementContext
    BoundedContext CustomerSelfServiceContext
    BoundedContext PolicyManagementContext
    BoundedContext RiskManagementContext
    

    Depending on how you configure the the generator (clustering parameter), it will generate one of the following visualizations for you. Not clustered:

    Team Map Example (Unclustered)

    … or clustered:

    Team Map Example (Clustered)

    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.
    Improve this page on GitHub
    ← PreviousGenerators Overview Next →PlantUML Generator
    © 2026 Context Mapper contributors
    • GitHub
    • Get Involved
    • Background & Publications
    • RSS