Skip to content

Commit

Permalink
Add example of coordination in CML (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
mLeveIST authored Jan 11, 2024
1 parent 0f66c67 commit 1147b43
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ build

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

#MacOS
.DS_Store
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* Example coordination of services between three Bounded Contexts.
*
*/
ContextMap {
contains ClaimsManagement
contains InsuranceManagement
contains PaymentManagement

ClaimsManagement <-> InsuranceManagement

ClaimsManagement <-> PaymentManagement
}

BoundedContext ClaimsManagement {
Application {

Coordination SubmitValidClaimCoordination {
ClaimsManagement::ClaimsApplicationService::submitClaim;
InsuranceManagement::InsuranceApplicationService::checkInsurance;
ClaimsManagement::ClaimsApplicationService::acceptClaim;
PaymentManagement::PaymentApplicationService::performPayment;
}

Service ClaimsApplicationService {
void submitClaim(@Claim claim);
void acceptClaim(@Claim claim);
}
}

Aggregate Claims {
Entity Claim
}
}

BoundedContext InsuranceManagement {
Application {
Service InsuranceApplicationService {
void checkInsurance(@Claim claim);
}
}
}

BoundedContext PaymentManagement {
Application {
Service PaymentApplicationService {
void performPayment(@Claim claim);
}
}
}

0 comments on commit 1147b43

Please sign in to comment.