Pregunta

Meanwhile, I learned that Aggregate Roots should be wired explicitly by identifiers, not by actual associations to the other AR.

What if, for technical reasons, the identifiers of a same "thing" are different ones because I am not able to influence them?

Look at this picture for example,

Bounded Context(Source: http://martinfowler.com/bliki/BoundedContext.html

Imagine the Support Context is a total different third party system and uses its own identifiers, and I am not able to put my identifier in that system in any way.

So, in my Sales Context I am the master of the identifiers, my Customer and Product have identifiers which I gave; and I need to somehow wire the Sales Context's Customer to the Support Context's Customer.

Where would that adaption take place?

¿Fue útil?

Solución

The most likely place is the anti corruption layer of the Sales Bounded Context under your control. You can keep a simple mapping around that translates from and to the Support Bounded Context identifiers. The relationship between these contexts will influence how you'll go about it. I suppose a product is sprouted from R&D and makes it into something that is put in the catalog by sales which - once sold - will need to be supported. Granted, this is guess work on my behalf.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top