Hi Uma
You should not change the attribute name (from partyRole to customerServiceAccount), since this doesn't match the schema of the event.
The contents should match your implementation, so if you have created a concrete subclass CustomerServiceAccount (notice capital C in the name) the @type should be set to CustomerServiceAccount
You can certainly extend the base class, this is what the @type and @baseType enable you to do.
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: Mar 03, 2023 02:55
From: Uma Mahesh Ma
Subject: TMF 669 Event Structure
Hi,
In TMF669 PartyRoleManagement API, we have events structure as below.
{ "eventId":"00001", "eventTime":"2015-11-16T16:42:25-04:00", "eventType":"PartyRoleCreateEvent", "event": { "partyRole" : {-- SEE PartyRole RESOURCE SAMPLE --} } }
Based on the above sample message, which of below is valid ?
Sample 1:
{
"eventId": "00001",
"eventTime": "2015-11-16T16:42:25-04:00",
"eventType": "PartyRoleCreateEvent",
"event": {
"partyRole": {
"@baseType": "PartyRole",
"@type": "customerServiceAccount",
Sample 2:
{
"eventId": "00001",
"eventTime": "2015-11-16T16:42:25-04:00",
"eventType": "PartyRoleCreateEvent",
"event": {
"customerServiceAccount": {
"@baseType": "PartyRole",
"@type": "customerServiceAccount",
- Is it mandatory to have object name same as the value of @type ? Or can we have them as in Sample 1 ?
- Can we extend base class(i.e. partyRole object ) to add additional attributes ?
Please suggest what's the recommended approach
Thanks,
Uma Mahesh
------------------------------
Uma Mahesh
BT Group plc
------------------------------