Hi,
I have a few scenarios regarding sharing IDs between bounded contexts and I'd like to hear what you guys think.
1. In the system, there is a Customer AR (CRM BC) and a Staff AR (Collaboration BC). In both cases, the CRM BC and Collaboration BC are the owners of those aggregates as the aggregates should be created there first. There is also an identity BC that deals with authenticating these Users into the system. For staff, they can log in to the system. For Customers, they can optionally create an account to log in via the website to view and update their account. Question: should the Users in the Identity BC have their own ID, or should it just use the ID from the Customer AR and the Staff AR? The IDs are UUIDs and collision will not be a problem.
2. The system has a requirement where administrators can define custom fields and objects for Customers and Staff. The definition of these fields and objects will be in Custom Fields BC. The values for these custom fields needs to be linked to each corresponding Customer or Staff. Each Customer or Staff should only have 1 set of values for these custom fields (a 1-to-1 relationships). In this case, should use Customer or Staff ID for Values AR in this BC? Or should I assign an ID for the Values AR and link it to the Customer or Staff via their Customer or Staff ID? It does seem a bit odd as the custom field values is not exactly a customer or staff.
Thanks!