如何在 SAP BTP 上创建以及消费 Business Rule Service

简介: 如何在 SAP BTP 上创建以及消费 Business Rule Service

官网链接:https://developers.sap.com/tutorials/cp-cf-businessrules07-ruleservice-ruleset.html


Create a rule service interface for an application to invoke the decision logic by associating the rule to a ruleset of the rule service.


创建 rule service interface 的目的:应用程序通过将规则与规则服务的规则集相关联来调用决策逻辑。


A rule service is an interface or an end point that enables an application to invoke a decision logic.


rule service 可以看成一个接口或者 endpoint,应用程序通过调用 rule service,可以触发 decision logic.


Rule set 是一系列 rule 的集合,工作于某个特定的场景。


A rule set can be linked to a rule service so that the set of rules in the rule set gets executed when the rule service is deployed.


规则集可以链接到规则服务,以便在部署规则服务时执行规则集内包含的所有规则。


创建一个新的 rule service:

image.png

从下拉菜单里选择 vocabulary:

image.png

语义是:通过 Employee 信息作为输入,决策出 EquipmentInfo 作为决策结果:

image.png

创建另一个 rule service,用于决策是否需要 approval:

image.pngimage.png

激活整个项目:

image.png

点击 Deploy 按钮,部署 rule service:


image.png

如果部署失败,检查该 Rule Service 使用到的 entity 是否已经激活,或者是否已经添加到 Ruleset vocabulary 里:

image.png

很明显,这个 Equipment 维护错了,应该修改成 Employee:

image.png

SAP API Business Hub 上找到 SAP Business Rules Service:

image.png

使用 Rule Execution API for Cloud Foundry 调用 Business Service:

image.png

给 wm_businessrules 创建一个新的 service key:


image.pngimage.pngimage.png

抄下 clientid, clientsecret 和 url 字段,作为 SAP API Business Hub 里维护 environment 的输入值:


image.png

消费该 business rule service 的输入 payload:

image.png

相关文章
|
6月前
|
供应链 搜索推荐 数据挖掘
什么是 SAP Business ByDesign 里的 TREX
什么是 SAP Business ByDesign 里的 TREX
32 0
|
6月前
|
前端开发 JavaScript Java
如何在 SAP BTP 上创建 Module 之间具有依赖关系的 SAP MTA 应用
如何在 SAP BTP 上创建 Module 之间具有依赖关系的 SAP MTA 应用
70 0
|
16天前
|
存储
使用 ABAP 代码打印出 SAP CRM 系统里所有维护了 Sales Area 的 business partner id
使用 ABAP 代码打印出 SAP CRM 系统里所有维护了 Sales Area 的 business partner id
19 0
|
1月前
|
UED
什么是 SAP Fiori 的 Technical Catalog 和 Business Catalog
什么是 SAP Fiori 的 Technical Catalog 和 Business Catalog
30 0
|
2月前
|
机器学习/深度学习 人工智能 监控
SAP Sales Cloud,Service Cloud 和 SAP BTP 平台上的 AI 集成场景
SAP Sales Cloud,Service Cloud 和 SAP BTP 平台上的 AI 集成场景
67 0
|
6月前
|
存储 JSON API
使用 SAP Business Application Studio Data Editor 生成 Mock Data
使用 SAP Business Application Studio Data Editor 生成 Mock Data
56 0
|
6月前
|
JavaScript 前端开发 Java
如何使用 SAP ABAP Development Tool 连接 SAP BTP 上的免费 ABAP 编程环境试读版
如何使用 SAP ABAP Development Tool 连接 SAP BTP 上的免费 ABAP 编程环境试读版
38 0
|
6月前
|
存储 API 数据库
SAP BTP 平台 ABAP 编程环境如何维护自定义 Unit Of Measure 数据库表 T006
SAP BTP 平台 ABAP 编程环境如何维护自定义 Unit Of Measure 数据库表 T006
59 0
|
6月前
|
自然语言处理 JavaScript 前端开发
使用 SAP Business Application Studio 在浏览器环境里开发 SAP UI5 应用试读版
使用 SAP Business Application Studio 在浏览器环境里开发 SAP UI5 应用试读版
49 1
|
1月前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
27 0