Hi Abinash,
so the situation is, that the service order did not pass validation and needs to be rejeceted.
Let me try to answer the questions
1. What synchronous HTTP Response should be for POST call: 201 Created or 400 Bad Request?
Answer: It should be 201, as you have really created the resource ServiceOrder.
2. Shall synchronous HTTP Response contain detailed Service Order with indication of states of each Order Item?
Answer: As per spec, Service Order resource is part of the http response. However in the synchronous response, it may *not yet* be rejected, because your validation process has not started yet. so it may be valid to leave it empty. Possible solution: just return the created resource, containing the real "ids" that were created (e.g. ServiceOrder.id)
3. What notifications should be created? ServiceOrderCreateEvent(order state Rejected)? ServiceOrderStateChangeEvent(order state Rejected)?
Answer: I guess it`s littlebit part of the freedom of the specific implementation if you need the CreatedEvent. I would say: CreatedEvent contains the freshly created resource ServiceOrder. After the process of validation is done, which may set the state to 'rejected', then a ServiceOrderStateChangeEvent should actually notify the sender, that something went wrong.
4. Is it expected that "List service orders" operation (GET) will return rejected Service Order?
Answer: This is possible as per spec, you can use the Finder GET with state='rejected'
5. What are the states of each Order Item in this scenario (OI1, OI2, OI3)?
Answer: I would say: what ever is the outcome of your validation process.
------------------------------
Adrian Ofterdinger
Capgemini
------------------------------
Original Message:
Sent: Jul 29, 2020 07:51
From: Abinash Vishwakarma
Subject: TMF641 - Order rejected or failed: how to notify the client of the reason/error
Hi I am writing on behalf of my colleague Oleksandr Shykov <oleksandr.shykov@NetCracker.com>. It will great if you can help him with his queries.
Regarding rejecting Service Order and understanding which Order Item caused this rejection: could you please clarify following scenario?
"Create Service Order" (POST) operation was invoked. Service Order contains 3 order items: OI1, OI2, OI3. As the result, Service Order is rejected. Reason: OI2 did not pass validation. OI1 has passed the validation. OI3 was not checked since whole Service Order was rejected as soon as the first invalid Order Item failed the validation.
Questions:
1. What synchronous HTTP Response should be for POST call: 201 Created or 400 Bad Request?
2. Shall synchronous HTTP Response contain detailed Service Order with indication of states of each Order Item?
3. What notifications should be created? ServiceOrderCreateEvent(order state Rejected)? ServiceOrderStateChangeEvent(order state Rejected)?
4. Is it expected that "List service orders" operation (GET) will return rejected Service Order?
5. What are the states of each Order Item in this scenario (OI1, OI2, OI3)?
------------------------------
Abinash Vishwakarma
Netcracker Technology
Original Message:
Sent: Sep 05, 2018 03:31
From: Ludovic Robert
Subject: TMF641 - Order rejected or failed: how to notify the client of the reason/error
Hi Adrian,
Make sense and we already suggest an improvement in the joint effort between TMF and ONAP initiative.
The proposal is to add the following structure in the serviceOrder:
"orderMessage": [
{
"code": "string",
"field": "string",
"messageInformation": "string",
"severity": "information",
"correctionRequired": true
}
]
If fulfillment fails or if specific event occurred and need to be stored this structure will be use.
It is distinct from the HTTP message you get in the POST response.
Now to add it in the API, we need to log a change request in TMF - As serviceOrder leader I'm fully open to do it.
My plan is also to add it in the productOrder (requested by MEF).
Hope it helps,
------------------------------
Ludovic Robert
Orange
Original Message:
Sent: Sep 04, 2018 12:46
From: Adrian Ofterdinger
Subject: TMF641 - Order rejected or failed: how to notify the client of the reason/error
Dear TMF641 committers,
The Service Ordering spec contains notifications about state changes ('ServiceOrderStateChangeNotification') - also in the cases a ServiceOrder switches to state 'failed' or 'rejected'.
So a client of ServiceOrder-Mangement gets this notification and therefore can see:
- 'ok, my service order has been rejected' or
- 'ok, my service order has failed'.
Now my question: Is there a standard way within the notifications to pass more specific information about the reason to the client
like
- rejectionCode / errorCode
- rejectionReason / errorMesage
Would it be possible from TMF point of view, to just add those fields in the notification, so that a client gets more detailed information?
Is there an attribute or object within the ServiceOrder itself, which would be fitting for such information?
Thanks and Regards
Adrian
------------------------------
Adrian Ofterdinger
Capgemini
------------------------------