you really should read the past discussion about parties.
if you look at the many discussions about party, role etc in this community, you will see there's a long-running issue in the model regarding `engagedParty` in the `PartyRole` entity (not just the agreement API). The `engagedParty` attribute in the `PartyRole` entity should be of type `PartyRef`, not `RelatedParty`. The `engagedParty` is the `Party` that is playing the `PartyRole`, and so it doesn't make sense that it could point to a different `PartyRole`. In the example, "Global Pirates" is a `PartyRole`. The `Party` playing this `PartyRole` is also called "Global Pirates", an organization.
Regarding specifying the role of the engaged party, one suggestion is to model these as part of the `relatedParty` list for the Agreement.
Maybe you can use the polymorphism mechanism (@type) to distinguish the various engaged parties.
But there were so many discussions and opinions on party, role etc that it's very challenging to follow up what fix is needed, when it will applied. etc
------------------------------
Kind regards,
Matthieu Hattab
Digital Sales Domain Architect
Lyse Tele AS
------------------------------