-
-
Notifications
You must be signed in to change notification settings - Fork 78
/
example-input.cml
113 lines (96 loc) · 3.04 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
103
104
105
106
107
108
109
110
111
112
/* This is an example input file for the 'Merge Bounded Contexts' refactoring and shows a small part of the insurance example. */
ContextMap {
contains CustomerManagementContext
contains CustomerSelfServiceContext
contains PrintingContext
CustomerSelfServiceContext [D,C]<-[U,S] CustomerManagementContext : Customer_Frontend_Backend_Relationship { // Relationship name is optional
exposedAggregates = Customers
}
CustomerManagementContext [D,ACL]<-[U,OHS,PL] PrintingContext {
implementationTechnology = "SOAP"
downstreamRights = INFLUENCER
exposedAggregates = Printing
}
}
/* With a right-click on the 'CustomerManagementContext' (or one of the other contexts, as you wish)
* bounded context you can execute the 'Merge Bounded Contexts' refactoring. A dialog will show up and ask you with
* which other bounded context you want to merge. Choose a second bounded context and the refactoring will merge them.
*/
BoundedContext CustomerManagementContext implements CustomerManagementDomain {
type = FEATURE
domainVisionStatement = "The customer management context is responsible for managing all the data of the insurance companies customers."
implementationTechnology = "Java, JEE Application"
responsibilities = "Customers, Addresses"
Aggregate Customers {
Entity Customer {
aggregateRoot
- SocialInsuranceNumber sin
String firstname
String lastname
- List<Address> addresses
}
Entity Address {
String street
int postalCode
String city
}
ValueObject SocialInsuranceNumber {
String sin key
}
}
}
BoundedContext CustomerSelfServiceContext implements CustomerManagementDomain {
type = APPLICATION
domainVisionStatement = "This context represents a web application which allows the customer to login and change basic data records like the address."
responsibilities = "AddressChange"
implementationTechnology = "PHP Web Application"
Aggregate CustomerFrontend {
Entity CustomerAddressChange {
aggregateRoot
- UserAccount issuer
- Address changedAddress
}
}
Aggregate Acounts {
Entity UserAccount {
aggregateRoot
String username
- Customer accountCustomer
}
}
}
BoundedContext PrintingContext implements PrintingDomain {
type = SYSTEM
responsibilities = "Document Printing"
domainVisionStatement = "An external system which provides printing services to the other Bounded Contexts."
Aggregate Printing {
Entity PrintingJob {
aggregateRoot
int printingId
- Document document
- Template template
}
Entity Document {
DomainObject source
String template
}
}
Aggregate Templating {
Entity Template {
aggregateRoot
int templateId
String templateName
}
}
}
/* Domain & Subdomain Definitions */
Domain InsuranceDomain {
Subdomain CustomerManagementDomain {
type = CORE_DOMAIN
domainVisionStatement = "Subdomain managing everything customer-related."
}
Subdomain PrintingDomain {
type = SUPPORTING_DOMAIN
domainVisionStatement = "Service (external system) to solve printing for all kinds of documents (debts, policies, etc.)"
}
}