diff --git a/404.html b/404.html index 2c68768..feaa3b2 100644 --- a/404.html +++ b/404.html @@ -1,8 +1,11 @@ --- layout: default +title: Page not found +permalink: /404.html --- -
The page you are looking for cannot be found.
-404
+The page you are looking for does not exist (anymore). Try the search above, or start from the documentation.
+
## DDD Sample
Link: [https://github.com/ContextMapper/context-mapper-examples/tree/master/src/main/cml/ddd-sample](https://github.com/ContextMapper/context-mapper-examples/tree/master/src/main/cml/ddd-sample)
-
## Architectural Refactoring (AR) Examples
The following folder contains a number of small CML snippets from the insurance example; they illustrate how you can apply refactorings to your models:
diff --git a/_docs/generators/bpmn-sketch-miner.md b/_docs/generators/bpmn-sketch-miner.md
index bd235d3..0f49fb0 100644
--- a/_docs/generators/bpmn-sketch-miner.md
+++ b/_docs/generators/bpmn-sketch-miner.md
@@ -9,48 +9,49 @@ We use the [BPMN Sketch Miner](https://www.bpmn-sketch-miner.ai/) tool to visual
## Example Flow
The following CML code illustrates how you can model flows. A complete documentation on the syntax can be found in the [language reference](/docs/application-and-process-layer/#processes-and-eventcommand-flows).
-/**
- * A flow inspired by the Lakeside Mutual project (https://github.com/Microservice-API-Patterns/LakesideMutual).
- * Find the original process visualization here:
- * https://github.com/Microservice-API-Patterns/LakesideMutual/blob/master/policy-management-backend/src/main/java/com/lakesidemutual/policymanagement/domain/insurancequoterequest/RequestStatus.java
- **/
-BoundedContext InsuranceQuotes {
- Application {
- Flow QuoteRequestFlow {
- operation submitRequest delegates to QuoteRequest[-> SUBMITTED] emits event RequestSubmitted
- event RequestSubmitted + RequestSubmitted triggers operation checkRequest
- operation checkRequest delegates to QuoteRequest[SUBMITTED -> RECEIVED X REJECTED] emits event QuoteReceived X RequestRejected
- event QuoteReceived triggers operation receiveAndCheckQuote
- operation receiveAndCheckQuote delegates to QuoteRequest[RECEIVED -> REJECTED X ACCEPTED X EXPIRED] emits event QuoteRejected X QuoteAccepted X QuoteExpired
- event QuoteAccepted triggers operation accept
- operation accept delegates to QuoteRequest[ACCEPTED -> POLICY_CREATED X EXPIRED] emits event PolicyCreated X QuoteExpired
+```cml
+/**
+ * A flow inspired by the Lakeside Mutual project (https://github.com/Microservice-API-Patterns/LakesideMutual).
+ * Find the original process visualization here:
+ * https://github.com/Microservice-API-Patterns/LakesideMutual/blob/master/policy-management-backend/src/main/java/com/lakesidemutual/policymanagement/domain/insurancequoterequest/RequestStatus.java
+ **/
+BoundedContext InsuranceQuotes {
+ Application {
+ Flow QuoteRequestFlow {
+ operation submitRequest delegates to QuoteRequest[-> SUBMITTED] emits event RequestSubmitted
+ event RequestSubmitted + RequestSubmitted triggers operation checkRequest
+ operation checkRequest delegates to QuoteRequest[SUBMITTED -> RECEIVED X REJECTED] emits event QuoteReceived X RequestRejected
+ event QuoteReceived triggers operation receiveAndCheckQuote
+ operation receiveAndCheckQuote delegates to QuoteRequest[RECEIVED -> REJECTED X ACCEPTED X EXPIRED] emits event QuoteRejected X QuoteAccepted X QuoteExpired
+ event QuoteAccepted triggers operation accept
+ operation accept delegates to QuoteRequest[ACCEPTED -> POLICY_CREATED X EXPIRED] emits event PolicyCreated X QuoteExpired
}
}
- Aggregate QuoteRequest {
- Entity Request {
- aggregateRoot
+ Aggregate QuoteRequest {
+ Entity Request {
+ aggregateRoot
}
- DomainEvent RequestSubmitted
- DomainEvent QuoteReceived
- DomainEvent RequestRejected
- DomainEvent QuoteRejected
- DomainEvent QuoteAccepted
- DomainEvent QuoteExpired
- DomainEvent PolicyCreated
- Service QuoteRequestService {
- void submitRequest(@Request request);
- void checkRequest(@Request request);
- void receiveAndCheckQuote(@Request request);
- void reject(@Request request);
- void accept(@Request request);
+ DomainEvent RequestSubmitted
+ DomainEvent QuoteReceived
+ DomainEvent RequestRejected
+ DomainEvent QuoteRejected
+ DomainEvent QuoteAccepted
+ DomainEvent QuoteExpired
+ DomainEvent PolicyCreated
+ Service QuoteRequestService {
+ void submitRequest(@Request request);
+ void checkRequest(@Request request);
+ void receiveAndCheckQuote(@Request request);
+ void reject(@Request request);
+ void accept(@Request request);
}
- enum RequestState {
- aggregateLifecycle
+ enum RequestState {
+ aggregateLifecycle
SUBMITTED, RECEIVED, REJECTED, ACCEPTED, EXPIRED, POLICY_CREATED
}
}
}
-ContextMap DDDSampleMap {
- contains CargoBookingContext
- contains VoyagePlanningContext
- contains LocationContext
+```cml
+ContextMap DDDSampleMap {
+ contains CargoBookingContext
+ contains VoyagePlanningContext
+ contains LocationContext
- CargoBookingContext [SK]<->[SK] VoyagePlanningContext
+ CargoBookingContext [SK]<->[SK] VoyagePlanningContext
- CargoBookingContext [D]<-[U,OHS,PL] LocationContext
+ CargoBookingContext [D]<-[U,OHS,PL] LocationContext
- VoyagePlanningContext [D]<-[U,OHS,PL] LocationContext
+ VoyagePlanningContext [D]<-[U,OHS,PL] LocationContext
}
-ContextMap InsuranceContextMap {
- type = SYSTEM_LANDSCAPE
- state = TO_BE
+```cml
+ContextMap InsuranceContextMap {
+ type = SYSTEM_LANDSCAPE
+ state = TO_BE
- /* Add bounded contexts to this context map: */
- contains CustomerManagementContext, CustomerSelfServiceContext, PrintingContext
- contains PolicyManagementContext, RiskManagementContext, DebtCollection
+ /* Add bounded contexts to this context map: */
+ contains CustomerManagementContext, CustomerSelfServiceContext, PrintingContext
+ contains PolicyManagementContext, RiskManagementContext, DebtCollection
- /* Define the context relationships: */
+ /* Define the context relationships: */
- CustomerSelfServiceContext [D,C]<-[U,S] CustomerManagementContext {
- exposedAggregates = Customers
+ CustomerSelfServiceContext [D,C]<-[U,S] CustomerManagementContext {
+ exposedAggregates = Customers
}
- CustomerManagementContext [D,ACL]<-[U,OHS,PL] PrintingContext {
- implementationTechnology = "SOAP"
- downstreamRights = INFLUENCER
- exposedAggregates = Printing
+ CustomerManagementContext [D,ACL]<-[U,OHS,PL] PrintingContext {
+ implementationTechnology = "SOAP"
+ downstreamRights = INFLUENCER
+ exposedAggregates = Printing
}
- PrintingContext [U,OHS,PL]->[D,ACL] PolicyManagementContext {
- implementationTechnology = "SOAP"
- exposedAggregates = Printing
+ PrintingContext [U,OHS,PL]->[D,ACL] PolicyManagementContext {
+ implementationTechnology = "SOAP"
+ exposedAggregates = Printing
}
- RiskManagementContext [P]<->[P] PolicyManagementContext {
- implementationTechnology = "RabbitMQ"
+ RiskManagementContext [P]<->[P] PolicyManagementContext {
+ implementationTechnology = "RabbitMQ"
}
- PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
- implementationTechnology = "RESTfulHTTP"
- exposedAggregates = Customers
+ PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
+ implementationTechnology = "RESTfulHTTP"
+ exposedAggregates = Customers
}
- DebtCollection [D,ACL]<-[U,OHS,PL] PrintingContext {
- implementationTechnology = "SOAP"
- exposedAggregates = Printing
+ DebtCollection [D,ACL]<-[U,OHS,PL] PrintingContext {
+ implementationTechnology = "SOAP"
+ exposedAggregates = Printing
}
- PolicyManagementContext [SK]<->[SK] DebtCollection {
- implementationTechnology = "Shared Java Library, Communication over RESTful HTTP"
+ PolicyManagementContext [SK]<->[SK] DebtCollection {
+ implementationTechnology = "Shared Java Library, Communication over RESTful HTTP"
}
}
-ContextMap InsuranceTeamMap {
- type = ORGANIZATIONAL
- state = TO_BE
-
- /* Add contexts that represent subsystems/components to this organizational map: */
- contains CustomerManagementContext, CustomerSelfServiceContext, PolicyManagementContext, RiskManagementContext
-
- /* Add teams to this organizational map: */
- contains CustomersBackofficeTeam, CustomersFrontofficeTeam, ContractsTeam
-
- /* Define the subsystem/component relationships: */
-
- CustomerSelfServiceContext [D,C]<-[U,S] CustomerManagementContext
-
- PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext
-
- PolicyManagementContext [P]<->[P] RiskManagementContext
-
- /* Define the team relationships: */
-
- CustomersBackofficeTeam [U,S]->[D,C] CustomersFrontofficeTeam
-
- CustomersBackofficeTeam [U]->[D] ContractsTeam
-
+```cml
+ContextMap InsuranceTeamMap {
+ type = ORGANIZATIONAL
+ state = TO_BE
+
+ /* Add contexts that represent subsystems/components to this organizational map: */
+ contains CustomerManagementContext, CustomerSelfServiceContext, PolicyManagementContext, RiskManagementContext
+
+ /* Add teams to this organizational map: */
+ contains CustomersBackofficeTeam, CustomersFrontofficeTeam, ContractsTeam
+
+ /* Define the subsystem/component relationships: */
+
+ CustomerSelfServiceContext [D,C]<-[U,S] CustomerManagementContext
+
+ PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext
+
+ PolicyManagementContext [P]<->[P] RiskManagementContext
+
+ /* Define the team relationships: */
+
+ CustomersBackofficeTeam [U,S]->[D,C] CustomersFrontofficeTeam
+
+ CustomersBackofficeTeam [U]->[D] ContractsTeam
+
}
-/* Team Definitions */
-BoundedContext CustomersBackofficeTeam realizes CustomerManagementContext {
- type = TEAM
- domainVisionStatement = "This team is responsible for implementing the customers module in the back-office system."
+/* Team Definitions */
+BoundedContext CustomersBackofficeTeam realizes CustomerManagementContext {
+ type = TEAM
+ domainVisionStatement = "This team is responsible for implementing the customers module in the back-office system."
}
-BoundedContext CustomersFrontofficeTeam realizes CustomerSelfServiceContext {
- type = TEAM
- domainVisionStatement = "This team is responsible for implementing the front-office application for the insurance customers."
+BoundedContext CustomersFrontofficeTeam realizes CustomerSelfServiceContext {
+ type = TEAM
+ domainVisionStatement = "This team is responsible for implementing the front-office application for the insurance customers."
}
-BoundedContext ContractsTeam realizes PolicyManagementContext, RiskManagementContext {
- type = TEAM
- domainVisionStatement = "This team is responsible for implementing the contract-, policy-, and risk-management modules in the back-office system."
+BoundedContext ContractsTeam realizes PolicyManagementContext, RiskManagementContext {
+ type = TEAM
+ domainVisionStatement = "This team is responsible for implementing the contract-, policy-, and risk-management modules in the back-office system."
}
-/* Subsystem/component definitions */
-BoundedContext CustomerManagementContext
-BoundedContext CustomerSelfServiceContext
-BoundedContext PolicyManagementContext
-BoundedContext RiskManagementContext
-// Generated from DDD Context Map 'Insurance-Example_Context-Map.cml' at 21.10.2019 17:48:52 CEST.
-API description CustomerManagementContextAPI
-usage context PUBLIC_API for BACKEND_INTEGRATION
-
-data type Address { "street":V<string>, "postalCode":V<int>, "city":V<string> }
-data type AddressId P
-data type changeCustomerParameter { "firstname":V<string>, "lastname":V<string> }
-
-endpoint type CustomersAggregate
- serves as INFORMATION_HOLDER_RESOURCE
- exposes
- operation createAddress
- with responsibility "Creates new address for customer"
- expecting
- payload Address
- delivering
- payload AddressId
- operation changeCustomer
- with responsibility "Changes existing customer address"
- expecting
- payload changeCustomerParameter
- delivering
- payload V<bool>
-
-// Generated from DDD upstream Bounded Context 'CustomerManagementContext' implementing OPEN_HOST_SERVICE (OHS) and PUBLISHED_LANGUAGE (PL).
-API provider CustomerManagementContextProvider
- // The customer management context is responsible for managing all the data of the insurance companies customers.
- offers CustomersAggregate
- at endpoint location "http://localhost:8001"
- via protocol "RESTfulHTTP"
-
-// Generated from DDD upstream Bounded Context 'CustomerManagementContext' implementing OPEN_HOST_SERVICE (OHS) and PUBLISHED_LANGUAGE (PL).
-API client PolicyManagementContextClient
- // This bounded context manages the contracts and policies of the customers.
- consumes CustomersAggregate
-API client CustomerSelfServiceContextClient
- // This context represents a web application which allows the customer to login and change basic data records like the address.
- consumes CustomersAggregate
-
-IPA
-data type Address { "street":D<string>, "lockbox":D<string>?, "postalCode":D<int>, "city":D<string> }
-data type JustAnUnspecifiedParameterType P
-// Generated from DDD Context Map 'Insurance-Example_Context-Map.cml' at 21.10.2019 17:48:52 CEST.
-API description CustomerManagementContextAPI
-usage context PUBLIC_API for BACKEND_INTEGRATION
-
-data type Address { "street":D<string>, "postalCode":D<int>, "city":D<string> }
-data type AddressId P
-data type changeCustomerParameter { "firstname":D<string>, "lastname":D<string> }
-
-endpoint type CustomersAggregate
- serves as INFORMATION_HOLDER_RESOURCE
- exposes
- operation createAddress
- with responsibility "Creates new address for customer"
- expecting
- payload Address
- delivering
- payload AddressId
- operation changeCustomer
- with responsibility "Changes existing customer address"
- expecting
- payload changeCustomerParameter
- delivering
- payload D<bool>
-
-// Generated from DDD upstream Bounded Context 'CustomerManagementContext' implementing OPEN_HOST_SERVICE (OHS) and PUBLISHED_LANGUAGE (PL).
-API provider CustomerManagementContextProvider
- // The customer management context is responsible for managing all the data of the insurance companies customers.
- offers CustomersAggregate
- at endpoint location "http://localhost:8001"
- via protocol "RESTfulHTTP"
-
-// Generated from DDD upstream Bounded Context 'CustomerManagementContext' implementing OPEN_HOST_SERVICE (OHS) and PUBLISHED_LANGUAGE (PL).
-API client PolicyManagementContextClient
- // This bounded context manages the contracts and policies of the customers.
- consumes CustomersAggregate
-API client CustomerSelfServiceContextClient
- // This context represents a web application which allows the customer to login and change basic data records like the address.
- consumes CustomersAggregate
-
-IPA
-BoundedContext CustomerManagementContext {
+```cml
+BoundedContext CustomerManagementContext {
- "INFORMATION_HOLDER_RESOURCE"
- Aggregate Customers {
+ "INFORMATION_HOLDER_RESOURCE"
+ Aggregate Customers {
- Entity Customer {
- aggregateRoot
+ Entity Customer {
+ aggregateRoot
- - SocialInsuranceNumber sin
- String firstname
- String lastname
- - List<Address> addresses
+ - SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ - List addresses
- "RETRIEVAL_OPERATION"
- def @Address getAddress(AddressId addressId);
+ "RETRIEVAL_OPERATION"
+ def @Address getAddress(AddressId addressId);
}
- Entity Address
+ Entity Address
}
}
-data type Address { "street":D<string>, "postalCode":D<int>, "city":D<string> }
-data type AddressId P
-
-endpoint type CustomersAggregate
- serves as INFORMATION_HOLDER_RESOURCE
- exposes
- operation getAddress
- with responsibility RETRIEVAL_OPERATION
- expecting
- payload AddressId
- delivering
- payload Address
-// Generated from DDD Context Map 'Insurance-Example_Context-Map.cml' at 21.10.2019 17:48:52 CEST.
-API description CustomerManagementContextAPI
-usage context PUBLIC_API for BACKEND_INTEGRATION
+```mdsl
+// Generated from DDD Context Map 'Insurance-Example_Context-Map.cml' at 21.10.2019 17:48:52 CEST.
+API description CustomerManagementContextAPI
+usage context PUBLIC_API for BACKEND_INTEGRATION
-// ** BEGIN PROTECTED REGION for data types
+// ** BEGIN PROTECTED REGION for data types
-// ** END PROTECTED REGION for data types
+// ** END PROTECTED REGION for data types
-data type Address { "street":D<string>, "postalCode":D<int>, "city":D<string> }
-data type AddressId P
-data type changeCustomerParameter { "firstname":D<string>, "lastname":D<string> }
+data type Address { "street":D, "postalCode":D, "city":D }
+data type AddressId P
+data type changeCustomerParameter { "firstname":D, "lastname":D }
-// ** BEGIN PROTECTED REGION for endpoint types
+// ** BEGIN PROTECTED REGION for endpoint types
-// ** END PROTECTED REGION for endpoint types
+// ** END PROTECTED REGION for endpoint types
-endpoint type CustomersAggregate
- serves as INFORMATION_HOLDER_RESOURCE
- exposes
- operation createAddress
- with responsibility "Creates new address for customer"
- expecting
- payload Address
- delivering
- payload AddressId
- operation changeCustomer
- with responsibility "Changes existing customer address"
- expecting
- payload changeCustomerParameter
- delivering
- payload D<bool>
+endpoint type CustomersAggregate
+ serves as INFORMATION_HOLDER_RESOURCE
+ exposes
+ operation createAddress
+ with responsibility "Creates new address for customer"
+ expecting
+ payload Address
+ delivering
+ payload AddressId
+ operation changeCustomer
+ with responsibility "Changes existing customer address"
+ expecting
+ payload changeCustomerParameter
+ delivering
+ payload D
-// ** BEGIN PROTECTED REGION for API providers
+// ** BEGIN PROTECTED REGION for API providers
-// ** END PROTECTED REGION for API providers
+// ** END PROTECTED REGION for API providers
-// Generated from DDD upstream Bounded Context 'CustomerManagementContext' implementing OPEN_HOST_SERVICE (OHS) and PUBLISHED_LANGUAGE (PL).
-API provider CustomerManagementContextProvider
- // The customer management context is responsible for managing all the data of the insurance companies customers.
- offers CustomersAggregate
- at endpoint location "http://localhost:8001"
- via protocol "RESTfulHTTP"
+// Generated from DDD upstream Bounded Context 'CustomerManagementContext' implementing OPEN_HOST_SERVICE (OHS) and PUBLISHED_LANGUAGE (PL).
+API provider CustomerManagementContextProvider
+ // The customer management context is responsible for managing all the data of the insurance companies customers.
+ offers CustomersAggregate
+ at endpoint location "http://localhost:8001"
+ via protocol "RESTfulHTTP"
-// ** BEGIN PROTECTED REGION for API clients
+// ** BEGIN PROTECTED REGION for API clients
-// ** END PROTECTED REGION for API clients
+// ** END PROTECTED REGION for API clients
-// Generated from DDD downstream Bounded Context 'PolicyManagementContext' implementing CONFORMIST (CF).
-API client PolicyManagementContextClient
- // This bounded context manages the contracts and policies of the customers.
- consumes CustomersAggregate
-API client CustomerSelfServiceContextClient
- // This context represents a web application which allows the customer to login and change basic data records like the address.
- consumes CustomersAggregate
+// Generated from DDD downstream Bounded Context 'PolicyManagementContext' implementing CONFORMIST (CF).
+API client PolicyManagementContextClient
+ // This bounded context manages the contracts and policies of the customers.
+ consumes CustomersAggregate
+API client CustomerSelfServiceContextClient
+ // This context represents a web application which allows the customer to login and change basic data records like the address.
+ consumes CustomersAggregate
-IPA
- // Generated from DDD Context Map 'Insurance-Example_Context-Map.cml' at 21.10.2019 17:48:52 CEST.
-API description CustomerManagementContextAPI
-usage context PUBLIC_API for BACKEND_INTEGRATION
+```mdsl
+// Generated from DDD Context Map 'Insurance-Example_Context-Map.cml' at 21.10.2019 17:48:52 CEST.
+API description CustomerManagementContextAPI
+usage context PUBLIC_API for BACKEND_INTEGRATION
-// ** BEGIN PROTECTED REGION for data types
+// ** BEGIN PROTECTED REGION for data types
-data type Address { "street":D<string>, "postalCode":D<int>, "city":D<string>, "manuallyChangedThisDataType":D<string> }
+data type Address { "street":D, "postalCode":D, "city":D, "manuallyChangedThisDataType":D }
-// ** END PROTECTED REGION for data types
+// ** END PROTECTED REGION for data types
-data type AddressId P
-data type changeCustomerParameter { "firstname":D<string>, "lastname":D<string> }
+data type AddressId P
+data type changeCustomerParameter { "firstname":D, "lastname":D }
-// removed the rest here to save space ...
+// removed the rest here to save space ...
-IPA
- /**
- * The DDD Cargo sample application modeled in CML. Note that we split the application into
- * multiple bounded contexts.
- *
- */
-ContextMap {
- contains CargoBookingContext
- contains VoyagePlanningContext
- contains LocationContext
-
- CargoBookingContext [SK]<->[SK] VoyagePlanningContext
-
- CargoBookingContext [D]<-[U,OHS,PL] LocationContext
-
- VoyagePlanningContext [D]<-[U,OHS,PL] LocationContext
+```cml
+/**
+ * The DDD Cargo sample application modeled in CML. Note that we split the application into
+ * multiple bounded contexts.
+ *
+ */
+ContextMap {
+ contains CargoBookingContext
+ contains VoyagePlanningContext
+ contains LocationContext
+
+ CargoBookingContext [SK]<->[SK] VoyagePlanningContext
+
+ CargoBookingContext [D]<-[U,OHS,PL] LocationContext
+
+ VoyagePlanningContext [D]<-[U,OHS,PL] LocationContext
}
-BoundedContext LocationContext {
- Module location {
- Aggregate Location {
- Entity Location {
- aggregateRoot
+```cml
+BoundedContext LocationContext {
+ Module location {
+ Aggregate Location {
+ Entity Location {
+ aggregateRoot
- PortCode portcode
- - UnLocode unLocode
- String name
+ PortCode portcode
+ - UnLocode unLocode
+ String name
}
- ValueObject UnLocode {
- String unLocode
+ ValueObject UnLocode {
+ String unLocode
}
- ValueObject LocationShared {
- PortCode portCode
- - Location location
+ ValueObject LocationShared {
+ PortCode portCode
+ - Location location
}
}
}
}
-Aggregate Contract {
- responsibilities = "Contracts", "Policies"
- knowledgeLevel = CONCRETE
+```cml
+Aggregate Contract {
+ responsibilities = "Contracts", "Policies"
+ knowledgeLevel = CONCRETE
- Entity Contract {
- aggregateRoot
+ Entity Contract {
+ aggregateRoot
- - ContractId identifier
- - Customer client
- - List<Product> products
+ - ContractId identifier
+ - Customer client
+ - List products
}
- enum States {
- aggregateLifecycle
+ enum States {
+ aggregateLifecycle
CREATED, POLICE_CREATED, RECALLED
}
- ValueObject ContractId {
- int contractId key
+ ValueObject ContractId {
+ int contractId key
}
- Entity Policy {
- int policyNr
- - Contract contract
- BigDecimal price
+ Entity Policy {
+ int policyNr
+ - Contract contract
+ BigDecimal price
}
- Service ContractService {
- @ContractId createContract(@Contract contrace) : write [ -> CREATED];
- @Contract getContract(@ContractId contractId) : read-only;
- boolean createPolicy(@ContractId contractId) : write [ CREATED -> POLICE_CREATED ];
- boolean recall(@ContractId contractId) : write [ CREATED, POLICE_CREATED -> RECALLED ];
+ Service ContractService {
+ @ContractId createContract(@Contract contrace) : write [ -> CREATED];
+ @Contract getContract(@ContractId contractId) : read-only;
+ boolean createPolicy(@ContractId contractId) : write [ CREATED -> POLICE_CREATED ];
+ boolean recall(@ContractId contractId) : write [ CREATED, POLICE_CREATED -> RECALLED ];
}
}
- enum States {
- aggregateLifecycle
+```cml
+enum States {
+ aggregateLifecycle
CREATED, POLICE_CREATED, RECALLED
}
-Service ContractService {
- @ContractId createContract(@Contract contrace) : write;
- @Contract getContract(@ContractId contractId) : read-only;
- boolean createPolicy(@ContractId contractId) : write;
- boolean recall(@ContractId contractId) : write;
+```cml
+Service ContractService {
+ @ContractId createContract(@Contract contrace) : write;
+ @Contract getContract(@ContractId contractId) : read-only;
+ boolean createPolicy(@ContractId contractId) : write;
+ boolean recall(@ContractId contractId) : write;
}
-Service ContractService {
- @ContractId createContract(@Contract contrace) : write [ -> CREATED];
- @Contract getContract(@ContractId contractId) : read-only;
- boolean createPolicy(@ContractId contractId) : write [ CREATED -> POLICE_CREATED ];
- boolean recall(@ContractId contractId) : write [ CREATED, POLICE_CREATED -> RECALLED ];
+```cml
+Service ContractService {
+ @ContractId createContract(@Contract contrace) : write [ -> CREATED];
+ @Contract getContract(@ContractId contractId) : read-only;
+ boolean createPolicy(@ContractId contractId) : write [ CREATED -> POLICE_CREATED ];
+ boolean recall(@ContractId contractId) : write [ CREATED, POLICE_CREATED -> RECALLED ];
}
-// an initial state:
--> CREATED
+```cml
+// an initial state:
+-> CREATED
-// simple state transition from one state into the other
-CREATED -> CHECK_REQUESTED
+// simple state transition from one state into the other
+CREATED -> CHECK_REQUESTED
-// the left side can contain multiple states:
-// (this means that the state on the right can be reached by any of those on the left side)
-CREATED, CHECK_REQUESTED -> CHECK_IN_PROGRESS
+// the left side can contain multiple states:
+// (this means that the state on the right can be reached by any of those on the left side)
+CREATED, CHECK_REQUESTED -> CHECK_IN_PROGRESS
-// multiple target states possible
-// X stands for XOR and means one OR the other will be reached but not both at the same time (exclusive OR)
-CHECK_IN_PROGRESS -> ACCEPTED X REJECTED
+// multiple target states possible
+// X stands for XOR and means one OR the other will be reached but not both at the same time (exclusive OR)
+CHECK_IN_PROGRESS -> ACCEPTED X REJECTED
-// target states can be marked as end states with a star:
-CHECK_IN_PROGRESS -> ACCEPTED* X REJECTED*
+// target states can be marked as end states with a star:
+CHECK_IN_PROGRESS -> ACCEPTED* X REJECTED*
-// a combination of multiple on the left and multiple on the right
-CREATED, CHECK_REQUESTED -> ACCEPTED X REJECTED
-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"
+```cml
+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 {
- owner = CustomerFrontendTeam
+ Aggregate CustomerFrontend {
+ owner = CustomerFrontendTeam
- DomainEvent CustomerAddressChange {
- aggregateRoot
+ DomainEvent CustomerAddressChange {
+ aggregateRoot
- - UserAccount issuer
- - Address changedAddress
+ - UserAccount issuer
+ - Address changedAddress
}
}
- Aggregate Acounts {
- owner = CustomerBackendTeam
+ Aggregate Acounts {
+ owner = CustomerBackendTeam
- Entity UserAccount {
- aggregateRoot
+ Entity UserAccount {
+ aggregateRoot
- String username
- - Customer accountCustomer
+ String username
+ - Customer accountCustomer
}
}
}
-/* Team Definitions */
-BoundedContext CustomerBackendTeam {
- type = TEAM
+```cml
+/* Team Definitions */
+BoundedContext CustomerBackendTeam {
+ type = TEAM
}
-BoundedContext CustomerFrontendTeam {
- type = TEAM
+BoundedContext CustomerFrontendTeam {
+ type = TEAM
}
-BoundedContext PolicyManagementContext implements PolicyManagementDomain {
- Aggregate Offers {
- useCases = CreateOfferForCustomer
-
- Entity Offer {
- aggregateRoot
-
- int offerId
- - Customer client
- - List<Product> products
- BigDecimal price
+```cml
+BoundedContext PolicyManagementContext implements PolicyManagementDomain {
+ Aggregate Offers {
+ useCases = CreateOfferForCustomer
+
+ Entity Offer {
+ aggregateRoot
+
+ int offerId
+ - Customer client
+ - List products
+ BigDecimal price
}
}
- Aggregate Products {
- userStories = AddProductToOffer
-
- Entity Product {
- aggregateRoot
-
- - ProductId identifier
- String productName
+ Aggregate Products {
+ userStories = AddProductToOffer
+
+ Entity Product {
+ aggregateRoot
+
+ - ProductId identifier
+ String productName
}
- ValueObject ProductId {
- int productId key
+ ValueObject ProductId {
+ int productId key
}
}
- Aggregate Contract {
- features = CreateOfferForCustomer, UpdateContract
-
- Entity Contract {
- aggregateRoot
-
- - ContractId identifier
- - Customer client
- - List<Product> products
+ Aggregate Contract {
+ features = CreateOfferForCustomer, UpdateContract
+
+ Entity Contract {
+ aggregateRoot
+
+ - ContractId identifier
+ - Customer client
+ - List products
}
- ValueObject ContractId {
- int contractId key
+ ValueObject ContractId {
+ int contractId key
}
-
- Entity Policy {
- int policyNr
- - Contract contract
- BigDecimal price
+
+ Entity Policy {
+ int policyNr
+ - Contract contract
+ BigDecimal price
}
}
}
-UseCase CreateOfferForCustomer
-UserStory UpdateContract
-UserStory AddProductToOffer
- BoundedContext MyMonolith {
- Aggregate CustomerManagement {
- securityZone "Internal"
- Entity Customer {
- String firstName
- String lastName
+```cml
+BoundedContext MyMonolith {
+ Aggregate CustomerManagement {
+ securityZone "Internal"
+ Entity Customer {
+ String firstName
+ String lastName
}
- Entity Address {
- - Customer customer
- String street
- String city
+ Entity Address {
+ - Customer customer
+ String street
+ String city
}
}
- Aggregate CustomerFrontend {
- securityZone "Public"
- DomainEvent AddressChanged {
- - Address address
+ Aggregate CustomerFrontend {
+ securityZone "Public"
+ DomainEvent AddressChanged {
+ - Address address
}
}
}
-BoundedContext MyMonolith {
- Aggregate CustomerManagement {
- securityAccessGroup "InsuranceEmployees"
- Entity Customer {
- String firstName
- String lastName
+```cml
+BoundedContext MyMonolith {
+ Aggregate CustomerManagement {
+ securityAccessGroup "InsuranceEmployees"
+ Entity Customer {
+ String firstName
+ String lastName
}
- Entity Address {
- - Customer customer
- String street
- String city
+ Entity Address {
+ - Customer customer
+ String street
+ String city
}
}
- Aggregate CustomerFrontend {
- securityAccessGroup "Customers"
- DomainEvent AddressChanged {
- - Address address
+ Aggregate CustomerFrontend {
+ securityAccessGroup "Customers"
+ DomainEvent AddressChanged {
+ - Address address
}
}
}
-Aggregate AggregateDemo1 {
- contentVolatility = OFTEN // content changes more often in this Aggregate
-
- Entity DemoEntityOne
+```cml
+Aggregate AggregateDemo1 {
+ contentVolatility = OFTEN // content changes more often in this Aggregate
+
+ Entity DemoEntityOne
}
-Aggregate AggregateDemo2 {
- contentVolatility = NORMAL
-
- Entity DemoEntityTwo
+Aggregate AggregateDemo2 {
+ contentVolatility = NORMAL
+
+ Entity DemoEntityTwo
}
-Aggregate CustomerFrontend {
- likelihoodForChange = OFTEN
-
- DomainEvent CustomerAddressChange {
- aggregateRoot
-
- - UserAccount issuer
- - Address changedAddress
+```cml
+Aggregate CustomerFrontend {
+ likelihoodForChange = OFTEN
+
+ DomainEvent CustomerAddressChange {
+ aggregateRoot
+
+ - UserAccount issuer
+ - Address changedAddress
}
}
-Aggregate CustomerFrontend {
- structuralVolatility = OFTEN
-
- DomainEvent CustomerAddressChange {
- aggregateRoot
-
- - UserAccount issuer
- - Address changedAddress
+```cml
+Aggregate CustomerFrontend {
+ structuralVolatility = OFTEN
+
+ DomainEvent CustomerAddressChange {
+ aggregateRoot
+
+ - UserAccount issuer
+ - Address changedAddress
}
}
-Aggregate AggregateDemo1 {
- availabilityCriticality = HIGH // higher availability requirements then other aggregate
-
- Entity DemoEntityOne
+```cml
+Aggregate AggregateDemo1 {
+ availabilityCriticality = HIGH // higher availability requirements then other aggregate
+
+ Entity DemoEntityOne
}
-Aggregate AggregateDemo2 {
- availabilityCriticality = NORMAL
-
- Entity DemoEntityTwo
+Aggregate AggregateDemo2 {
+ availabilityCriticality = NORMAL
+
+ Entity DemoEntityTwo
}
-Aggregate AggregateDemo1 {
- consistencyCriticality = HIGH // higher consistency requirements then other aggregate
-
- Entity DemoEntityOne
+```cml
+Aggregate AggregateDemo1 {
+ consistencyCriticality = HIGH // higher consistency requirements then other aggregate
+
+ Entity DemoEntityOne
}
-Aggregate AggregateDemo2 {
- consistencyCriticality = NORMAL
-
- Entity DemoEntityTwo
+Aggregate AggregateDemo2 {
+ consistencyCriticality = NORMAL
+
+ Entity DemoEntityTwo
}
-Aggregate AggregateDemo1 {
- storageSimilarity = HUGE // similar storage requirements as AggregateDemo3
-
- Entity DemoEntityOne
+```cml
+Aggregate AggregateDemo1 {
+ storageSimilarity = HUGE // similar storage requirements as AggregateDemo3
+
+ Entity DemoEntityOne
}
-Aggregate AggregateDemo2 {
- storageSimilarity = NORMAL
-
- Entity DemoEntityTwo
+Aggregate AggregateDemo2 {
+ storageSimilarity = NORMAL
+
+ Entity DemoEntityTwo
}
-Aggregate AggregateDemo3 {
- storageSimilarity = HUGE // similar storage requirements as AggregateDemo1
-
- Entity DemoEntityThree
+Aggregate AggregateDemo3 {
+ storageSimilarity = HUGE // similar storage requirements as AggregateDemo1
+
+ Entity DemoEntityThree
}
-Aggregate AggregateDemo1 {
- securityCriticality = HIGH // high security requirements
-
- Entity DemoEntityOne
+```cml
+Aggregate AggregateDemo1 {
+ securityCriticality = HIGH // high security requirements
+
+ Entity DemoEntityOne
}
-Aggregate AggregateDemo2 {
- securityCriticality = NORMAL
-
- Entity DemoEntityTwo
+Aggregate AggregateDemo2 {
+ securityCriticality = NORMAL
+
+ Entity DemoEntityTwo
}
-DebtCollection [D,ACL]<-[U,OHS,PL] PrintingContext {
- implementationTechnology = "SOAP"
+```cml
+DebtCollection [D,ACL]<-[U,OHS,PL] PrintingContext {
+ implementationTechnology = "SOAP"
}
-BoundedContext ClaimsManagement {
- Application {
- Service ClaimsApplicationService {
- void submitClaim(@Claim claim);
- void checkInsurance(@Claim claim);
- void acceptClaim(@Claim claim);
- void rejectClaim(@Claim claim);
+```cml
+BoundedContext ClaimsManagement {
+ Application {
+ Service ClaimsApplicationService {
+ void submitClaim(@Claim claim);
+ void checkInsurance(@Claim claim);
+ void acceptClaim(@Claim claim);
+ void rejectClaim(@Claim claim);
}
}
-
- Aggregate Claims {
- Entity Claim {
- aggregateRoot
- long claimId
- CustomerId customer
- String description
- Blob requestDocument
- boolean isComplete
- boolean isAssessed
- - ClaimState claimState
+
+ Aggregate Claims {
+ Entity Claim {
+ aggregateRoot
+ long claimId
+ CustomerId customer
+ String description
+ Blob requestDocument
+ boolean isComplete
+ boolean isAssessed
+ - ClaimState claimState
}
- enum ClaimState {
- aggregateLifecycle
+ enum ClaimState {
+ aggregateLifecycle
OPEN, REJECTED, ACCEPTED
}
-
- abstract DomainEvent ClaimEvent {
- long claimId
- Date timestamp
+
+ abstract DomainEvent ClaimEvent {
+ long claimId
+ Date timestamp
}
- DomainEvent ClaimSubmitted extends ClaimEvent
- DomainEvent ClaimAccepted extends ClaimEvent
- DomainEvent ClaimRejected extends ClaimEvent
+ DomainEvent ClaimSubmitted extends ClaimEvent
+ DomainEvent ClaimAccepted extends ClaimEvent
+ DomainEvent ClaimRejected extends ClaimEvent
}
}
-Application ClaimsApplicationLayer {
- Service ClaimsApplicationService {
- void submitClaim(@Claim claim);
- void checkInsurance(@Claim claim);
- void acceptClaim(@Claim claim);
- void rejectClaim(@Claim claim);
+```cml
+Application ClaimsApplicationLayer {
+ Service ClaimsApplicationService {
+ void submitClaim(@Claim claim);
+ void checkInsurance(@Claim claim);
+ void acceptClaim(@Claim claim);
+ void rejectClaim(@Claim claim);
}
}
-Application {
- Service ClaimsApplicationService {
- void submitClaim(@Claim claim) : write [ -> OPEN];
- void checkInsurance(@Claim claim);
- void acceptClaim(@Claim claim) : write [ OPEN -> ACCEPTED ];
- void rejectClaim(@Claim claim) : write [ OPEN -> REJECTED ];
+```cml
+Application {
+ Service ClaimsApplicationService {
+ void submitClaim(@Claim claim) : write [ -> OPEN];
+ void checkInsurance(@Claim claim);
+ void acceptClaim(@Claim claim) : write [ OPEN -> ACCEPTED ];
+ void rejectClaim(@Claim claim) : write [ OPEN -> REJECTED ];
}
}
-Application {
- Command SubmitClaim {
- // attributes/body optional
+```cml
+Application {
+ Command SubmitClaim {
+ // attributes/body optional
}
- Command AcceptClaim
- Command RejectClaim
-
- Event ClaimSubmitted {
- // attributes/body optional
+ Command AcceptClaim
+ Command RejectClaim
+
+ Event ClaimSubmitted {
+ // attributes/body optional
}
- Event ClaimAccepted
- Event ClaimRejected
+ Event ClaimAccepted
+ Event ClaimRejected
}
-Application {
+```cml
+Application {
- /* we removed commands and events here to keep the sample shorter */
+ /* we removed commands and events here to keep the sample shorter */
- Flow ClaimsFlow {
- command SubmitClaim emits event ClaimSubmitted
- event ClaimSubmitted triggers command CheckClaimDocumentation
- command CheckClaimDocumentation emits event ClaimRegistered
- event ClaimRegistered triggers command CheckInsurance
- command CheckInsurance emits event AssessmentPerformed
+ Flow ClaimsFlow {
+ command SubmitClaim emits event ClaimSubmitted
+ event ClaimSubmitted triggers command CheckClaimDocumentation
+ command CheckClaimDocumentation emits event ClaimRegistered
+ event ClaimRegistered triggers command CheckInsurance
+ command CheckInsurance emits event AssessmentPerformed
- event AssessmentPerformed triggers command AcceptClaim X RejectClaim
- command AcceptClaim delegates to Claims [OPEN -> ACCEPTED] emits event ClaimAccepted
- command RejectClaim delegates to Claims [OPEN -> REJECTED] emits event ClaimRejected
+ event AssessmentPerformed triggers command AcceptClaim X RejectClaim
+ command AcceptClaim delegates to Claims [OPEN -> ACCEPTED] emits event ClaimAccepted
+ command RejectClaim delegates to Claims [OPEN -> REJECTED] emits event ClaimRejected
- event ClaimAccepted triggers command SchedulePayment
- command SchedulePayment emits event PaymentPerformed
- event PaymentPerformed triggers command NofifyCustomer
- event ClaimRejected triggers command NofifyCustomer
- command NofifyCustomer delegates to Claims [ACCEPTED, REJECTED -> CUSTOMER_NOTIFIED] emits event CustomerNotified
+ event ClaimAccepted triggers command SchedulePayment
+ command SchedulePayment emits event PaymentPerformed
+ event PaymentPerformed triggers command NofifyCustomer
+ event ClaimRejected triggers command NofifyCustomer
+ command NofifyCustomer delegates to Claims [ACCEPTED, REJECTED -> CUSTOMER_NOTIFIED] emits event CustomerNotified
}
}
-Application {
- Service ClaimsApplicationService {
- void submitClaim(@Claim claim);
- void checkClaimDocumentation(@Claim claim);
- void checkInsurance(@Claim claim);
- void acceptClaim(@Claim claim);
- void rejectClaim(@Claim claim);
- void schedulePayment(@Claim claim);
- void nofifyCustomer(@Claim claim);
+```cml
+Application {
+ Service ClaimsApplicationService {
+ void submitClaim(@Claim claim);
+ void checkClaimDocumentation(@Claim claim);
+ void checkInsurance(@Claim claim);
+ void acceptClaim(@Claim claim);
+ void rejectClaim(@Claim claim);
+ void schedulePayment(@Claim claim);
+ void nofifyCustomer(@Claim claim);
}
-
- Flow ClaimsFlow {
- operation submitClaim emits event ClaimSubmitted
- event ClaimSubmitted triggers operation checkClaimDocumentation
- operation checkClaimDocumentation emits event ClaimRegistered
- event ClaimRegistered triggers operation checkInsurance
- operation checkInsurance emits event AssessmentPerformed
-
- event AssessmentPerformed triggers operation acceptClaim X rejectClaim
- operation acceptClaim delegates to Claims [OPEN -> ACCEPTED] emits event ClaimAccepted
- operation rejectClaim delegates to Claims [OPEN -> REJECTED] emits event ClaimRejected
-
- event ClaimAccepted triggers operation schedulePayment
- operation schedulePayment emits event PaymentPerformed
- event PaymentPerformed triggers operation nofifyCustomer
- event ClaimRejected triggers operation nofifyCustomer
- operation nofifyCustomer delegates to Claims[ACCEPTED, REJECTED -> CUSTOMER_NOTIFIED] emits event CustomerNotified
+
+ Flow ClaimsFlow {
+ operation submitClaim emits event ClaimSubmitted
+ event ClaimSubmitted triggers operation checkClaimDocumentation
+ operation checkClaimDocumentation emits event ClaimRegistered
+ event ClaimRegistered triggers operation checkInsurance
+ operation checkInsurance emits event AssessmentPerformed
+
+ event AssessmentPerformed triggers operation acceptClaim X rejectClaim
+ operation acceptClaim delegates to Claims [OPEN -> ACCEPTED] emits event ClaimAccepted
+ operation rejectClaim delegates to Claims [OPEN -> REJECTED] emits event ClaimRejected
+
+ event ClaimAccepted triggers operation schedulePayment
+ operation schedulePayment emits event PaymentPerformed
+ event PaymentPerformed triggers operation nofifyCustomer
+ event ClaimRejected triggers operation nofifyCustomer
+ operation nofifyCustomer delegates to Claims[ACCEPTED, REJECTED -> CUSTOMER_NOTIFIED] emits event CustomerNotified
}
}
-Application {
+```cml
+Application {
- /* we removed commands and events here to keep the sample shorter */
+ /* we removed commands and events here to keep the sample shorter */
- Flow ClaimsFlow {
- /* type 2: (event production) */
- command SubmitClaim emits event ClaimSubmitted
+ Flow ClaimsFlow {
+ /* type 2: (event production) */
+ command SubmitClaim emits event ClaimSubmitted
- /* type 2 alternative: (event production) */
- operation submitClaim emits event ClaimSubmitted
+ /* type 2 alternative: (event production) */
+ operation submitClaim emits event ClaimSubmitted
- /* type 1: (command invokation) */
- event ClaimSubmitted triggers command CheckClaimDocumentation
+ /* type 1: (command invokation) */
+ event ClaimSubmitted triggers command CheckClaimDocumentation
- /* type 1 alternative: (operation invokation) */
- event ClaimSubmitted triggers operation checkClaimDocumentation
+ /* type 1 alternative: (operation invokation) */
+ event ClaimSubmitted triggers operation checkClaimDocumentation
}
}
-command SubmitClaim emits event Event1 + Event2 + Event3 // and so on... (emit as many events as you want)
+```cml
+command SubmitClaim emits event Event1 + Event2 + Event3 // and so on... (emit as many events as you want)
-// alternative
-operation submitClaim emits event Event1 + Event2
-command SubmitClaim emits event Event1 X Event2 X Event3
+```cml
+command SubmitClaim emits event Event1 X Event2 X Event3
-// alternative
-operation submitClaim emits event Event1 X Event2
-command SubmitClaim emits event Event1 O Event2 O Event3
+```cml
+command SubmitClaim emits event Event1 O Event2 O Event3
-// alternative
-operation submitClaim emits event Event1 O Event2
-event ClaimSubmitted + ContractChecked triggers command AssessClaim
+```cml
+event ClaimSubmitted + ContractChecked triggers command AssessClaim
-// alternative
-event ClaimSubmitted + ContractChecked triggers operation assessClaim
-event ClaimSubmitted triggers command CheckClaim + CheckPolicy
+```cml
+event ClaimSubmitted triggers command CheckClaim + CheckPolicy
-// operation alternative:
-event ClaimSubmitted triggers operation checkClaim + checkPolicy
-event ClaimSubmitted triggers command CheckClaim X CheckPolicy
+```cml
+event ClaimSubmitted triggers command CheckClaim X CheckPolicy
-// operation alternative:
-event ClaimSubmitted triggers operation checkClaim X checkPolicy
-event ClaimSubmitted triggers command CheckClaim O CheckPolicy
+```cml
+event ClaimSubmitted triggers command CheckClaim O CheckPolicy
-// operation alternative:
-event ClaimSubmitted triggers operation checkClaim O checkPolicy
-command SubmitClaim delegates to Claims emits event Event1 X Event2 X Event3
+```cml
+command SubmitClaim delegates to Claims emits event Event1 X Event2 X Event3
-// alternative
-operation submitClaim delegates to Claims emits event Event1 X Event2
-command SubmitClaim delegates to Claims [ -> SUBMITTED ] emits event Event1 X Event2 X Event3
+```cml
+command SubmitClaim delegates to Claims [ -> SUBMITTED ] emits event Event1 X Event2 X Event3
-// alternative
-operation submitClaim delegates to Claims [ -> SUBMITTED ] emits event Event1 X Event2
-command SubmitClaim [ initiated by "Customer" ] delegates to Claims [ -> SUBMITTED ] emits event Event1
+```cml
+command SubmitClaim [ initiated by "Customer" ] delegates to Claims [ -> SUBMITTED ] emits event Event1
-// alternative
-operation submitClaim [ initiated by "Customer" ] delegates to Claims [ -> SUBMITTED ] emits event Event1
-ContextMap {
- contains ClaimsManagement
- contains InsuranceManagement
- contains PaymentManagement
+```cml
+ContextMap {
+ contains ClaimsManagement
+ contains InsuranceManagement
+ contains PaymentManagement
- ClaimsManagement <-> InsuranceManagement
- ClaimsManagement <-> PaymentManagement
+ ClaimsManagement <-> InsuranceManagement
+ ClaimsManagement <-> PaymentManagement
}
-BoundedContext ClaimsManagement {
- Application {
- Coordination SubmitValidClaimCoordination {
+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);
+ Service ClaimsApplicationService {
+ void submitClaim(@Claim claim);
+ void acceptClaim(@Claim claim);
}
}
}
-BoundedContext InsuranceManagement {
- Application {
- Service InsuranceApplicationService {
- void checkInsurance(@Claim claim);
+BoundedContext InsuranceManagement {
+ Application {
+ Service InsuranceApplicationService {
+ void checkInsurance(@Claim claim);
}
}
}
-BoundedContext PaymentManagement {
- Application {
- Service PaymentApplicationService {
- void performPayment(@Claim claim);
+BoundedContext PaymentManagement {
+ Application {
+ Service PaymentApplicationService {
+ void performPayment(@Claim claim);
}
}
}
-
-// Bounded context name :: application service name :: service operation name
+```cml
+// Bounded context name :: application service name :: service operation name
ClaimsManagement::ClaimsApplicationService::submitClaim;
-
-BoundedContext CustomerManagementContext implements CustomerManagementDomain {
- type = FEATURE
- domainVisionStatement = "The customer management context is responsible for ..."
- implementationTechnology = "Java, JEE Application"
- responsibilities = "Customers", "Addresses"
- knowledgeLevel = CONCRETE
-
- Module addresses {
- Aggregate Addresses {
- Entity Address {
- String city
+```cml
+BoundedContext CustomerManagementContext implements CustomerManagementDomain {
+ type = FEATURE
+ domainVisionStatement = "The customer management context is responsible for ..."
+ implementationTechnology = "Java, JEE Application"
+ responsibilities = "Customers", "Addresses"
+ knowledgeLevel = CONCRETE
+
+ Module addresses {
+ Aggregate Addresses {
+ Entity Address {
+ String city
}
}
}
- Aggregate Customers {
- Entity Customer {
- aggregateRoot
-
- - SocialInsuranceNumber sin
- String firstname
- String lastname
- - List<Address> addresses
+ Aggregate Customers {
+ Entity Customer {
+ aggregateRoot
+
+ - SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ - List addresses
}
}
}
-BoundedContext ContextMapperTool refines StrategicDomainDrivenDesignContext {
- type FEATURE
- domainVisionStatement "Context Mapper provides a formal way to model strategic DDD Context Maps."
- implementationTechnology "Java, Eclipse"
+```cml
+BoundedContext ContextMapperTool refines StrategicDomainDrivenDesignContext {
+ type FEATURE
+ domainVisionStatement "Context Mapper provides a formal way to model strategic DDD Context Maps."
+ implementationTechnology "Java, Eclipse"
}
-BoundedContext CustomersBackofficeTeam implements CustomerManagementDomain realizes CustomerManagementContext {
- type = TEAM
- domainVisionStatement = "This team is responsible for implementing ..."
+```cml
+BoundedContext CustomersBackofficeTeam implements CustomerManagementDomain realizes CustomerManagementContext {
+ type = TEAM
+ domainVisionStatement = "This team is responsible for implementing ..."
}
-PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
- implementationTechnology = "RESTful HTTP"
+```cml
+PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
+ implementationTechnology = "RESTful HTTP"
}
-ContextMap {
- type = SYSTEM_LANDSCAPE
- state = AS_IS
-
- contains CargoBookingContext
- contains VoyagePlanningContext
- contains LocationContext
-
- CargoBookingContext [SK]<->[SK] VoyagePlanningContext
+```cml
+ContextMap {
+ type = SYSTEM_LANDSCAPE
+ state = AS_IS
+
+ contains CargoBookingContext
+ contains VoyagePlanningContext
+ contains LocationContext
+
+ CargoBookingContext [SK]<->[SK] VoyagePlanningContext
}
-ContextMap DDDSampleContextMap {
- type SYSTEM_LANDSCAPE
- state AS_IS
+```cml
+ContextMap DDDSampleContextMap {
+ type SYSTEM_LANDSCAPE
+ state AS_IS
- contains CargoBookingContext, VoyagePlanningContext, LocationContext
+ contains CargoBookingContext, VoyagePlanningContext, LocationContext
- CargoBookingContext [SK]<->[SK] VoyagePlanningContext
+ CargoBookingContext [SK]<->[SK] VoyagePlanningContext
}
-CargoBookingContext [D]<-[U] LocationContext
-LocationContext [U]->[D] CargoBookingContext
-LocationContext Upstream-Downstream CargoBookingContext
-CargoBookingContext Downstream-Upstream LocationContext
-CargoBookingContext [D]<-[U] LocationContext : CargoLocationRelationship
-CargoBookingContext <- LocationContext
-LocationContext -> CargoBookingContext
-VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext
-VoyagePlanningContext [ACL]<-[OHS,PL] LocationContext
-VoyagePlanningContext[ACL] Downstream-Upstream [OHS,PL]LocationContext
-VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext {
- implementationTechnology = "RESTful HTTP"
+```cml
+VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext {
+ implementationTechnology = "RESTful HTTP"
}
-VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext {
- implementationTechnology = "RESTful HTTP"
- downstreamRights = VETO_RIGHT
+```cml
+VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext {
+ implementationTechnology = "RESTful HTTP"
+ downstreamRights = VETO_RIGHT
}
-VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext {
- implementationTechnology = "RESTful HTTP"
- downstreamRights = VETO_RIGHT
- exposedAggregates = Customers, Addresses
+```cml
+VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext {
+ implementationTechnology = "RESTful HTTP"
+ downstreamRights = VETO_RIGHT
+ exposedAggregates = Customers, Addresses
}
-CustomerSelfServiceContext [D,C]<-[U,S] CustomerManagementContext
-CustomerManagementContext [U,S]->[D,C] CustomerSelfServiceContext
-CustomerSelfServiceContext Customer-Supplier CustomerManagementContext
-CustomerManagementContext Supplier-Customer CustomerSelfServiceContext
-CustomerSelfServiceContext [C]<-[S] CustomerManagementContext
-CustomerSelfServiceContext [D,C,ACL]<-[U,S,PL] CustomerManagementContext : Customer_Frontend_Backend_Relationship { // Relationship name is optional
- implementationTechnology = "RESTful HTTP"
+```cml
+CustomerSelfServiceContext [D,C,ACL]<-[U,S,PL] CustomerManagementContext : Customer_Frontend_Backend_Relationship { // Relationship name is optional
+ implementationTechnology = "RESTful HTTP"
}
-CustomerSelfServiceContext[ACL] Customer-Supplier [PL]CustomerManagementContext
-BoundedContext CustomerContext {
- domainVisionStatement = "This context is responsible for ..."
+```cml
+BoundedContext CustomerContext {
+ domainVisionStatement = "This context is responsible for ..."
}
-Domain Insurance {
- domainVisionStatement = "Insurance domain vision ..."
+```cml
+Domain Insurance {
+ domainVisionStatement = "Insurance domain vision ..."
- Subdomain Customers {
- /* subdomain specification */
+ Subdomain Customers {
+ /* subdomain specification */
}
- Subdomain PolicyManagement {
- /* subdomain specification */
+ Subdomain PolicyManagement {
+ /* subdomain specification */
}
}
-Subdomain CustomerManagementDomain {
- type = CORE_DOMAIN
- domainVisionStatement = "Subdomain managing everything customer-related."
+```cml
+Subdomain CustomerManagementDomain {
+ type = CORE_DOMAIN
+ domainVisionStatement = "Subdomain managing everything customer-related."
}
-BoundedContext CustomerManagementContext implements CustomerManagementDomain {
- Aggregate Customers {
- Entity Customer {
- aggregateRoot
-
- - SocialInsuranceNumber sin
- String firstname
- String lastname
- - List<Address> addresses
+```cml
+BoundedContext CustomerManagementContext implements CustomerManagementDomain {
+ Aggregate Customers {
+ Entity Customer {
+ aggregateRoot
+
+ - SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ - List addresses
}
- Entity Address {
- String street
- int postalCode
- String city
+ Entity Address {
+ String street
+ int postalCode
+ String city
}
}
}
-BoundedContext PolicyManagementContext implements PolicyManagementDomain {
- Aggregate Contract {
- Entity Contract {
- aggregateRoot
+BoundedContext PolicyManagementContext implements PolicyManagementDomain {
+ Aggregate Contract {
+ Entity Contract {
+ aggregateRoot
- - ContractId identifier
- - Customer client
- - List<Product> products
+ - ContractId identifier
+ - Customer client
+ - List products
}
- Entity Policy {
- int policyNr
- - Contract contract
- BigDecimal price
+ Entity Policy {
+ int policyNr
+ - Contract contract
+ BigDecimal price
}
}
}
- import "./BoundedContexts.cml"
+```cml
+import "./BoundedContexts.cml"
-ContextMap InsuranceContextMap {
- contains CustomerManagementContext
- contains PolicyManagementContext
+ContextMap InsuranceContextMap {
+ contains CustomerManagementContext
+ contains PolicyManagementContext
- PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
- implementationTechnology = "RESTfulHTTP"
- exposedAggregates = Customers
+ PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
+ implementationTechnology = "RESTfulHTTP"
+ exposedAggregates = Customers
}
}
-import "./BoundedContexts/CustomerManagement.cml"
-import "./BoundedContexts/PolicyManagement.cml"
+```cml
+import "./BoundedContexts/CustomerManagement.cml"
+import "./BoundedContexts/PolicyManagement.cml"
-ContextMap InsuranceContextMap {
- contains CustomerManagementContext
- contains PolicyManagementContext
+ContextMap InsuranceContextMap {
+ contains CustomerManagementContext
+ contains PolicyManagementContext
- PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
- implementationTechnology = "RESTfulHTTP"
- exposedAggregates = Customers
+ PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
+ implementationTechnology = "RESTfulHTTP"
+ exposedAggregates = Customers
}
}
-BoundedContext CustomerManagementContext implements CustomerManagementDomain {
- type = FEATURE
- domainVisionStatement = "The customer management context is responsible for ..."
- implementationTechnology = "Java, JEE Application"
- knowledgeLevel = CONCRETE
+```cml
+BoundedContext CustomerManagementContext implements CustomerManagementDomain {
+ type = FEATURE
+ domainVisionStatement = "The customer management context is responsible for ..."
+ implementationTechnology = "Java, JEE Application"
+ knowledgeLevel = CONCRETE
}
-Aggregate Customers {
- responsibilities = Customers, Addresses { "Address description ..." }
- knowledgeLevel = CONCRETE
-
- Entity Customer {
- aggregateRoot
-
- - SocialInsuranceNumber sin
- String firstname
- String lastname
- - List<Address> addresses
+```cml
+Aggregate Customers {
+ responsibilities = Customers, Addresses { "Address description ..." }
+ knowledgeLevel = CONCRETE
+
+ Entity Customer {
+ aggregateRoot
+
+ - SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ - List addresses
}
}
-PrintingContext [U,OHS]->[D,ACL] PolicyManagementContext {
- implementationTechnology = "SOAP"
+```cml
+PrintingContext [U,OHS]->[D,ACL] PolicyManagementContext {
+ implementationTechnology = "SOAP"
}
-ContractsContext [P]<->[P] ClaimsContext {
- implementationTechnology = "Messaging"
+```cml
+ContractsContext [P]<->[P] ClaimsContext {
+ implementationTechnology = "Messaging"
}
-ContractsContext Partnership ClaimsContext {
- implementationTechnology = "Messaging"
+```cml
+ContractsContext Partnership ClaimsContext {
+ implementationTechnology = "Messaging"
}
-ContractsContext [P]<->[P] ClaimsContext : ContractClaimRelationship {
- implementationTechnology = "Messaging"
+```cml
+ContractsContext [P]<->[P] ClaimsContext : ContractClaimRelationship {
+ implementationTechnology = "Messaging"
}
-PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
- implementationTechnology = "RESTful HTTP"
+```cml
+PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
+ implementationTechnology = "RESTful HTTP"
}
-BoundedContext CustomerManagementContext implements CustomerManagementDomain {
- type = FEATURE
- domainVisionStatement = "The customer management context is responsible for ..."
- implementationTechnology = "Java, JEE Application"
- responsibilities = "Customers", "Addresses"
+```cml
+BoundedContext CustomerManagementContext implements CustomerManagementDomain {
+ type = FEATURE
+ domainVisionStatement = "The customer management context is responsible for ..."
+ implementationTechnology = "Java, JEE Application"
+ responsibilities = "Customers", "Addresses"
}
-Aggregate Customers {
- responsibilities = "Customers", "Addresses"
-
- Entity Customer {
- aggregateRoot
-
- - SocialInsuranceNumber sin
- String firstname
- String lastname
- - List<Address> addresses
+```cml
+Aggregate Customers {
+ responsibilities = "Customers", "Addresses"
+
+ Entity Customer {
+ aggregateRoot
+
+ - SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ - List addresses
}
}
-CargoBookingContext [SK]<->[SK] VoyagePlanningContext {
- implementationTechnology = "Java Library"
+```cml
+CargoBookingContext [SK]<->[SK] VoyagePlanningContext {
+ implementationTechnology = "Java Library"
}
-CargoBookingContext Shared-Kernel VoyagePlanningContext {
- implementationTechnology = "Java Library"
+```cml
+CargoBookingContext Shared-Kernel VoyagePlanningContext {
+ implementationTechnology = "Java Library"
}
-CargoBookingContext <-> VoyagePlanningContext
-CargoBookingContext Shared-Kernel VoyagePlanningContext : BookingVoyageRelationship {
- implementationTechnology = "Java Library"
+```cml
+CargoBookingContext Shared-Kernel VoyagePlanningContext : BookingVoyageRelationship {
+ implementationTechnology = "Java Library"
}
-Stakeholders {
+```cml
+Stakeholders {
- // add stakeholders and stakeholder groups here
+ // add stakeholders and stakeholder groups here
}
-BoundedContext ExampleContext +```cml +BoundedContext ExampleContext -Stakeholders of ExampleContext { +Stakeholders of ExampleContext { - // add stakeholders and stakeholder groups here + // add stakeholders and stakeholder groups here } -+``` ## Stakeholders Inside a `Stakeholders` container, you can define your stakeholders. This can be done with the `Stakeholder` keyword an the name of the stakeholder: -
BoundedContext ExampleContext
+```cml
+BoundedContext ExampleContext
-Stakeholders of ExampleContext {
+Stakeholders of ExampleContext {
- Stakeholder Shopper
+ Stakeholder Shopper
- Stakeholder Software_Engineer
+ Stakeholder Software_Engineer
- Stakeholder Architect
+ Stakeholder Architect
- // etc.
+ // etc.
-}
-BoundedContext ExampleContext
+```cml
+BoundedContext ExampleContext
+
+Stakeholders of ExampleContext {
-Stakeholders of ExampleContext {
+ Stakeholder Shopper {
+ description "Is using the shopping system to by everday goods."
- Stakeholder Shopper {
- description "Is using the shopping system to by everday goods."
-
- influence MEDIUM
- interest HIGH
- }
+ influence MEDIUM
+ interest HIGH
+ }
-}
-BoundedContext ExampleContext
-
-Stakeholders of ExampleContext {
-
- StakeholderGroup Online_Shopping_Company {
- Stakeholder Development_Team {
- influence MEDIUM
- interest HIGH
- }
- Stakeholder Product_Management {
- influence HIGH
- interest HIGH
- }
- Stakeholder Customer_Relationship_Manager {
- influence HIGH
- interest MEDIUM
- }
- }
-
- Stakeholder Shopper {
- description "Is using the shopping system to by everday goods."
-
- influence MEDIUM
- interest HIGH
- }
-
-}
-/* Syntax example: Domain and Subdomains */
-Domain Insurance {
- domainVisionStatement = "Insurance domain vision statement ..."
-
- Subdomain CustomerManagementDomain {
- type = CORE_DOMAIN
- domainVisionStatement = "Subdomain managing everything customer-related."
-
- Entity Customer {
- String firstname
- String familyname
+```cml
+/* Syntax example: Domain and Subdomains */
+Domain Insurance {
+ domainVisionStatement = "Insurance domain vision statement ..."
+
+ Subdomain CustomerManagementDomain {
+ type = CORE_DOMAIN
+ domainVisionStatement = "Subdomain managing everything customer-related."
+
+ Entity Customer {
+ String firstname
+ String familyname
}
- /* Add more entities ... */
+ /* Add more entities ... */
}
- Subdomain ContractManagementDomain {}
+ Subdomain ContractManagementDomain {}
- /* Add more subdomains ... */
+ /* Add more subdomains ... */
}
-/* Syntax example for Subdomain that supports specific user requirements: */
-Domain Insurance {
- domainVisionStatement = "Insurance domain vision statement ..."
+```cml
+/* Syntax example for Subdomain that supports specific user requirements: */
+Domain Insurance {
+ domainVisionStatement = "Insurance domain vision statement ..."
- Subdomain CustomerManagementDomain supports CreateCustomers, CreateCustomerAddresses {
- type = CORE_DOMAIN
- domainVisionStatement = "Subdomain managing everything customer-related."
+ Subdomain CustomerManagementDomain supports CreateCustomers, CreateCustomerAddresses {
+ type = CORE_DOMAIN
+ domainVisionStatement = "Subdomain managing everything customer-related."
- Entity Customer {
- String firstname
- String familyname
+ Entity Customer {
+ String firstname
+ String familyname
}
}
}
-UserStory CreateCustomers {
- As an "Insurance Employee"
- I want to "create" a "Customer" with its "firstname", "lastname"
- so that "I am able to manage the customers data and offer them insurance contracts."
+UserStory CreateCustomers {
+ As an "Insurance Employee"
+ I want to "create" a "Customer" with its "firstname", "lastname"
+ so that "I am able to manage the customers data and offer them insurance contracts."
}
-UserStory CreateCustomerAddresses {
- As an "Insurance Employee"
- I want to "create" an "Address" for a "Customer"
- I want to "update" an "Address" for a "Customer"
- so that "I am able to manage the customers addresses."
+UserStory CreateCustomerAddresses {
+ As an "Insurance Employee"
+ I want to "create" an "Address" for a "Customer"
+ I want to "update" an "Address" for a "Customer"
+ so that "I am able to manage the customers addresses."
}
-Entity Customer {
- aggregateRoot
-
- SocialInsuranceNumber sin
- String firstname
- String lastname
- List<Address> addresses
+```cml
+Entity Customer {
+ aggregateRoot
+
+ SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ List addresses
}
-Aggregate Customers {
- Entity Customer {
- aggregateRoot
-
- - SocialInsuranceNumber sin // Reference syntax for simple attribute
- String firstname
- String lastname
- - List<Address> addresses // Reference syntax for collections
+```cml
+Aggregate Customers {
+ Entity Customer {
+ aggregateRoot
+
+ - SocialInsuranceNumber sin // Reference syntax for simple attribute
+ String firstname
+ String lastname
+ - List addresses // Reference syntax for collections
}
-
- Entity Address {
- String street
- int postalCode
- String city
+
+ Entity Address {
+ String street
+ int postalCode
+ String city
}
-
- ValueObject SocialInsuranceNumber {
- String sin key
+
+ ValueObject SocialInsuranceNumber {
+ String sin key
}
}
-Entity Customer {
- aggregateRoot
-
- - SocialInsuranceNumber sin
- String firstname
- String lastname
- - List<Address> addresses
-
- def AddressId createAddress(Address address);
- def void changeCustomer(Customer customer, Address address);
+```cml
+Entity Customer {
+ aggregateRoot
+
+ - SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ - List addresses
+
+ def AddressId createAddress(Address address);
+ def void changeCustomer(Customer customer, Address address);
}
-Aggregate Customers {
- Entity Customer {
- aggregateRoot
-
- - SocialInsuranceNumber sin
- String firstname
- String lastname
- - List<Address> addresses
-
- def @AddressId createAddress(@Address address); // Method/Operation declaration with references
- def void changeCustomer(@Customer customer, @Address address); // Method/Operation declaration with references
+```cml
+Aggregate Customers {
+ Entity Customer {
+ aggregateRoot
+
+ - SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ - List addresses
+
+ def @AddressId createAddress(@Address address); // Method/Operation declaration with references
+ def void changeCustomer(@Customer customer, @Address address); // Method/Operation declaration with references
}
-
- Entity Address {
- String street
- int postalCode
- String city
+
+ Entity Address {
+ String street
+ int postalCode
+ String city
}
-
- ValueObject SocialInsuranceNumber {
- String sin key
+
+ ValueObject SocialInsuranceNumber {
+ String sin key
}
-
- ValueObject AddressId {
- int id
+
+ ValueObject AddressId {
+ int id
}
}
-ValueObject HandlingHistory {
- - List<HandlingEvent> handlingEvents
+```cml
+ValueObject HandlingHistory {
+ - List handlingEvents
}
- DomainEvent HandlingEvent {
- Type handlingType;
- - Voyage voyage;
- - LocationShared location;
- Date completionTime;
- Date registrationTime;
- - Cargo cargo;
+```cml
+DomainEvent HandlingEvent {
+ Type handlingType;
+ - Voyage voyage;
+ - LocationShared location;
+ Date completionTime;
+ Date registrationTime;
+ - Cargo cargo;
}
-Command RejectClaim {
+```cml
+Command RejectClaim {
- Claim claim2Reject
- Employee decisionMaker
- String reason4Rejection
+ String reason4Rejection
}
-Service RoutingService {
- List<@Itinerary> fetchRoutesForSpecification(@RouteSpecification routeSpecification) throws LocationNotFoundException;
+```cml
+Service RoutingService {
+ List<@Itinerary> fetchRoutesForSpecification(@RouteSpecification routeSpecification) throws LocationNotFoundException;
}
-Aggregate Location {
- Entity Location {
- aggregateRoot
-
- PortCode portcode
- - UnLocode unLocode;
- String name;
-
- Repository LocationRepository {
+```cml
+Aggregate Location {
+ Entity Location {
+ aggregateRoot
+
+ PortCode portcode
+ - UnLocode unLocode;
+ String name;
+
+ Repository LocationRepository {
@Location find(@UnLocode unLocode);
- List<@Location> findAll();
+ List<@Location> findAll();
}
}
-
- ValueObject UnLocode {
- String unLocode
+
+ ValueObject UnLocode {
+ String unLocode
}
-
- ValueObject LocationShared {
- PortCode portCode
- - Location location
+
+ ValueObject LocationShared {
+ PortCode portCode
+ - Location location
}
}
-UseCase UC1_Example {
- actor = "Insurance Employee"
- interactions = create a "Customer", update a "Customer", "offer" a "Contract"
- benefit = "I am able to manage the customers data and offer them insurance contracts."
+```cml
+UseCase UC1_Example {
+ actor = "Insurance Employee"
+ interactions = create a "Customer", update a "Customer", "offer" a "Contract"
+ benefit = "I am able to manage the customers data and offer them insurance contracts."
}
-UseCase UC1_Example {
- actor "Insurance Employee"
- interactions
- create a "Customer" with its "firstname", "lastname",
- update an "Address" for a "Customer",
- "offer" a "Contract" for a "Customer"
- benefit "I am able to manage the customers data and offer them insurance contracts."
+```cml
+UseCase UC1_Example {
+ actor "Insurance Employee"
+ interactions
+ create a "Customer" with its "firstname", "lastname",
+ update an "Address" for a "Customer",
+ "offer" a "Contract" for a "Customer"
+ benefit "I am able to manage the customers data and offer them insurance contracts."
}
-UseCase Get_paid_for_car_accident { // title
- actor "Claimant" // primary actor
- scope "Insurance company" // scope
- level "Summary" // level
- benefit "A claimant submits a claim and and gets paid from the insurance company." // story (brief summary)
+```cml
+UseCase Get_paid_for_car_accident { // title
+ actor "Claimant" // primary actor
+ scope "Insurance company" // scope
+ level "Summary" // level
+ benefit "A claimant submits a claim and and gets paid from the insurance company." // story (brief summary)
}
-UseCase Get_paid_for_car_accident { // title
- actor "Claimant" // primary actor
- scope "Insurance company" // scope
- level "Summary" // level
- benefit "A claimant submits a claim and and gets paid from the insurance company." // story (brief summary)
- interactions
- "submit" a "Claim", // step 1: claimant submits claim
- "verifyExistanceOf" "Policy", // step 2: insurance company verifies that valid policy exists
- "assign" an "Agent" for a "Claim", // step 3: agent is assigned to claim
- "verify" "Policy", // step 4: agent verifies all details are within policy guidelines
- "pay" "Claimant", // step 5 (1): claimant gets paid
- "close" "Claim" // step 5 (2): file/claim gets closed
+```cml
+UseCase Get_paid_for_car_accident { // title
+ actor "Claimant" // primary actor
+ scope "Insurance company" // scope
+ level "Summary" // level
+ benefit "A claimant submits a claim and and gets paid from the insurance company." // story (brief summary)
+ interactions
+ "submit" a "Claim", // step 1: claimant submits claim
+ "verifyExistanceOf" "Policy", // step 2: insurance company verifies that valid policy exists
+ "assign" an "Agent" for a "Claim", // step 3: agent is assigned to claim
+ "verify" "Policy", // step 4: agent verifies all details are within policy guidelines
+ "pay" "Claimant", // step 5 (1): claimant gets paid
+ "close" "Claim" // step 5 (2): file/claim gets closed
}
-UseCase UC1_Example {
- actor = "Insurance Employee"
- secondaryActors = "Insurance Administrator", "Sales Person"
- interactions = create a "Customer", update a "Customer", "offer" a "Contract"
- benefit = "I am able to manage the customers data and offer them insurance contracts."
+```cml
+UseCase UC1_Example {
+ actor = "Insurance Employee"
+ secondaryActors = "Insurance Administrator", "Sales Person"
+ interactions = create a "Customer", update a "Customer", "offer" a "Contract"
+ benefit = "I am able to manage the customers data and offer them insurance contracts."
}
-UserStory US1_Example {
- As an "Insurance Employee"
- I want to "create" a "Customer" with its "firstname", "lastname" // attributes are optional ('with its' part)
- I want to "update" an "Address" for a "Customer" // reference is optional ('for a' part)
- I want to "offer" a "Contract" for a "Customer" // reference is optional ('for a' part)
- so that "I am able to manage the customers data and offer them insurance contracts."
+```cml
+UserStory US1_Example {
+ As an "Insurance Employee"
+ I want to "create" a "Customer" with its "firstname", "lastname" // attributes are optional ('with its' part)
+ I want to "update" an "Address" for a "Customer" // reference is optional ('for a' part)
+ I want to "offer" a "Contract" for a "Customer" // reference is optional ('for a' part)
+ so that "I am able to manage the customers data and offer them insurance contracts."
}
-UserStory SampleStory {
- As a "prospective customer of Lakeside Mutual" // a fictitious insurance company
- I want to "manage" the "PersonalDataProfile"
- so that "I am offered a valid and fair insurance rate"
- and that "data privacy" is promoted
- accepting that "accountability and auditability" are harmed
-}
-BoundedContext Online_Shop_Same_Day_Delivery
+```cml
+BoundedContext Online_Shop_Same_Day_Delivery
-ValueRegister SDD_Stakeholder_Values for Online_Shop_Same_Day_Delivery {
- // model values inside value register
-}
-ValueRegister SDD_Stakeholder_Values {
- // model values inside value register
-}
-ValueRegister SDD_Stakeholder_Values {
-
- Value Privacy
- Value Respect
- Value Integrity
- Value Love
- // etc.
+```cml
+ValueRegister SDD_Stakeholder_Values {
-}
-ValueRegister SDD_Stakeholder_Values {
-
- Value Privacy {
- isCore
+```cml
+ValueRegister SDD_Stakeholder_Values {
- demonstrator = "right to be left alone"
- demonstrator = "the right to refuse sharing private data"
- relatedValue = "Intimacy"
- opposingValue = "Transparency"
- opposingValue = "Inclusiveness"
- }
+ Value Privacy {
+ isCore
-}
-ValueRegister SDD_Stakeholder_Values {
-
- Value Privacy {
- isCore
+```cml
+ValueRegister SDD_Stakeholder_Values {
- demonstrator "right to be left alone"
- demonstrator "the right to refuse sharing private data"
- relatedValue "Intimacy"
- opposingValue "Transparency"
- opposingValue "Inclusiveness"
- }
+ Value Privacy {
+ isCore
-}
-ValueRegister SDD_Stakeholder_Values {
-
- ValueCluster Privacy {
- core PRIVACY
+```cml
+ValueRegister SDD_Stakeholder_Values {
- Value Confidentiality {
- demonstrator = "right to be left alone"
- }
- }
+ ValueCluster Privacy {
+ core PRIVACY
-}
-ValueRegister SDD_Stakeholder_Values {
-
- ValueCluster MyCluster {
- core "Respect"
- }
+```cml
+ValueRegister SDD_Stakeholder_Values {
-}
-ValueRegister SDD_Stakeholder_Values {
-
- ValueCluster Privacy {
- core PRIVACY
+```cml
+ValueRegister SDD_Stakeholder_Values {
- demonstrator = "right to be left alone"
- demonstrator = "the right to refuse sharing private data"
- relatedValue = "Intimacy"
- opposingValue = "Transparency"
- opposingValue = "Inclusiveness"
- }
+ ValueCluster Privacy {
+ core PRIVACY
-}
-BoundedContext SameDayDelivery
-
-Stakeholders of SameDayDelivery {
- StakeholderGroup Customers_and_Shoppers
- StakeholderGroup Delivery_Staff_of_Suppliers
-}
-
-ValueRegister SD_Values for SameDayDelivery {
- Value Freedom {
- Stakeholder Customers_and_Shoppers {
- priority HIGH
- impact MEDIUM
- consequences
- good "increased freedom"
- }
- Stakeholder Delivery_Staff_of_Suppliers {
- priority HIGH
- impact HIGH
- consequences
- bad "work-life-balance"
- }
- }
-}
-BoundedContext SameDayDelivery
-
-Stakeholders of SameDayDelivery {
- StakeholderGroup Customers_and_Shoppers
- StakeholderGroup Delivery_Staff_of_Suppliers
-}
-
-ValueRegister SD_Values for SameDayDelivery {
- ValueCluster Freedom {
- core AUTONOMY
- Stakeholder Customers_and_Shoppers {
- priority HIGH
- impact MEDIUM
- consequences
- good "increased freedom"
- }
- Stakeholder Delivery_Staff_of_Suppliers {
- priority HIGH
- impact HIGH
- consequences
- bad "work-life-balance"
- }
- }
-}
-BoundedContext SameDayDelivery
-
-Stakeholders of SameDayDelivery {
- StakeholderGroup Drivers
-}
-
-ValueRegister SD_Values for SameDayDelivery {
- Value WorkLifeBalance {
- demonstrator "Drivers value a healthy work-life-balance"
- Stakeholder Drivers {
- priority HIGH
- impact HIGH
- consequences
- bad "SDD will harm work-life-balance of drivers"
- action "hire more drivers" ACT
- }
- }
-}
-Stakeholders {
- Stakeholder Conference_Participant
-}
-
-ValueRegister Conference_Management_Sample {
- ValueEpic Data_Privacy {
- As a Conference_Participant
- I value "data privacy"
- as demonstrated in
- realization of "confidentiality of sensitive personal information such as my passport number"
- reduction of "efficiency of operations for conference mansagement staff"
- }
-
- ValueWeigthing Data_Privacy {
- In the context of the SOI,
- stakeholder Conference_Participant values "data privacy" more than "efficiency from a registration management staff point of view"
- expecting benefits such as "confidentiality of sensitive personal information"
- running the risk of harms such as "higher conference fees and a slower registration process."
- }
-}
-
-ValueRegister Same_Day_Delivery_Sample {
- ValueNarrative Sample_Narrative {
- When the SOI executes "the same say delivery epic (incl. split user stories that meet the INVEST criteria)",
- stakeholders expect it to promote, protect or create "freedom and quality of life",
- possibly degrading or prohibiting "work-life balance of suppliers and shopper privacy"
- with the following externally observable and/or internally auditable behavior:
-
- "Given: Shop is operational and suited suppliers and logistics firms are available.
- When: Same day delivery is promised during order acceptance and confirmation.
- Then: Order arrives at shipment address until 11:59pm on the same say."
- }
-}
-UserStory US1_Example {
- As an "Insurance Employee" I want to "create" a "Customer" so that "I am able to manage customer data ..."
+```cml
+UserStory US1_Example {
+ As an "Insurance Employee" I want to "create" a "Customer" so that "I am able to manage customer data ..."
}
-UseCase UC1_Example {
- actor = "Insurance Employee"
- interactions = "create" a "Customer"
- benefit = "I am able to manage customer data ..."
+UseCase UC1_Example {
+ actor = "Insurance Employee"
+ interactions = "create" a "Customer"
+ benefit = "I am able to manage customer data ..."
}
-UserStory US1_Example {
- As an "Insurance Employee"
- I want to "create" a "Customer"
- I want to "update" a "Customer"
- I want to "offer" a "Contract"
- so that "I am able to manage the customers data and offer them insurance contracts."
+```cml
+UserStory US1_Example {
+ As an "Insurance Employee"
+ I want to "create" a "Customer"
+ I want to "update" a "Customer"
+ I want to "offer" a "Contract"
+ so that "I am able to manage the customers data and offer them insurance contracts."
}
-UseCase UC1_Example {
- actor = "Insurance Employee"
- interactions = "create" a "Customer", "update" a "Customer", "offer" a "Contract"
- benefit = "I am able to manage the customers data and offer them insurance contracts."
+UseCase UC1_Example {
+ actor = "Insurance Employee"
+ interactions = "create" a "Customer", "update" a "Customer", "offer" a "Contract"
+ benefit = "I am able to manage the customers data and offer them insurance contracts."
}
-Domain InsuranceDomain {
- Subdomain CustomerDomain {
- domainVisionStatement "Aims at promoting the following benefit for a Insurance Employee: I am able to manage the customers data and offer them insurance contracts."
- Entity Customer
- Entity Contract
- Service US1_ExampleService {
+```cml
+Domain InsuranceDomain {
+ Subdomain CustomerDomain {
+ domainVisionStatement "Aims at promoting the following benefit for a Insurance Employee: I am able to manage the customers data and offer them insurance contracts."
+ Entity Customer
+ Entity Contract
+ Service US1_ExampleService {
createCustomer;
updateCustomer;
offerContract;
}
}
}
-BoundedContext NewContextFromSubdomains implements CustomerDomain {
- domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerDomain"
- /* This Aggregate contains the entities and services of the 'CustomerDomain' subdomain.
- * TODO: You can now refactor the Aggregate, for example by using the 'Split Aggregate by Entities' architectural refactoring.
- * TODO: Add attributes and operations to the entities.
- * TODO: Add operations to the services.
- * Find examples and further instructions on our website: https://contextmapper.org/docs/rapid-ooad/ */
- Aggregate CustomerDomainAggregate {
- Service US1_ExampleService {
+```cml
+BoundedContext NewContextFromSubdomains implements CustomerDomain {
+ domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerDomain"
+ /* This Aggregate contains the entities and services of the 'CustomerDomain' subdomain.
+ * TODO: You can now refactor the Aggregate, for example by using the 'Split Aggregate by Entities' architectural refactoring.
+ * TODO: Add attributes and operations to the entities.
+ * TODO: Add operations to the services.
+ * Find examples and further instructions on our website: https://contextmapper.org/docs/rapid-ooad/ */
+ Aggregate CustomerDomainAggregate {
+ Service US1_ExampleService {
CreateCustomerOutput createCustomer (CreateCustomerInput input);
UpdateCustomerOutput updateCustomer (UpdateCustomerInput input);
OfferContractOutput offerContract (OfferContractInput input);
}
- Entity Customer {
+ Entity Customer {
CustomerID customerId
}
- Entity Contract {
+ Entity Contract {
ContractID contractId
}
}
}
-ContextMap {
- contains CustomerManagementFrontend
- contains CustomerManagementBackend
+```cml
+ContextMap {
+ contains CustomerManagementFrontend
+ contains CustomerManagementBackend
- CustomerManagementBackend [PL] -> [CF] CustomerManagementFrontend {
- implementationTechnology "RESTful HTTP"
- exposedAggregates CustomerManagementAggregateBackend
+ CustomerManagementBackend [PL] -> [CF] CustomerManagementFrontend {
+ implementationTechnology "RESTful HTTP"
+ exposedAggregates CustomerManagementAggregateBackend
}
}
-BoundedContext CustomerManagementBackend implements CustomerManagement {
- domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerManagement"
- type SYSTEM
- implementationTechnology "Sprint Boot"
- Aggregate CustomerManagementAggregateBackend {
- Service US1_ExampleService {
+BoundedContext CustomerManagementBackend implements CustomerManagement {
+ domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerManagement"
+ type SYSTEM
+ implementationTechnology "Sprint Boot"
+ Aggregate CustomerManagementAggregateBackend {
+ Service US1_ExampleService {
CreateCustomerOutput createCustomer (CreateCustomerInput input);
UpdateCustomerOutput updateCustomer (UpdateCustomerInput input);
OfferContractOutput offerContract (OfferContractInput input);
}
- Entity CustomerBackend {
+ Entity CustomerBackend {
CustomerID customerId
}
- Entity ContractBackend {
+ Entity ContractBackend {
ContractID contractId
}
}
}
-BoundedContext CustomerManagementFrontend implements CustomerManagement {
- domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerManagement"
- type SYSTEM
- implementationTechnology "Angular"
- Aggregate CustomerManagementAggregateViewModel {
- Service US1_ExampleService {
+BoundedContext CustomerManagementFrontend implements CustomerManagement {
+ domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerManagement"
+ type SYSTEM
+ implementationTechnology "Angular"
+ Aggregate CustomerManagementAggregateViewModel {
+ Service US1_ExampleService {
CreateCustomerOutput createCustomer (CreateCustomerInput input);
UpdateCustomerOutput updateCustomer (UpdateCustomerInput input);
OfferContractOutput offerContract (OfferContractInput input);
}
- Entity CustomerViewModel {
+ Entity CustomerViewModel {
CustomerID customerId
}
- Entity ContractViewModel {
+ Entity ContractViewModel {
ContractID contractId
}
}
}
-ContextMap {
- contains CustomerManagementFrontend
- contains CustomerManagementDomainLogic
- contains CustomerManagementDatabase
+```cml
+ContextMap {
+ contains CustomerManagementFrontend
+ contains CustomerManagementDomainLogic
+ contains CustomerManagementDatabase
- CustomerManagementDomainLogic [PL] -> [CF] CustomerManagementFrontend {
- implementationTechnology "RESTful HTTP"
- exposedAggregates CustomerManagementAggregateBackend
+ CustomerManagementDomainLogic [PL] -> [CF] CustomerManagementFrontend {
+ implementationTechnology "RESTful HTTP"
+ exposedAggregates CustomerManagementAggregateBackend
}
- CustomerManagementDatabase [PL] -> [CF] CustomerManagementDomainLogic {
- implementationTechnology "JDBC"
+ CustomerManagementDatabase [PL] -> [CF] CustomerManagementDomainLogic {
+ implementationTechnology "JDBC"
}
}
-BoundedContext CustomerManagementFrontend implements CustomerManagement {
- domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerManagement"
- type SYSTEM
- implementationTechnology "Angular"
- Aggregate CustomerManagementAggregateViewModel {
- Service US1_ExampleService {
+BoundedContext CustomerManagementFrontend implements CustomerManagement {
+ domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerManagement"
+ type SYSTEM
+ implementationTechnology "Angular"
+ Aggregate CustomerManagementAggregateViewModel {
+ Service US1_ExampleService {
CreateCustomerOutput createCustomer (CreateCustomerInput input);
UpdateCustomerOutput updateCustomer (UpdateCustomerInput input);
OfferContractOutput offerContract (OfferContractInput input);
}
- Entity CustomerViewModel {
+ Entity CustomerViewModel {
CustomerID customerId
}
- Entity ContractViewModel {
+ Entity ContractViewModel {
ContractID contractId
}
}
}
-BoundedContext CustomerManagementDomainLogic implements CustomerManagement {
- domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerManagement"
- type SYSTEM
- implementationTechnology "Sprint Boot"
- Aggregate CustomerManagementAggregateBackend {
- Service US1_ExampleService {
+BoundedContext CustomerManagementDomainLogic implements CustomerManagement {
+ domainVisionStatement "This Bounded Context realizes the following subdomains: CustomerManagement"
+ type SYSTEM
+ implementationTechnology "Sprint Boot"
+ Aggregate CustomerManagementAggregateBackend {
+ Service US1_ExampleService {
CreateCustomerOutput createCustomer (CreateCustomerInput input);
UpdateCustomerOutput updateCustomer (UpdateCustomerInput input);
OfferContractOutput offerContract (OfferContractInput input);
}
- Entity CustomerBackend {
+ Entity CustomerBackend {
CustomerID customerId
}
- Entity ContractBackend {
+ Entity ContractBackend {
ContractID contractId
}
}
}
-BoundedContext CustomerManagementDatabase {
- type SYSTEM
- implementationTechnology "JDBC"
+BoundedContext CustomerManagementDatabase {
+ type SYSTEM
+ implementationTechnology "JDBC"
}
-UserStory Account_Admin_Story {
- As an "Admin" I want to "manage" an "Account" so that "can enable users to work with the system."
+```cml
+UserStory Account_Admin_Story {
+ As an "Admin" I want to "manage" an "Account" so that "can enable users to work with the system."
}
-UserStory Account_Admin_Story split by Account_Admin_Story_Split {
- As an "Admin" I want to "manage" an "Account" so that "can enable users to work with the system."
+```cml
+UserStory Account_Admin_Story split by Account_Admin_Story_Split {
+ As an "Admin" I want to "manage" an "Account" so that "can enable users to work with the system."
}
-UserStory Account_Admin_Story_Split {
- As an "Admin"
- I want to "cancel" an "Account"
- I want to "edit" an "Account"
- I want to create an "Account"
- so that "can enable users to work with the system."
+UserStory Account_Admin_Story_Split {
+ As an "Admin"
+ I want to "cancel" an "Account"
+ I want to "edit" an "Account"
+ I want to create an "Account"
+ so that "can enable users to work with the system."
}
-ContextMap {
- contains PolicyManagement
- contains CustomerManagement
- contains CustomerSelfService
- contains CustomerCore
+```cml
+ContextMap {
+ contains PolicyManagement
+ contains CustomerManagement
+ contains CustomerSelfService
+ contains CustomerCore
- CustomerCore -> PolicyManagement
+ CustomerCore -> PolicyManagement
- CustomerCore -> CustomerManagement
+ CustomerCore -> CustomerManagement
- PolicyManagement -> CustomerSelfService
+ PolicyManagement -> CustomerSelfService
- CustomerCore -> CustomerSelfService
+ CustomerCore -> CustomerSelfService
}
-BoundedContext PolicyManagement {
- implementationTechnology "Spring Boot"
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.policymanagement.interfaces.RiskComputationService.
- Aggregate riskfactor
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.policymanagement.interfaces.InsuranceQuoteRequestInformationHolder.
- Aggregate PolicyManagement_insurance_quote_requests {
- /* removed to save space here */
+BoundedContext PolicyManagement {
+ implementationTechnology "Spring Boot"
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.policymanagement.interfaces.RiskComputationService.
+ Aggregate riskfactor
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.policymanagement.interfaces.InsuranceQuoteRequestInformationHolder.
+ Aggregate PolicyManagement_insurance_quote_requests {
+ /* removed to save space here */
}
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.policymanagement.interfaces.PolicyInformationHolder.
- Aggregate policies {
- /* removed to save space here */
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.policymanagement.interfaces.PolicyInformationHolder.
+ Aggregate policies {
+ /* removed to save space here */
}
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.policymanagement.interfaces.CustomerInformationHolder.
- Aggregate PolicyManagement_customers {
- /* removed to save space here */
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.policymanagement.interfaces.CustomerInformationHolder.
+ Aggregate PolicyManagement_customers {
+ /* removed to save space here */
}
}
-BoundedContext CustomerManagement {
- implementationTechnology "Spring Boot"
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customermanagement.interfaces.CustomerInformationHolder.
- Aggregate CustomerManagement_customers {
- /* removed to save space here */
+BoundedContext CustomerManagement {
+ implementationTechnology "Spring Boot"
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customermanagement.interfaces.CustomerInformationHolder.
+ Aggregate CustomerManagement_customers {
+ /* removed to save space here */
}
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customermanagement.interfaces.InteractionLogInformationHolder.
- Aggregate interaction_logs {
- /* removed to save space here */
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customermanagement.interfaces.InteractionLogInformationHolder.
+ Aggregate interaction_logs {
+ /* removed to save space here */
}
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customermanagement.interfaces.NotificationInformationHolder.
- Aggregate notifications
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customermanagement.interfaces.NotificationInformationHolder.
+ Aggregate notifications
}
-BoundedContext CustomerSelfService {
- implementationTechnology "Spring Boot"
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.AuthenticationController.
- Aggregate auth
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.CityStaticDataHolder.
- Aggregate cities {
- /* removed to save space here */
+BoundedContext CustomerSelfService {
+ implementationTechnology "Spring Boot"
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.AuthenticationController.
+ Aggregate auth
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.CityStaticDataHolder.
+ Aggregate cities {
+ /* removed to save space here */
}
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.InsuranceQuoteRequestInformationHolder.
- Aggregate insurance_quote_requests {
- /* removed to save space here */
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.InsuranceQuoteRequestInformationHolder.
+ Aggregate insurance_quote_requests {
+ /* removed to save space here */
}
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.CustomerInformationHolder.
- Aggregate customers {
- /* removed to save space here */
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.CustomerInformationHolder.
+ Aggregate customers {
+ /* removed to save space here */
}
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.UserInformationHolder.
- Aggregate user {
- /* removed to save space here */
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customerselfservice.interfaces.UserInformationHolder.
+ Aggregate user {
+ /* removed to save space here */
}
}
-BoundedContext CustomerCore {
- implementationTechnology "Spring Boot"
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customercore.interfaces.CityStaticDataHolder.
- Aggregate CustomerCore_cities {
- /* removed to save space here */
+BoundedContext CustomerCore {
+ implementationTechnology "Spring Boot"
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customercore.interfaces.CityStaticDataHolder.
+ Aggregate CustomerCore_cities {
+ /* removed to save space here */
}
- // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customercore.interfaces.CustomerInformationHolder.
- Aggregate CustomerCore_customers {
- /* removed to save space here */
+ // This Aggregate has been created on the basis of the Spring REST controller com.lakesidemutual.customercore.interfaces.CustomerInformationHolder.
+ Aggregate CustomerCore_customers {
+ /* removed to save space here */
}
}
-BoundedContext eCommerceContext {
+```cml
+BoundedContext eCommerceContext {
- Aggregate Product {
- Entity Product {
- aggregateRoot
+ Aggregate Product {
+ Entity Product {
+ aggregateRoot
- - ProductId id;
- String name;
- String description;
- double price;
+ - ProductId id;
+ String name;
+ String description;
+ double price;
}
- ValueObject ProductId {
- String value;
+ ValueObject ProductId {
+ String value;
}
}
- Aggregate Order {
- Entity Order {
- aggregateRoot
+ Aggregate Order {
+ Entity Order {
+ aggregateRoot
- - OrderId id;
- - UserId purchaserId;
- - List<OrderItem> items;
- DateTime ordered;
+ - OrderId id;
+ - UserId purchaserId;
+ - List items;
+ DateTime ordered;
}
- ValueObject OrderItem {
- - ProductId productId;
- int amount;
+ ValueObject OrderItem {
+ - ProductId productId;
+ int amount;
}
- ValueObject OrderId {
- String value;
+ ValueObject OrderId {
+ String value;
}
}
- Aggregate User {
- Entity User {
- aggregateRoot
+ Aggregate User {
+ Entity User {
+ aggregateRoot
- - UserId id;
- String name;
- String ^email;
+ - UserId id;
+ String name;
+ String ^email;
}
- ValueObject UserId {
- String value;
+ ValueObject UserId {
+ String value;
}
}
}
- ContextMap InsuranceContextMap {
- type = SYSTEM_LANDSCAPE
- state = TO_BE
+```cml
+ContextMap InsuranceContextMap {
+ type = SYSTEM_LANDSCAPE
+ state = TO_BE
- contains CustomerManagement, CustomerSelfService, Printing
- contains PolicyManagement, RiskManagement, DebtCollection
+ contains CustomerManagement, CustomerSelfService, Printing
+ contains PolicyManagement, RiskManagement, DebtCollection
- CustomerSelfService [D,C]<-[U,S] CustomerManagement {
- exposedAggregates = Customers
+ CustomerSelfService [D,C]<-[U,S] CustomerManagement {
+ exposedAggregates = Customers
}
- CustomerManagement [D,ACL]<-[U,OHS,PL] Printing {
- implementationTechnology = "SOAP"
- downstreamRights = INFLUENCER
- exposedAggregates = Printing
+ CustomerManagement [D,ACL]<-[U,OHS,PL] Printing {
+ implementationTechnology = "SOAP"
+ downstreamRights = INFLUENCER
+ exposedAggregates = Printing
}
- Printing [U,OHS,PL]->[D,ACL] PolicyManagement {
- implementationTechnology = "SOAP"
- exposedAggregates = Printing
+ Printing [U,OHS,PL]->[D,ACL] PolicyManagement {
+ implementationTechnology = "SOAP"
+ exposedAggregates = Printing
}
- RiskManagement [P]<->[P] PolicyManagement {
- implementationTechnology = "RabbitMQ"
+ RiskManagement [P]<->[P] PolicyManagement {
+ implementationTechnology = "RabbitMQ"
}
- PolicyManagement [D,CF]<-[U,OHS,PL] CustomerManagement {
- implementationTechnology = "RESTfulHTTP"
- exposedAggregates = Customers
+ PolicyManagement [D,CF]<-[U,OHS,PL] CustomerManagement {
+ implementationTechnology = "RESTfulHTTP"
+ exposedAggregates = Customers
}
- DebtCollection [D,ACL]<-[U,OHS,PL] Printing {
- implementationTechnology = "SOAP"
- exposedAggregates = Printing
+ DebtCollection [D,ACL]<-[U,OHS,PL] Printing {
+ implementationTechnology = "SOAP"
+ exposedAggregates = Printing
}
- PolicyManagement [SK]<->[SK] DebtCollection {
- implementationTechnology = "Shared Java Library, Communication over RESTful HTTP"
+ PolicyManagement [SK]<->[SK] DebtCollection {
+ implementationTechnology = "Shared Java Library, Communication over RESTful HTTP"
}
}
-BoundedContext CustomerManagement implements CustomerManagementDomain {
- type = SYSTEM
- domainVisionStatement = "The customer management context is responsible for managing all the data of the insurance companies customers."
- implementationTechnology = "Java, JEE Application"
- responsibilities = "Customers, Addresses"
+```cml
+BoundedContext CustomerManagement implements CustomerManagementDomain {
+ type = SYSTEM
+ 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
+ Aggregate Customers {
+ Entity Customer {
+ aggregateRoot
- - SocialInsuranceNumber sin
- String firstname
- String lastname
- - List<Address> addresses
+ - SocialInsuranceNumber sin
+ String firstname
+ String lastname
+ - List addresses
- def AddressId createAddress(@Address address);
- def boolean changeCustomer(String firstname, String lastname);
+ def AddressId createAddress(@Address address);
+ def boolean changeCustomer(String firstname, String lastname);
}
- Entity Address {
- String street
- int postalCode
- String city
+ Entity Address {
+ String street
+ int postalCode
+ String city
}
- ValueObject SocialInsuranceNumber {
- String sin key
+ ValueObject SocialInsuranceNumber {
+ String sin key
}
}
}
-BoundedContext CargoTracking {
- Aggregate Cargo {
- owner CargoPlaner
-
- Entity Cargo {
- aggregateRoot
- - TrackingId trackingId
- - Location origin
- - RouteSpecification routeSpecification
- - Itinerary itinerary
- - Delivery delivery
+```cml
+BoundedContext CargoTracking {
+ Aggregate Cargo {
+ owner CargoPlaner
+
+ Entity Cargo {
+ aggregateRoot
+ - TrackingId trackingId
+ - Location origin
+ - RouteSpecification routeSpecification
+ - Itinerary itinerary
+ - Delivery delivery
}
- /* shortened Aggregate here */
+ /* shortened Aggregate here */
}
- Aggregate Location {
- owner Administrators
+ Aggregate Location {
+ owner Administrators
- Entity Location {
- aggregateRoot
- - UnLocode unLocode
- String name
+ Entity Location {
+ aggregateRoot
+ - UnLocode unLocode
+ String name
}
- /* shortened Aggregate here */
+ /* shortened Aggregate here */
}
- Aggregate Handling {
- owner CargoTracker
-
- DomainEvent HandlingEvent {
- - HandlingEventType handlingEventType
- - Voyage voyage
- - Location location
- Date completionTime
- Date registrationTime
- - Cargo cargo
+ Aggregate Handling {
+ owner CargoTracker
+
+ DomainEvent HandlingEvent {
+ - HandlingEventType handlingEventType
+ - Voyage voyage
+ - Location location
+ Date completionTime
+ Date registrationTime
+ - Cargo cargo
}
- /* shortened Aggregate here */
+ /* shortened Aggregate here */
}
- Aggregate Voyage {
- owner VoyageManager
+ Aggregate Voyage {
+ owner VoyageManager
- Entity Voyage {
- aggregateRoot
- - VoyageNumber voyageNumber
- - Schedule schedule
+ Entity Voyage {
+ aggregateRoot
+ - VoyageNumber voyageNumber
+ - Schedule schedule
}
- /* shortened Aggregate here */
+ /* shortened Aggregate here */
}
}
-UseCase ViewTracking {
- interactions
- read "Cargo" with its "trackindId",
- read "HandlingEvent" with its "handlingEventType", "location", "completionTime",
- read "Delivery" with its "transportStatus", "estimatedArrivalTime", "misdirected",
- read "Voyage" with its "voyageNumber",
- read "RouteSpecification" with its "destination"
+```cml
+UseCase ViewTracking {
+ interactions
+ read "Cargo" with its "trackindId",
+ read "HandlingEvent" with its "handlingEventType", "location", "completionTime",
+ read "Delivery" with its "transportStatus", "estimatedArrivalTime", "misdirected",
+ read "Voyage" with its "voyageNumber",
+ read "RouteSpecification" with its "destination"
}
-UseCase ViewCargos {
- interactions
- read "Cargo" with its "trackingId",
- read "RouteSpecification" with its "destination", "arrivalDeadline",
- read "Delivery" with its "routingStatus"
+UseCase ViewCargos {
+ interactions
+ read "Cargo" with its "trackingId",
+ read "RouteSpecification" with its "destination", "arrivalDeadline",
+ read "Delivery" with its "routingStatus"
}
-UseCase BookCargo {
- interactions
- read "Location" with its "unLocode",
- update "Cargo" with its "trackingId",
- update "RouteSpecification" with its "origin", "arrivalDeadline", "destination"
+UseCase BookCargo {
+ interactions
+ read "Location" with its "unLocode",
+ update "Cargo" with its "trackingId",
+ update "RouteSpecification" with its "origin", "arrivalDeadline", "destination"
}
-UseCase ChangeCargoDestination {
- interactions
- read "Cargo" with its "trackingId",
- read "RouteSpecification" with its "destination",
- update "RouteSpecification" with its "destination"
+UseCase ChangeCargoDestination {
+ interactions
+ read "Cargo" with its "trackingId",
+ read "RouteSpecification" with its "destination",
+ update "RouteSpecification" with its "destination"
}
-/* we shortened this listing to save space (find all use cases in the original CML file) */
-BoundedContext CargoTracking {
- Aggregate Cargo {
- owner CargoPlaner
+```cml
+BoundedContext CargoTracking {
+ Aggregate Cargo {
+ owner CargoPlaner
- /* removed content here to save space */
+ /* removed content here to save space */
}
- Aggregate Location {
- owner Administrators
+ Aggregate Location {
+ owner Administrators
- /* removed content here to save space */
+ /* removed content here to save space */
}
- Aggregate Handling {
- owner CargoTracker
+ Aggregate Handling {
+ owner CargoTracker
- /* removed content here to save space */
+ /* removed content here to save space */
}
- Aggregate Voyage {
- owner VoyageManager
+ Aggregate Voyage {
+ owner VoyageManager
- /* removed content here to save space */
+ /* removed content here to save space */
}
}
-/* team definitions: */
-BoundedContext CargoPlaner { type TEAM }
-BoundedContext CargoTracker { type TEAM }
-BoundedContext VoyageManager { type TEAM }
-BoundedContext Administrators { type TEAM }
-