I am trying to use the Party Place Thing and Role archetypes from Java Modelling in Color.
Further i am also try incorporate DDD best practices, Now assume that we have 1 Person who plays 2 roles say Customer and Patient in my application.
The Customer role is used in the CRM Bounded Context and the Patient role is used in the Hospital Management Bounded Context.
My role classes can access the Person details using a weak id, a value object which can represent the Person uniquely, details of this approach can be found here .
Now in the Party Place Thing archetype one of the responsibilities specified is the ability to list down the roles being played by the party.
How does one achieve this given that the Roles exist in different Bounded Contexts ?
So ideally Customer and Patient, should not exist in the same Bounded Context as Person