天天看點

SAP CRM Fiori My appointment點了Edit按鈕後的三個roundtrip詳解

my appointment edit之後有3個sequential 的roundtrip

我看了下現在的三組串行的roundtrip,我覺得我們需要搞清楚第三組到底會不會阻塞user的ui操作:

SAP CRM Fiori My appointment點了Edit按鈕後的三個roundtrip詳解

authorization check request:

GET /sap/fiori/cuscrmmycalendar/sap/opu/odata/sap/CRM_APPOINTMENT_SRV/EditAuthorizationCheck?ObjectGuid=guid’3440B5B1-6F66-1ED5-8BEB-A758FAFA33B7’ HTTP/1.1

response:

{“d”:{“EditAuthorizationCheck”:{"__metadata":{“type”:“CRM_APPOINTMENT_SRV.ActionResult”},“ActionSuccessful”:“X”,“Message”:""}}

2.a 拿ETAG request: sap/fiori/cuscrmmycalendar/sap/opu/odata/sap/CRM_APPOINTMENT_SRV/AppointmentSet(guid’3440B5B1-6F66-1ED5-8BEB-BE9CE64BF3E8’)

SAP CRM Fiori My appointment點了Edit按鈕後的三個roundtrip詳解

2.b 拿appointment的attendee和attachment資訊:

sap/fiori/cuscrmmycalendar/sap/opu/odata/sap/CRM_APPOINTMENT_SRV/AppointmentSet(guid’3440B5B1-6F66-1ED5-8BEB-BE9CE64BF3E8’)?$expand=Attendee,AppointmentToAttachment

3.a 在appointment的attendee和attachment資訊讀取回來之後,在successHandler裡再繼續讀note資訊。3.a和2.b是串行的,即2.b執行完之後,才輪到3.a執行:

SAP CRM Fiori My appointment點了Edit按鈕後的三個roundtrip詳解

3.b 還是在appointment和attendee的資訊讀取回來之後,在successHandler裡調用attachment view的bindElement方法:

SAP CRM Fiori My appointment點了Edit按鈕後的三個roundtrip詳解

這個方法會call到架構的createBindingContext,最終導緻再trigger一個odata request:

SAP CRM Fiori My appointment點了Edit按鈕後的三個roundtrip詳解

繼續閱讀