日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SAP Cloud Platform上Fiori launchpad tile的读取原理

發布時間:2023/12/19 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SAP Cloud Platform上Fiori launchpad tile的读取原理 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

下圖是Fiori on HANA HCP的architecture:
我們的Fiori UI不再是存在netweaver的BSP application里,而是存在HCP的cloud repository里了。
Fiori Launchpad及相關配置,按照wiki的介紹,現在tile configuration的內容最終是存放在HANA native的table里,通過XSE暴露的service給client端調用。

XSE的service是通過server side javascript實現的,這些javascript就是前一封郵件里在HANA studio里能找到的那些source code。和我們已經很熟悉的client side javascript相比,這些server side javascript在Chrome的F12里無法看到,也無法在client端debug,因為其是執行在server端的。
如果想要debug,需要用HCP 專門的workbench打開server端的實現,把debugger attach到client端的session上,然后trigger斷點。這個debugger功能很弱,比如看不到callstack。一般情況下如果遇到HCP相關的incident,一旦能排除不是我們application的問題,我一般都直接FW到HCP的component讓他們去看。

Sent: Tuesday, March 31, 2015 7:02 PM

how the Fiori tile information is retrieved from HANA HCP

Hi colleagues,

After I log on HCP via my own user, I could see many tiles:
https://jerry-xe84733bd.dispatcher.neo.ondemand.com/sap/hana/uis/clients/ushell-app/shells/fiori/FioriLaunchpad.html

I am very curious how and where this tile information is retrieved from HANA cloud.
Here below is my research result.
(1)The tile information is fetched via restful service observed in network tab:

It is a json stream, use list a small part of it here:

{ "ID": "70c4b7f1-5579-4517-bc09-e7231f5add96-1426085327112", "packageID": "", "objectName": "", "type": "chips.tiles.applauncherdynamic.DynamicTile", "templateProperties": [ { "key": "navigation_target_url", "value": "#flp-runApp?html5App=cuscrmopportunity&SAPUI5.Component=cus.crm.opportunity&url=/" }, { "key": "formFactor", "value": "{"desktop":true,"tablet":true,"phone":true}" }, { "key": "service_url", "value": "/sap/opu/odata/sap/CRM_OPPORTUNITY/Opportunities/$count" }, { "key": "sap.hana.uis.flp.app.intentSemanticObject", "value": "" }, { "key": "sap.hana.uis.flp.app.intentAction", "value": "" }, { "key": "navigation_component_url", "value": "/" }, { "key": "service_refresh_interval", "value": "300" }, { "key": "navigation_component_name", "value": "cus.crm.opportunity" }, { "key": "allow_unknown_parameters", "value": "true" }, { "key": "tile_size", "value": "1x1" }, { "key": "html5_application_name", "value": "cuscrmopportunity" }, { "key": "sap.hana.uis.flp.app.type", "value": "SAP_UI5_Component" }, { "key": "display_icon_url", "value": "sap-icon://Fiori2/F0012" }, { "key": "display_title_text", "value": "My Opportunities" } ] },

(2) The restful service is implemented via consumption_service, whose source code could be found in HANA studio.

(3) The call will delegate to FIORI_DAO:

(4) FIORI_DAO is a subclass of WORKSPACE_DAO:

And workspace DAO just issue the query to HANA database via call getResultSet():

(5) Finally the HANA procedure GET_APPSITE will be called:

Inside the procedure we can know the tile information in HANA HCP is retrieved based on the union of the two HANA tables below:

Source code for UIS.GET_APPSITE

CREATE PROCEDURE UIS.GET_APPSITE(IN PACKAGE_ID NVARCHAR(256), IN OBJECT_NAME NVARCHAR(256), OUT APPSITE_DATA GET_APPSITE_TABLE_TYPE) LANGUAGE SQLSCRIPT SQL SECURITY DEFINER DEFAULT SCHEMA UIS READS SQL DATA AS internal_site_id integer; ws_count integer; session_usr varchar(256); locale nvarchar(256); BEGIN internal_site_id := -1; SELECT count(*) into ws_count FROM "_SYS_RT"."_UIS_APPSITES" WHERE PACKAGE_ID LIKE :package_id AND OBJECT_NAME LIKE :object_name; IF :ws_count > 0 THEN SELECT INTERNAL_SITE_ID INTO internal_site_id FROM "_SYS_RT"."_UIS_APPSITES" WHERE PACKAGE_ID LIKE :package_id AND OBJECT_NAME LIKE :object_name; END IF; select session_context('LOCALE') INTO locale from SYS.dummy; session_usr := SESSION_USER;APPSITE_DATA =SELECTsite_name,site_layout,pg_layout_id,pg_id,pg_name,pg_layout,wg_layout_id,wg_id,wg_name,src,icon,type as wg_type,key,value,parent_page_id,'site' as record_typeFROM "UIS"."sap.hana.uis.db::UIS_APPSITES_DATA_VIEW"WHERE INTERNAL_SITE_ID = :internal_site_idUNION ALLselectNULL as site_name,NULL as site_layout,NULL as pg_layout_id,NULL as pg_id,NULL as pg_name,NULL as pg_layout,NULL as wg_layout_id,wg_id,NULL as wg_name,NULL as src,NULL as icon,NULL as wg_type,key,value,NULL as parent_page_id,'userwidgetprops' as record_typeFROM "_SYS_RT"."_UIS_USER_WIDGET_PROPERTIES"WHERE INTERNAL_SITE_ID like :internal_site_id AND USER_NAME LIKE :session_usrUNION ALLselectNULL as site_name,NULL as site_layout,NULL as pg_layout_id,NULL as pg_id,NULL as pg_name,NULL as pg_layout,NULL as wg_layout_id,NULL as wg_id,NULL as wg_name,NULL as src,NULL as icon,NULL as wg_type,text_id as key,content as value,NULL as parent_page_id,'translations' as record_typefrom _SYS_REPO.TEXT_ACCESSOR(:package_id, :object_name, 'xsappsite', :locale);END;

要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

總結

以上是生活随笔為你收集整理的SAP Cloud Platform上Fiori launchpad tile的读取原理的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。