ThingWorx Flow > ThingWorx Flow 安装和管理 > 管理 ThingWorx Flow > 在 ThingWorx Composer 的 WorkflowSubsystem 中执行服务
在 ThingWorx Composer 的 WorkflowSubsystem 中执行服务
先决条件
ThingWorx Composer 中执行服务之前,确保满足以下先决条件:
ThingWorx Flow 服务器必须处于运行状态。
以管理员身份登录 ThingWorx
步骤
1. ThingWorx Flow 仪表板中,单击 Composer 以导航至 ThingWorx Composer
2. ThingWorx Composer 中的“系统”下,选择“子系统”
3. 选择 WorkflowSubsystem,然后单击“服务”选项卡。以下服务适用于 ThingWorx Flow
4. 搜索服务,然后执行以下任务之一:
选择服务以查看其输入信息和输出信息。
单击 。提供适当的输入值,然后单击“执行”
服务
LoadOAuthConfiguration
使用此服务可将 OAuth 配置 JSON 文件加载到 ThingWorx Flow 服务器。此服务会为在 JSON 文件中指定的连接器更新或添加 OAuth 提供者。它不会删除任何现有 OAuth。
输入
输出
参数名称
基本类型
说明
oauthConfigurations
JSON
为连接器提供具有正确 OAuth 配置设置的有效 JSON 文件。
随后会返回一条消息,表明已成功完成或在服务执行期间出错。
例如:要为 JIRA 加载 OAuth 配置,请将 oauthConfigurations 的值提供为
"jira": {
"JIRA": {
"CLIENT_ID": "<Client ID>"
"CLIENT_SECRET": "<Secret>"
}
},
DeleteOAuthConfiguration
如果 OAuth 提供工具未在任何连接器中使用,则使用此服务可删除 ThingWorx Flow 服务器中的 OAuth 配置。
输入
输出
参数名称
基本类型
说明
Connector config name
字符串
提供要删除其 OAuth 配置设置的 有效连接器配置值
随后会返回一条消息,表明已成功完成或在服务执行期间出错。
OAuth provider
字符串
为指定连接器提供有效的 OAuth 提供者。
要删除 JIRA 的相同 OAuth 配置,请将 Connector config name 字段的值提供为 jira,并将 OAuth provider 字段的值提供为 JIRA
GetOAuthConfiguration
使用此服务可检索要将其 OAuth 加载到 ThingWorx Flow 服务器的连接器列表。系统不会显示客户端 ID、客户端机密和 URL 等敏感信息。
输入
输出
参数名称
基本类型
说明
-
返回一个 JSON,其中包含连接器名称和加载到 ThingWorx Flow 服务器的所有 OAuth 的 OAuth 提供者名称。
ValidateFlowSetup
运行此服务以验证 ThingWorx 是否能够与 ThingWorx Flow 服务进行通信。
输入
输出
参数名称
基本类型
说明
随后会返回一条消息,表明已成功完成或在服务执行期间出错。
ThingWorxThingWorx Flow 服务之间出现连接问题,则会显示以下错误代码和消息。
错误代码
错误消息
[FLOW-CONFIG-01]
ThingWorx Flow is not enabled. Add the OrchestrationSettings section to the platform-settings.json file to enable ThingWorx Flow.
[FLOW-RABBIT-01]
Failed to connect to RabbitMQ. Check whether the RabbitMQ service is running and is accessible.
[FLOW-API-01]
Failed to connect to ThingWorx Flow. Check ThingWorx logs for more detail.
[FLOW-API-02]
Failed to connect to ThingWorx Flow. Ensure that you are accessing an Nginx-hosted ThingWorx instance. ThingWorx Flow is not supported on a Tomcat-hosted ThingWorx. Ensure that all ThingWorx Flow services are running and are healthy. In case of self-signed certificate, make sure that correct CN is provided.
[FLOW-KEY-01]
OAuth admin key not found in the ThingWorx KeyStore.
[FLOW-KEY-02]
Exchange admin key not found in the ThingWorx KeyStore.
[FLOW-KEY-03]
Failed to get ThingWorx Flow keys from the ThingWorx KeyStore.
[FLOW-KEY-04]
Failed to get ThingWorx Flow keys from the ThingWorx KeyStore.
[FLOW-EXCHANGE-01]
Failed to connect to ThingWorx Flow exchange service. Check ThingWorx logs for more details.
[FLOW-EXCHANGE-02]
Failed to connect to ThingWorx Flow exchange service. Check whether ThingWorx exchange service is up and running.
[FLOW-OAUTH-01]
Failed to connect to ThingWorx Flow OAuth service. Check ThingWorx logs for more details.
[FLOW-OAUTH-02]
Failed to connect to ThingWorx Flow OAuth service. Check whether ThingWorx Flow OAuth service is up and running.