v6.11.0 Release Notes

Jan 11, 2024 • Stefan Kapferer

Today we released version 6.11.0 of Context Mapper 🎆

It contains a new feature (Coordinations) contributed by Miguel Levezinho and António Rito Silva, as well as some little fixes:

  • Coordination between Application Services: In case you want to model processes/workflows that span multiple Bounded Contexts without the use of event/command syntax, you can now also do so by defining a coordination between application services.
    • See some details below und the complete documentation here.
    • Many thanks to Miguel and António for the contribution! 🙏
  • With v6.10.0 we had to remove the Service Cutter features in Context Mapper but forgot to remove the actions in the context menu of the VS Code extension. This is fixed now.
  • Bugfix: Subdomains which are implemented by a Bounded Context but imported from another CML file are now respected in the PlantUML generator (fix for #321).

Coordination between Application Services

In case you want to model processes/workflows that span multiple Bounded Contexts without the use of event/command syntax, you can also do so by defining a coordination between application services. This language feature is based on the concept of Coordination from the “Software Architecture: The Hard Parts” book by Neal Ford and others. They define Coordination as a property of workflows, which can either be orchestrated (the workflow steps are coordinated by a central component) or choreographed (each step of the workflow shares coordination logic).

To model these workflows in Context Mapper, you use the coordination construct inside the application layer of a Bounded Context. The following example illustrates this using an adaptation of the same claims processing concept:

ContextMap {
  contains ClaimsManagement
  contains InsuranceManagement
  contains PaymentManagement

  ClaimsManagement <-> InsuranceManagement
  ClaimsManagement <-> PaymentManagement
}

BoundedContext ClaimsManagement {
  Application {
    Coordination SubmitValidClaimCoordination {
      ClaimsManagement::ClaimsApplicationService::submitClaim;
      InsuranceManagement::InsuranceApplicationService::checkInsurance;
      ClaimsManagement::ClaimsApplicationService::acceptClaim;
      PaymentManagement::PaymentApplicationService::performPayment;
    }

    Service ClaimsApplicationService {
      void submitClaim(@Claim claim);
      void acceptClaim(@Claim claim);
    }
  }
}

BoundedContext InsuranceManagement {
  Application {
    Service InsuranceApplicationService {
      void checkInsurance(@Claim claim);
    }
  }
}

BoundedContext PaymentManagement {
  Application {
    Service PaymentApplicationService {
      void performPayment(@Claim claim);
    }
  }
}

For more details about the Coordination grammar, consult our documentation page.

Once you have modelled your coordinations, Context Mapper can visualize them with BPMN Sketch Miner. To do so, use the code action in the CML editor (VS Code or Eclipse). The code action will be shown on the line where your Coordination definition starts with a yellow light bulb (in the same way as with our flows). Click the light bulb and then “Open coordination in BPMN Sketch Miner”. Here the output for our example above:

BPMN Sketch Miner Example

As always, if you have any issues or other feedback, please let us know.