ThingWorx Flow > ThingWorx Flow 安裝與管理 > 管理 ThingWorx Flow > 在 ThingWorx Composer 的工作流程子系統中執行服務
在 ThingWorx Composer 的工作流程子系統中執行服務
先決條件
ThingWorx Composer 中執行服務之前,請確保符合下列先決條件:
ThingWorx Flow 伺服器必須正在執行。
以管理員身份登入 ThingWorx
步驟
1. 從圖示 ThingWorx Flow 儀表板中,按一下 Composer 以導覽至 ThingWorx Composer
2. ThingWorx Composer「系統」下,選取「子系統」
3. 選取「工作流程子系統」,然後按一下「服務」標籤。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.