前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何将SAP API Hub 上提供的工作流导入到 SAP BTP 上

如何将SAP API Hub 上提供的工作流导入到 SAP BTP 上

作者头像
Jerry Wang
发布2021-07-21 09:37:19
6900
发布2021-07-21 09:37:19
举报

官网链接:https://developers.sap.com/tutorials/cp-starter-ibpm-employeeonboarding-2-configure.html

  • SAP Workflow service: helps to digitalize workflows and quickly orchestrate tasks that span people, applications, and organizations.

SAP 工作流服务可以使企业运行流程实现数字化,让横跨企业组织架构,应用和员工的任务能够协同工作。

通过这些任务(比如审批,订单履行,以及对时间敏感的合作伙伴协作)的自动化和无缝跟踪与协调,企业生产力得以提升。

You can enhance productivity by automating and tracking coordinated, account-able tasks – including approvals, order fulfillment, or time-sensitive partner collaboration.

The sample business rule used in this scenario is published in API Business Hub.

链接地址: https://api.sap.com/package/EquipmentDeterminationRules?section=Artifacts

SAP Business Rules service is part of SAP Workflow Management which enable business users & application developers to automate their decisions and enhance their decision-making experience. It offers simplified Fiori-based rule authoring tool & a central rule repository with various deployment options to different runtimes.

SAP Business Rules Service 是 SAP workflow management 的一部分,使业务用户和应用开发人员能够自动化其决策制定,以及增强决策制定的体验。

SAP Business rules Service 提供了简化的基于 Fiori 风格的规则创作工具以及规则存储仓库,以及各种部署选项,支持多种运行环境的部署。

  • SAP Process Visibility service:

SAP 流程可见性服务:提供对运行在 cloud 或者 On-Premises 或者混合环境下的流程可见性的洞察功能。

provides visibility into processes that run in the cloud, on-premise, or in hybrid environments.

Process visibility works on events. SAP or non-SAP applications (cloud or on-premise) push events into Process Visibility.

Process visibility 基于事件工作,接收来自 SAP 或者 非 SAP 应用的事件推送。

These events are persisted, processed and enhanced to form end-to-end process instances with insights, which are visualized by business users in their process workspace.

这些事件被持久化且进一步增强,形成具有洞察力的端到端流程实例。业务用户在其流程工作区(一个 Fiori Launchpad tile 的名称)中以可视化的方式查看。

The insights enable business users to identify process bottlenecks, track process performance, and operational issues and act on them.

这些见解使业务用户能够识别流程瓶颈、跟踪流程绩效和运营问题并对其采取行动。

BUSINESSRULES_APIHUB destination is used in Manage Rule Projects application to import business rules from API Business Hub.

从 API Business Hub 导入 business rule.

This destination is already created in the previous set up tutorial, and now you will configure the destination for the password.

确保该 Destination 能够正常工作:

创建一个新的 system:

指向 SAP API Business Hub:

在 Manage Projects 里,选择 Import Project from API Business Hub:

选择 Equipment determination business rules:

如果遇到 Bad gateway error 的错误消息,检查 Destination 里维护的用户名和密码是否正确:

If you get Bad Gateway Error error, then check the username and password you have used in BUSINESSRULES_APIHUB destination. If your user is 2-Factor-Authentication enabled, then the password will be password+passcode. This passcode will expire in a minute.

点击这个按钮:

点击 deploy 按钮:

可以选择 Deploy 到 Cloud Runtime 或是 Success Factors,这里我们选择前者。

部署成功:

Only deployed business rules can be consumed via APIs published in API Business Hub.

下载这个例子程序的源代码: https://github.com/SAP-samples/cloud-workflow-samples/blob/master/cf-onboarding-sample/resources/cf-onboarding-sample.zip

登录 SAP Business Application Studio:

创建一个 dev space:

确保 space 处于 running 状态:

打开 workspace,导入 reference workflow 应用:

打开的 workflow 项目如下图所示:

这个 MTA 应用的核心是这个工作流 onboard.workflow:

起始事件:

这个工作流包含如下内容:

  • 一个名为 determine equipment 的 service task:
  • script task:

为员工决定出需要的工作设备:

这个 script task 的执行,位于 script file 里:

这些字段的值来自 sample Data:

service task:

business rule:

输入和输出:

  • user task:confirmation of the equipment selected via business rules and for the approval of equipment.

确认通过 business rules 选择的 equipment 并审批。

这个 user task 的接收者:info.startedBy, 也就是说,谁启动这个 workflow 实例,谁就会接收到 Change or Confirm Equipment 这个 task:

这些 user task 的 UI, 实现在 forms 文件夹下面:

选择项目文件夹里的 mta.yaml 文件,右键菜单里选择:Build MTA Project:

上图 Build MTA Project 的菜单,实际执行的是 mta build -s ‘/home/user/projects/cf-onboarding-sample’ 的命令行:

build 成功后,在 mta_archives 文件夹里,生成了一个 .mtar 压缩包:

通过菜单 Deploy MTA Archive, 把这个压缩包,部署到运行时:

需要输入用户名和密码,在 SAP Business Application Studio 里登录 SAP BTP:

成功登录:

选择 CloudFoundry 环境里的 organization 和 space:

可以使用如下命令行查看日志:

cf dmol -i 4f65fe6d-cf36-11eb-a329-eeee0a914605

使用 Fiori Launchpad tile Configure Visibility Scenarios:

创建一个新的 scenario:

把之前创建好的 workflow 添加到这个 scenario 里来,这样,后续就可以使用该 scenario,查看该 workflow 的执行明细:

workflow 的 id,可以从源代码里获得:

之后,onboard 工作流所有的事件和上下文都已经成功导入了:

创建一个新的 sub-status:

关于后续测试,参考 Jerry 的文章:SAP 业务技术平台(SAP Business Technology Platform) Workflow 工作流功能介绍

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2021-06-21 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
集团账号管理
集团账号管理为企业客户提供云上多账号管理能力,您可以便捷的完成多个账号的的统一授权管理、财务管理、资源共享管理以及操作审计等,通过这些功能,能够更好地满足企业的预算、安全性和合规性需求。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档