-
-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathexample-output-a.cml
80 lines (74 loc) · 1.93 KB
/
example-output-a.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
/* This is an example output file for the 'Suspend Partnership' refactoring and shows a small part of the insurance example.
*
* In this case we selected to MERGE the Bounded Contexts to suspend the partnership.
*/
ContextMap InsuranceContextMap {
type = SYSTEM_LANDSCAPE
state = TO_BE
contains RiskManagementContext
/* Since the AR merged the two Bounded Context, the relationship has been removed. */
}
/* The merged Bounded Context contains all Aggregates of both contexts now. It further implements both Subdomains. */
BoundedContext RiskManagementContext implements RiskManagementDomain , PolicyManagementDomain {
domainVisionStatement "Uses data from PolicyManagement context to calculate risks."
responsibilities = "Customer Risk Calculation", "Offers, Contracts, Policies"
implementationTechnology "Java, Spring App"
Aggregate Risks {
Entity CustomerRiskFactor {
aggregateRoot
int totalRiskFactor
- List<Risk> risks
Customer client
}
ValueObject Risk {
int likelihood
String risk
}
}
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
}
}
}
/* 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."
}
}