This simple relationship refactoring changes a Partnership relationship on a Context Map to a Shared Kernel relationship.
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:
The following two CML snippets show an example input and output illustrating how this AR works.
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
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 input source: example-input.cml
- Example output source: example-output.cml