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-9: Suspend Partnership

    Provides different approaches to suspend a Partnership relationship.

    Context & Rationales

    The Partnership pattern describes a close relationship where two development teams are interdependent. For some reason they can only succeed or fail together. New developments and releases must be coordinated between the teams. However, this requires a lot of coordination and communication between the teams and in some situations it might be beneficial to suspend such a partnership in order to increase team autonomy.

    Goal

    This AR provides three strategies to suspend a Partnership relationship. Each strategy fulfills the goal to remove the partnership relationship and replace it with another strategy how the two Bounded Contexts depend on each other. The strategies are:

    • a) Merge the two Bounded Contexts:

      Since the two teams have to work very closely together, a solution might be to merge the teams and see them as one single Bounded Context. This strategy basically calls the AR-7 Merge Bounded Contexts refactoring to merge the two contexts.

      Known limitation: Unfortunately, this strategy does not work in VS Code in case the removed Bounded Context is referenced in a Context Map. This is due to a bug in the Xtext framework.
    • b) Extract a new Bounded Context for commonalities and establish upstream-downstream relationships:

      The interdependence may come from common parts within the domain model or APIs which are maintained by both teams. In such a case it might be a solution to extract common parts to a new Bounded Context. A new team may maintain these parts an offer corresponding APIs which can be used by the existing Bounded Contexts. This strategy extracts a new Bounded Context and creates two upstream-downstream relationships between the new and the two existing Bounded Contexts.

    • c) Simply replace the Partnership with an upstream-downstream relationship:

      Another solution might be that one of the two teams takes the lead regarding common parts or APIs. Decisions regarding changes on these common parts are only done by this leading team. All parts which both contexts depend on are moved to the leading context. Thus, the dependency becomes unidirectional. This strategy replaces the Partnership relationship with an upstream-downstream relationship. If you select this strategy you have to define which Bounded Context becomes the upstream context.

    Preconditions

    • Your model needs at least two bounded contexts which are in a Partnership relationship.

    Input

    • The Partnership relationship.

    Output

    The output of this AR depends on the selected mode:

    • a) One (merged) bounded context containing all aggregates of the two input bounded contexts.
    • b) A new Bounded Context for commonalities and two new upstream-downstream relationships between the new and the two existing Bounded Context.
    • c) The same model but the Partnership relationship will be replaced with an upstream-downstream relationship.

    Example

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

    Input

    The following model contains a Partnership relationship. Therefore the AR is available with a right-click on the relationship (arrow):

    Suspend Partnership Example Input

    Results

    The result of applying this AR depends on the selected strategy to suspend the relationship. The following dialog asks the user which strategy shall be applied:

    Suspend Partnership Mode Selection Dialog

    Result for “Merge the two Bounded Contexts”

    If you choose to merge the two Bounded Contexts, a second page in the wizard allows you to specify whether the attributes which cannot be merged shall be taken from the second Bounded Context or not (see AR-7: Merge Bounded Contexts for details):

    Suspend Partnership Merge Mode Page

    The resulting model contains the merged Bounded Context containing all Aggregates of the two original Bounded Contexts:

    Suspend Partnership Example Output for 'MERGE' Strategy

    Result for “Extract a new Bounded Context for commonalities and establish upstream-downstream relationships”

    If the user chooses to extract a new Bounded Context, the result will contain the new context for commonalities and two additional upstream-downstream relationships between the new and the existing Bounded Contexts:

    Suspend Partnership Example Output for 'EXTRACT' Strategy

    Result for “Simply replace the Partnership with an upstream-downstream relationship”

    The last strategy removes the existing Partnership relationship from the model and replaces it with a new upstream-downstream relationship. In this case, the user has to select which Bounded Context becomes the upstream:

    Suspend Partnership 'REPLACE' Mode Upstream Selection

    With the selection above, the AR produces the following result:

    Suspend Partnership Example Output for 'REPLACE' Strategy

    Example Sources

    • You can find the CML sources for this AR example here.
    Improve this page on GitHub
    ← PreviousAR-8: Extract Shared Kernel Next →AR-10: Change Shared Kernel to Partnership
    © 2026 Context Mapper contributors
    • GitHub
    • Get Involved
    • Background & Publications
    • RSS