Skip to content

Commit 1147b43

Browse files
authored
Add example of coordination in CML (#29)
1 parent 0f66c67 commit 1147b43

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ build
3939

4040
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
4141
hs_err_pid*
42+
43+
#MacOS
44+
.DS_Store
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/**
2+
* Example coordination of services between three Bounded Contexts.
3+
*
4+
*/
5+
ContextMap {
6+
contains ClaimsManagement
7+
contains InsuranceManagement
8+
contains PaymentManagement
9+
10+
ClaimsManagement <-> InsuranceManagement
11+
12+
ClaimsManagement <-> PaymentManagement
13+
}
14+
15+
BoundedContext ClaimsManagement {
16+
Application {
17+
18+
Coordination SubmitValidClaimCoordination {
19+
ClaimsManagement::ClaimsApplicationService::submitClaim;
20+
InsuranceManagement::InsuranceApplicationService::checkInsurance;
21+
ClaimsManagement::ClaimsApplicationService::acceptClaim;
22+
PaymentManagement::PaymentApplicationService::performPayment;
23+
}
24+
25+
Service ClaimsApplicationService {
26+
void submitClaim(@Claim claim);
27+
void acceptClaim(@Claim claim);
28+
}
29+
}
30+
31+
Aggregate Claims {
32+
Entity Claim
33+
}
34+
}
35+
36+
BoundedContext InsuranceManagement {
37+
Application {
38+
Service InsuranceApplicationService {
39+
void checkInsurance(@Claim claim);
40+
}
41+
}
42+
}
43+
44+
BoundedContext PaymentManagement {
45+
Application {
46+
Service PaymentApplicationService {
47+
void performPayment(@Claim claim);
48+
}
49+
}
50+
}
51+

0 commit comments

Comments
 (0)