Question about integrating bounded contexts.
For example. I have organization AR
in indentity BC
. And courier service AR
in logistics BC
. They must be connected.
organization AR
consists of:
- OrganizationId
- Name
- TaxCode
- LegalAddress
- ...
courier service AR
consists of:
- CourierServiceId
- Name
- TransportationPriority
- Rating
- ...
Client send all these information in one request (Name, TaxCode, LegalAddress, TransportationPriority, Rating).
Questions:
- In which application should I submit a request to create two AR?
- How should i create both AR? After i created first AR in first BC, how should i create second AR from second BC?
The problem I faced:
At first I thought to publish domain event when organization AR
created to notify logistics BC
and create courier service AR
. But when i publish domain event in first BC i must use language concepts as TransportationPriority, Rating
(that needed to create AR in second BC). But this language concepts does not belong to first BC. However they are used in it. As i know it is wrong.
So how can I solve my problem? Sorry, my English is bad. Thanks so much.