-
-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathexample-input.cml
97 lines (88 loc) · 2.65 KB
/
example-input.cml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* This is an example input file for the 'Suspend Partnership' refactoring and shows a small part of the insurance example. */
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 'Suspend Partnership'
* refactoring. On a dialog you can then choose between three modes how to suspend the partnership:
* a) Merge the two Bounded Contexts (executes 'AR-7 Merge Bounded Contexts').
* b) Extract a new Bounded Context for commonalities and establish upstream-downstream relationships between
* the new and the existing two Bounded Contexts.
* c) Simply replace the Partnership relationship with an upstream-downstream relationship (in this case
* you have to choose which Bounded Context becomes upstream context).
*/
RiskManagementContext [P]<->[P] PolicyManagementContext {
implementationTechnology = "RabbitMQ"
}
}
BoundedContext PolicyManagementContext implements PolicyManagementDomain {
type = FEATURE
domainVisionStatement = "This bounded context manages the contracts and policies of the customers."
responsibilities = "Offers, Contracts, Policies"
implementationTechnology = "Java, Spring App"
Aggregate Offers {
Entity Offer {
aggregateRoot
int offerId
Customer client
- List<Product> products
BigDecimal price
}
}
Aggregate Products {
Entity Product {
aggregateRoot
- ProductId identifier
String productName
}
ValueObject ProductId {
int productId key
}
}
Aggregate Contract {
Entity Contract {
aggregateRoot
- ContractId identifier
Customer client
- List<Product> products
}
ValueObject ContractId {
int contractId key
}
Entity Policy {
int policyNr
- Contract contract
BigDecimal price
}
}
}
BoundedContext RiskManagementContext implements RiskManagementDomain {
type = FEATURE
domainVisionStatement = "Uses data from PolicyManagement context to calculate risks."
responsibilities = "Customer Risk Calculation"
implementationTechnology = "Java, Spring App"
Aggregate Risks {
Entity CustomerRiskFactor {
aggregateRoot
int totalRiskFactor
- List<Risk> risks
Customer client
}
ValueObject Risk {
int likelihood
String risk
}
}
}
/* Domain & Subdomain Definitions */
Domain InsuranceDomain {
Subdomain PolicyManagementDomain {
type = CORE_DOMAIN
domainVisionStatement = "Subdomain managing contracts and policies."
}
Subdomain RiskManagementDomain {
type = GENERIC_SUBDOMAIN
domainVisionStatement = "Subdomain supporting everything which relates to risk management."
}
}