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

    AR-2: Split Bounded Context by Features

    Splits a bounded context by grouping those aggregates together into one bounded context which are used by the same features: use case(s) and/or user stories.

    Hint: An aggregate in CML can belong to multiple use cases and/or user stories (therefore the plural Features in the AR name).

    Context & Rationales

    By decomposing a system into multiple bounded contexts we aim for loose coupling between the bounded context and a high cohesion within them. One approach to achieve this and to decompose a system into components or (micro-) services is to split by use cases and/or user stories.

    See also:

    • Coupling criterion Semantic Proximity of ServiceCutter
    • How to decompose the application into services? by Chris Richardson
    • Single responsibility principle

    In Context Mapper you can assign multiple use cases and/or user stories to an aggregate, which allows you to model by which features an aggregate is used. Consult our aggregate documentation page to see how this can be modeled in CML. The user requirements page documents how you specify your user stories and/or use cases.

    Goal

    This Architectural Refactoring (AR) splits a bounded context by features (or user requirements). This means, it creates bounded contexts containing aggregates which are used by the same use cases and/or user stories. It can be applied if your model exhibits a bounded contexts with aggregates which are used by different cases/stories.

    Inverse AR’s:

    • AR-7: Merge Bounded Contexts

    Preconditions

    • The bounded context must contain at least two aggregates.
    • The aggregates must be assigned to different use cases and/or user stories.

    Input

    • One bounded context.

    Output

    • The AR creates multiple bounded contexts. Each bounded context contains one or more aggregates which are used by the same use cases and/or user stories.

    Example

    The following example illustrates how this AR can be applied. The corresponding sources can be found in our examples repository.

    Input

    The example bounded context contains two aggregates which are used by different use cases. The AR is available on the bounded context:

    Split Bounded Context by Use Cases Example Input

    Result

    The resulting model contains two bounded contexts, one for each use case:

    Split Bounded Context by Use Cases Example Output

    Example Sources

    • You can find the CML sources for this AR example here.
    Improve this page on GitHub
    ← PreviousAR-1: Split Aggregate by Entities Next →AR-3: Split Bounded Context by Owner
    © 2026 Context Mapper contributors
    • GitHub
    • Get Involved
    • Background & Publications
    • RSS