Hi Milind
We use the RefOrValue pattern in cases where we believe it is relevant to allow the referred entity to be embedded within the referring entity. Obvious example, ProductRefOrValue is embedded within OrderItem. So as a pattern it is definitely acceptable.
I think you need to take each case separately and consider
why the entity needs to be embedded, and cannot be referred to. For Order, the reason is clear, a new Product does not exist yet in an inventory and so needs to be passed by value when creating the order.
In your case, I understand the point, but I'm not sure who is calling which operation, can you perhaps clarify this to continue the discussion?
------------------------------
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: Aug 11, 2021 09:42
From: Milind Bhagwat
Subject: Pass by Value rather than reference
Hello,
A number of TMF APIs include references to other resources like AppointmentRef or AgreementItemRef. Also related party entities are sent as reference.
However we would want to pass the entire structure of the referenced resource in some cases. For e.g. in TMF622 we have a number of contact types like Order Contact etc that we may need to include in the payload to a suppler and we would have to pass the information by value as the supplier would have no way of retrieving the entity from the href.
Is it valid and TMF compliant to pass resources by value or is there some other recommended extension mechanism?
Thanks
Milind Bhagwat
------------------------------
Milind Bhagwat
BT Group plc
------------------------------