Insurance Company Example
This example illustrates the Context Mapper DSL capabilities on the basis of a fictitious insurance company scenario. The bounded contexts are partially inspired by the Lakeside Mutual project. Note that the goal of the example is to give a representative overview over the DSL's context mapping features. The contexts and their relationships may differ considerably in a real-world insurance company.
The following figure illustrates the Context Map in the same representation as it done by Vernon and Brandolini. You can find the corresponding context map in CML (Context Mapper Language) here. Use the ContextMapper Eclipse plugin for better readability due to syntax highlighting and tool support (Eclipse Update Site).
- Context Mapper File: Insurance-Example_Context-Map.cml
- Alternative Relationship Syntax: Insurance-Example_Context-Map_Alternative-Relationship-Syntax.cml
- ServiceCutter User Representations File (for ServiceCutter integration): Insurance-Example_Context-Map_user-representations.scl (just an example, can be regenerated by Eclipse plugin and enhanced with more details)
The following bounded contexts are involved in the system:
- Customer Management
- Customer Self-Service Management
- Policy Management
- Debt Collection
- Risk Management
- Printing Context
The customer management context is responsible for managing all the data of the insurance companies customers. Thus, it is typically a central bounded context which has relationships to many other contexts.
Customer Self-Service Management
This context represents a web application which allows the customer to login and change basic data records like the address.
This bounded context manages the contracts and policies of the customers. It works in a partnership together with the risk management context, since it needs the customer risk data for calculating the customer rates. Further, it has a shared kernel with the debt collection context.
The debt collection context is responsible for the financial income of the insurance company (the debts) which depend on the corresponding contracts and policies.
The risk management context works in a close relationship with the policy management context and calculates risks which influence contracts and policies.
This context represents an external system which is accessed by an API by many internal contexts. It handles documents which have to be printed, as for example debts, policies, etc.
Besides classic context maps with bounded contexts, CML supports modeling teams and their relationships as it is possible with bounded contexts. This is done by simply change the type of a bounded context from SYSTEM, FEATURE or APPLICATION to TEAM. Note that the type of the context map is ORGANIZATIONAL in this case.
Insurance-Example_Team-Map.cml is an example of such a team map, again in the context of the insurance example. Besides the teams on the context map, it is possible to define which bounded contexts a team realizes.
The following figure is an illustration of the team map, additionally showing the