lundi 25 mai 2015

Bounded Contexts Rules Orchestration

My banking core domain has divided into 2 distincts bounded contexts BC1 and BC2. These BCs deal with very specific business rules and processes (custom agreement for debt recovery, and administrative indebtedness with legal obligations). BC1 and BC2 are accessed through WebServices from a CRM. A client can't have both a custom agreement and an indebtedness plan, and each situation exclude the other one. So we need to orchestrate both types of processes (more precisely we need to enforce in each BC that actions are permitted, on both sides).

How would you orchestrate them ? Would you inject a bit of knowledge of BC1 in BC2 domain model, and vice-versa, or do you think we should rely on a third BC (BC3) that could orchestrate the system, and would be aware of both business knowledges, and through a third WebService for instance ? We just need to know if the client has an agreement with the company, or if it is officially and legaly indebted.

Do you think having BC1 to know "a little" of BC2 business is violating DDD principles ? In case of an orchestrator or a proxy, would you use WebServices, or SharedKernel ? What are the pros and cons of SharedKernel versus WebServices ?

Aucun commentaire:

Enregistrer un commentaire