关于saprfc:如何在-SAP-BTP-上创建以及消费-Business-Rule-Service

41次阅读

共计 1205 个字符,预计需要花费 4 分钟才能阅读完成。

官网链接:https://developers.sap.com/tu…

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:

从下拉菜单里抉择 vocabulary:

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

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

激活整个我的项目:

点击 Deploy 按钮,部署 rule service:

如果部署失败,查看该 Rule Service 应用到的 entity 是否曾经激活,或者是否曾经增加到 Ruleset vocabulary 里:

很显著,这个 Equipment 保护错了,应该批改成 Employee:

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

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

给 wm_businessrules 创立一个新的 service key:

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

生产该 business rule service 的输出 payload:

    {
  "RuleServiceId": "f27730d10cce4525ae111e647054d8f7",
  "Vocabulary": [
    {
      "Employee": {
        "IsFullTimeEmployee": true,
        "countryofCompany": "USA",
        "jobTitle": "Engineer II",
         "company": "2000"
       }
    }
  ]
}

更多 Jerry 的原创文章,尽在:” 汪子熙 ”:

正文完
 0