14.4. 配置 KIE 服务器以连接至 Business Central
本节提供了一个示例设置,可用于测试目的。部分值不适用于生产环境,并被标记为。
如果在 Red Hat Process Automation Manager 环境中没有配置 KIE 服务器,或者在 Red Hat Process Automation Manager 环境中需要额外的 KIE 服务器,您必须配置 KIE 服务器来连接到 Business Central。
如果要在 Red Hat OpenShift Container Platform 上部署 KIE 服务器,请参阅使用 Operator 在 Red Hat OpenShift Container Platform 4 上部署 Red Hat Decision Manager 环境。
先决条件
Business Central 和 KIE 服务器安装在 Red Hat JBoss EAP 安装(
EAP_HOME
)的基础目录中,如以下部分所述:存在具有以下角色的用户:
-
在 Business Central 中,拥有
其余
角色的用户 在 KIE 服务器上,角色为
kie-server
的用户更多信息请参阅 第 14.3 节 “创建用户”。
-
在 Business Central 中,拥有
流程
-
在 Red Hat Process Automation Manager 安装目录中,进入
standalone-full.xml
文件。例如,如果您为 Red Hat Process Automation Manager 使用 Red Hat JBoss EAP 安装,请转至$EAP_HOME/standalone/configuration/standalone-full.xml
。 打开
standalone-full.xml
文件并在 <system-properties>
; 标签下设置以下 JVM 属性:表 14.1. 管理的 KIE 服务器实例的 JVM 属性 属性 值 备注 org.kie.server.id
default-kie-server
KIE 服务器 ID。
org.kie.server.controller
http://localhost:8080/business-central/rest/controller
Business Central 的位置。连接到 Business Central API 的 URL。
org.kie.server.controller.user
controllerUser
用户名(具有
rest-all
角色)可以登录到 Business Central。org.kie.server.controller.pwd
controllerUser1234;
登录 Business Central 的用户的密码。
org.kie.server.location
http://localhost:8080/kie-server/services/rest/server
KIE 服务器的位置。连接到 KIE 服务器的 API 的 URL。
表 14.2. Business Central 实例的 JVM 属性 属性 值 备注 org.kie.server.user
controllerUser
使用角色
kie-server
的用户名。org.kie.server.pwd
controllerUser1234;
用户的密码。
以下示例演示了如何配置 KIE 服务器实例:
<property name="org.kie.server.id" value="default-kie-server"/> <property name="org.kie.server.controller" value="http://localhost:8080/business-central/rest/controller"/> <property name="org.kie.server.controller.user" value="controllerUser"/> <property name="org.kie.server.controller.pwd" value="controllerUser1234;"/> <property name="org.kie.server.location" value="http://localhost:8080/kie-server/services/rest/server"/>
以下示例演示了如何为 Business Central 实例配置 :
<property name="org.kie.server.user" value="controllerUser"/> <property name="org.kie.server.pwd" value="controllerUser1234;"/>
要验证 KIE 服务器是否已成功启动,请在 KIE 服务器运行时向
http://SERVER:PORT/kie-server/services/rest/server/
发送 GET 请求。有关在 KIE 服务器上运行 Red Hat Process Automation Manager 的更多信息,请参阅 运行 Red Hat Process Automation Manager。成功验证后,您会收到类似以下示例的 XML 响应:
<response type="SUCCESS" msg="Kie Server info"> <kie-server-info> <capabilities>KieServer</capabilities> <capabilities>BRM</capabilities> <capabilities>BPM</capabilities> <capabilities>CaseMgmt</capabilities> <capabilities>BPM-UI</capabilities> <capabilities>BRP</capabilities> <capabilities>DMN</capabilities> <capabilities>Swagger</capabilities> <location>http://localhost:8230/kie-server/services/rest/server</location> <messages> <content>Server KieServerInfo{serverId='first-kie-server', version='7.5.1.Final-redhat-1', location='http://localhost:8230/kie-server/services/rest/server', capabilities=[KieServer, BRM, BPM, CaseMgmt, BPM-UI, BRP, DMN, Swagger]}started successfully at Mon Feb 05 15:44:35 AEST 2018</content> <severity>INFO</severity> <timestamp>2018-02-05T15:44:35.355+10:00</timestamp> </messages> <name>first-kie-server</name> <id>first-kie-server</id> <version>7.5.1.Final-redhat-1</version> </kie-server-info> </response>
验证成功注册:
- 登录到 Business Central。
点 Menu
Deploy Execution Servers。 如果注册成功,您将看到注册的服务器 ID。