下图是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的读取原理相关推荐

  1. SAP Cloud Platform 上CPI的初始化工作

    SAP Cloud Platform上的CPI tenant,如果没有正确的初始化,试图使用时会遇到如下错误消息: Insufficient scope for this resourceinsuff ...

  2. SAP Cloud Platform上Destination属性为odata_gen的具体用途

    今天工作发现,SAP Cloud Platform上创建Destination维护的WebIDEUsage属性很有讲究: 帮助文档:https://help.sap.com/viewer/825270 ...

  3. 一步步在SAP Cloud Platform上创建HANA实例并使用

    登录SAP Cloud Platform Neo环境,点击SAP HANA / SAP ASE菜单项下的databases & Schemas: 新建一个database实例,取名jerrym ...

  4. 如何在SAP Cloud Platform上进行第一个integration flow开发

    登录SAP Cloud Platform integration tenant,点击Edit图标: 创建一个新的Content package: 保存content package后,点击artifa ...

  5. SAP Cloud Platform上的WebIDE fullstack在哪里打开

    进入SAP Cloud Platform cockpit的首页,Services,选择SAP WebIDE Full-stack: 只有neo环境才有,CloudFoundry没有这个服务: 进到ne ...

  6. SAP Cloud Platform 上的 WebIDE里,如何设置激活代码自动补全(自动完成)功能的快捷键

    Created by Wang, Jerry on Jan 18, 2015 complete url: https://sapui5.hana.ondemand.com/sdk/#docs/api/ ...

  7. 在SAP Cloud Platform上消费Business partner service遇到的错误

    The service broker rejected the request to https://mdmbp-bpssecval-sb.cfapps.eu10.hana.ondemand.com/ ...

  8. 如何把SAP UI5应用部署到SAP云平台的Fiori Launchpad里去

    (1) 首先在WebIDE里把开发好的SAP ui5应用部署到SAP Cloud Platform上: 在弹出窗里维护部署明细: 成功部署后,点击Register to SAP Fiori Launc ...

  9. 如何创建SAP Cloud Platform Process Integration runtime服务

    登录SAP Cloud Platform cockpit,进入subaccount的Service marketplace界面,选择process integration runtime: 点击ins ...

最新文章

  1. 地图画指定区域_聊城各地区公司变更跨区域迁移的流程及需要准备的材料有哪些...
  2. java uml聚合代码_UML类图(下):关联、聚合、组合、依赖
  3. 【定时任务】JDK java.util.Timer定时器的实现原理
  4. 嵌入式linux svn,Linux下配置subversion使其支持svn+ssh方式访问
  5. c语言cgi函数库,cgic: 为C语言编写CGI的C函数库
  6. c++ eos智能合约开发_hyperledger fabric 开发第一个智能合约
  7. golang——channel笔记
  8. git add commit checkout 工作区 暂存区 远程仓库 区别
  9. DOS命令行使用pscp实现远程文件和文件夹传输(转)
  10. 51单片机蜂鸣器播放音乐
  11. NS,DNS和A记录 之间关系
  12. java计算机毕业设计网上书店商城源码+系统+数据库+lw文档+mybatis+运行部署
  13. 进程之间的通信方式有哪些?
  14. 计算机技术了解(基础)
  15. CSS笔记(菜鸟教程)
  16. 【原创】PHP 邮件自动发送(QQ邮箱)
  17. 「津津乐道播客」#380 津津有味:厨房重地举目皆是刚需,将就不得
  18. Android存储系统-MountService 和vold 对外置存储的管理(2)
  19. unpacked value/target cannot be used in assignment
  20. “数字资产”这个词可能是误导 | 正本清源谈区块链

热门文章

  1. python-迭代器
  2. pywinauto二次封装(pywinnat.py)
  3. Bootstrap 表格 笔记
  4. mac搭建PHP开发环境
  5. ORACLE EXPDP命令使用详细【转】
  6. iPhone开发 调用阿asp.net程序的webservice
  7. sklearn自学指南(part59)--神经网络模型(监督)
  8. 第三次学JAVA再学不好就吃翔(part75)--集合概述
  9. 利用python爬虫(part3)--正则表达式
  10. redis 中一个字段 修改map_Redis bitmap 位图 从入门到精通 基础 实战 妙用