Responsibility Layers

The Responsibility Layers pattern can be used on bounded contexts and aggregates to specify their responsibilities.

Syntax

The responsibilities can either be simply defined by a keyword or with an additional description. The following two CML snippets illustrate both variants on a bounded context and on an aggregate as well:

BoundedContext CustomerManagementContext implements CustomerManagementDomain {
  type = FEATURE
  domainVisionStatement = "The customer management context is responsible for ..."
  implementationTechnology = "Java, JEE Application"
  responsibilities = Customers, Addresses { "Address description ..." }
}
Aggregate Customers {
  responsibilities = Customers, Addresses { "Address description ..." }
  
  Entity Customer { 
    aggregateRoot
    
    - SocialInsuranceNumber sin
    String firstname
    String lastname
    - List<Address> addresses
  }
}