Skip to content

Latest commit

 

History

History

AR-11-Change-Partnership-To-Shared-Kernel

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

AR-11 Change Partnership to Shared Kernel

This simple relationship refactoring changes a Partnership relationship on a Context Map to a Shared Kernel relationship.

Summary

Our relationship refactorings allow the user/modeller to change the type of a relationship on a Context Map easily without manual work. The symmetric relationships according to our semantic model, Shared Kernel and Partnership, are interchangeable without impacts to the structure of the decomposition. This refactoring changes a Partnership relationship to a Shared Kernel relationship.

Inverse AR:

Example

The following two CML snippets show an example input and output illustrating how this AR works.

Input

The input Context Map:

ContextMap InsuranceContextMap {
  type = SYSTEM_LANDSCAPE
  state = TO_BE
  contains PolicyManagementContext
  contains RiskManagementContext

  /* With a right-click on the Partnership relationship ([P]<->[P]) you can execute the 'Change to Shared Kernel' 
   * refactoring. It will replace the Partnership relationship below with a corresponding Shared Kernel relationship
   * between the two Bounded Contexts.
   */
  RiskManagementContext [P]<->[P] PolicyManagementContext

}

BoundedContext PolicyManagementContext

BoundedContext RiskManagementContext

Output

Applying the AR Change Partnership to Shared Kernel replaces the existing Partnership relationship with a Shared Kernel relationship:

ContextMap InsuranceContextMap {
  type = SYSTEM_LANDSCAPE
  state = TO_BE
  contains PolicyManagementContext
  contains RiskManagementContext

  /* The new Shared Kernel relationship after applying the 'Change Partnership to Shared Kernel' refactoring to the 
   * Partnership within the 'example-input.cml' file:
   */
  RiskManagementContext [SK] <-> [SK] PolicyManagementContext

}

BoundedContext PolicyManagementContext

BoundedContext RiskManagementContext

Example Sources

Further documentation