Hi Julio
It may be true that the attributes appear to have the same names, but the semantics are very different and for this reason we have distinct resource definitions:
- RelatedParty always points to a Party (indicated by empty value in role) or to a PartyRole (the actual role name populated in role). We use RelatedParty when we want to indicate that an entity has parties or party roles of interest - for example a ProductOrder is associated with a Customer, so there would be a RelatedParty with role=Customer, etc.
- RelatedEntity points to an entity whose type is not known in advance in the model. There are not so many examples of this, but TroubleTicket and PaymentItem come to mind. A trouble ticket might refer to very many entity types that are otherwise unrelated (examples: a Product , a Customer Bill, etc.). Similarly a Payment Item might refer to many different types of entity (examples: a payment for a Product Order, a payment for a Customer Bill, etc.). In the world of Java, it would have been possible to express these semantics by defining interfaces such as CanBeTicketed, CanReceivePayment, etc., but we don't really have such a mechanism in JSON schema, so we simply point to any entity.
Hope it helps
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
------------------------------
Original Message:
Sent: Dec 05, 2019 07:02
From: Julio Gruszczanski
Subject: TMF646 Release 19.0 - relatedEntity vs relatedParty
Hi all:
I'm traying to figure out the structural differences between "relatedEntity" and "relatedParty". Both of them have same properties: id; href; role; name; and since release 19 also a @referredType is shared too by these two structures.
Which is the need for both identically structures, that coul be differentiate by role or referredType?
In the example of the document:
"relatedEntity": [
{
"id": "789",
"href": "https://host:port/troubleTicket/troubleTicket/789",
"role": "Problem description",
"name": "Internet connexion problem to solve",
"@referredType": "TroubleTicket"
},
{
"id": "465",
"href": "https://host:port/workForceManagement/workOrder/465",
"role": "work order description",
"name": "Work order generated for technician intervention",
"@referredType": "WorkOrder"
}
],
"relatedParty": [
{
"id": "32",
"href": "https://host:port/partyManagement/individual/32",
"role": "customer",
"name": "Kate Smith",
"@referredType": "Individual"
},
{
"id": "56",
"href": "https://host:port/partyManagement/individual/56",
"role": "technician",
"name": "John Doe",
"@referredType": "Individual"
}
Coulden't be a way to represent and Individual as ?:
"relatedEntity":
{
"id": "56",
"href": "https://host:port/partyManagement/individual/56",
"role": "technician",
"name": "John Doe",
"@referredType": "Individual"
}
Thank you all in advance.
Greetings
Julio Gruszczanski
Telecom Argentina
------------------------------
Julio Gruszczanski
Telecom Argentina, S.A.
------------------------------