-
-
Notifications
You must be signed in to change notification settings - Fork 78
/
example-input.cml
103 lines (93 loc) · 2.76 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
98
99
100
101
102
/* This is an example input file for the 'Extract Shared Kernel' refactoring and shows a small part of the insurance example. */
ContextMap InsuranceContextMap {
type = SYSTEM_LANDSCAPE
state = TO_BE
contains PolicyManagementContext
contains DebtCollection
/* With a right-click on the Shared Kernel relationship ([SK]<->[SK]) you can execute the 'Extract Shared Kernel'
* refactoring. It will create a new Bounded Context for the shared code (content of new Bounded Context has to
* specified manually). Two new upstream-downstream relationships will be created to connect the existing Bounded
* Contexts with the new one. After applying this AR, you can use the 'Rename Element' refactoring to change
* the generated name of the new Bounded Context.
*/
PolicyManagementContext [SK]<->[SK] DebtCollection {
implementationTechnology = "Shared Java Library, Communication over RESTful HTTP"
}
}
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 DebtCollection implements DebtsDomain {
type = FEATURE
domainVisionStatement = "The debt collection context is responsible for the financial income of the insurance company (the debts) which depend on the corresponding contracts and policies."
responsibilities = "Debts, Dunning"
implementationTechnology = "JEE"
Aggregate Debts {
Entity Debt {
aggregateRoot
int debtNr
- Policy policy
Date creationDate
Date paymentDate
Date paymentDeadline
BigDecimal price
PaymentStatus status
- List<Dunning> dunnigs
}
Entity Dunning {
int dunningNr
- Debt debt
Date dunningDate
Date paymentDeadline
}
}
}
/* Domain & Subdomain Definitions */
Domain InsuranceDomain {
Subdomain PolicyManagementDomain {
type = CORE_DOMAIN
domainVisionStatement = "Subdomain managing contracts and policies."
}
Subdomain DebtsDomain {
type = GENERIC_SUBDOMAIN
domainVisionStatement = "Subomain including everything related to the incoming money (debts, dunning, etc.)"
}
}